From d46fa394e7d617f0d6d0b35576ad88c33f7f230a Mon Sep 17 00:00:00 2001 From: Martin Bergljung Date: Tue, 16 Aug 2016 15:56:37 +0100 Subject: [PATCH] Share JAR Maven Archetype for SKD 3.0 --- .../src/main/assembly/amp.xml | 26 +++ .../resources/archetype-resources/pom.xml | 5 +- .../META-INF/maven/archetype-metadata.xml | 39 ++-- .../resources/archetype-resources/README.md | 33 +++ .../resources/archetype-resources/pom.xml | 210 ++++++++++++------ .../resources/archetype-resources/run.bat | 13 +- .../main/resources/archetype-resources/run.sh | 8 +- ...factId__-slingshot-application-context.xml | 29 --- .../com/example/pages/simple-page.get.js | 27 --- .../src/main/amp/file-mapping.properties | 14 -- .../widgets/i18n/TemplateWidget.properties | 2 - .../src/main/assembly/amp.xml | 26 +++ .../js/tutorials}/widgets/TemplateWidget.js | 0 .../tutorials}/widgets/css/TemplateWidget.css | 1 + .../widgets/i18n/TemplateWidget.properties | 3 + .../widgets/templates/TemplateWidget.html | 0 .../resources/META-INF/resources/test.html | 6 - .../META-INF/share-config-custom.xml.sample | 2 +- .../module/__artifactId__}/module.properties | 2 +- ...factId__-slingshot-application-context.xml | 29 +++ .../messages/__artifactId__.properties | 0 .../__artifactId__-example-widgets.xml | 2 +- .../example/pages/simple-page.get.desc.xml | 0 .../example/pages/simple-page.get.html.ftl | 0 .../com/example/pages/simple-page.get.js | 29 +++ .../site-webscripts/org/alfresco/README.md | 0 .../src/site/apt/advanced-usage.apt.vm | 62 ------ .../src/site/apt/index.apt.vm | 52 ----- .../src/site/apt/usage.apt.vm | 73 ------ .../archetype-resources/src/site/site.xml | 51 ----- .../web-extension/share-config-custom.xml | 92 -------- .../src/test/resources/log4j.properties | 52 ----- .../archetype-resources/tomcat/context.xml | 29 --- 33 files changed, 306 insertions(+), 611 deletions(-) create mode 100644 archetypes/alfresco-allinone-archetype/src/main/resources/archetype-resources/__rootArtifactId__-share-jar/src/main/assembly/amp.xml create mode 100644 archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/README.md delete mode 100644 archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/main/amp/config/alfresco/web-extension/__artifactId__-slingshot-application-context.xml delete mode 100644 archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/main/amp/config/alfresco/web-extension/site-webscripts/com/example/pages/simple-page.get.js delete mode 100644 archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/main/amp/file-mapping.properties delete mode 100644 archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/main/amp/web/js/example/widgets/i18n/TemplateWidget.properties create mode 100644 archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/main/assembly/amp.xml rename archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/main/{amp/web/js/example => resources/META-INF/resources/__artifactId__/js/tutorials}/widgets/TemplateWidget.js (100%) rename archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/main/{amp/web/js/example => resources/META-INF/resources/__artifactId__/js/tutorials}/widgets/css/TemplateWidget.css (72%) create mode 100644 archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/main/resources/META-INF/resources/__artifactId__/js/tutorials/widgets/i18n/TemplateWidget.properties rename archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/main/{amp/web/js/example => resources/META-INF/resources/__artifactId__/js/tutorials}/widgets/templates/TemplateWidget.html (100%) delete mode 100644 archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/main/resources/META-INF/resources/test.html rename archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/main/{amp => resources/alfresco/module/__artifactId__}/module.properties (95%) create mode 100644 archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/main/resources/alfresco/web-extension/__artifactId__-slingshot-application-context.xml rename archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/main/{amp/config => resources}/alfresco/web-extension/messages/__artifactId__.properties (100%) rename archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/main/{amp/config => resources}/alfresco/web-extension/site-data/extensions/__artifactId__-example-widgets.xml (86%) rename archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/main/{amp/config => resources}/alfresco/web-extension/site-webscripts/com/example/pages/simple-page.get.desc.xml (100%) rename archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/main/{amp/config => resources}/alfresco/web-extension/site-webscripts/com/example/pages/simple-page.get.html.ftl (100%) create mode 100644 archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/main/resources/alfresco/web-extension/site-webscripts/com/example/pages/simple-page.get.js rename archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/main/{amp/config => resources}/alfresco/web-extension/site-webscripts/org/alfresco/README.md (100%) delete mode 100644 archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/site/apt/advanced-usage.apt.vm delete mode 100644 archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/site/apt/index.apt.vm delete mode 100644 archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/site/apt/usage.apt.vm delete mode 100644 archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/site/site.xml delete mode 100644 archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/test/resources/alfresco/web-extension/share-config-custom.xml delete mode 100644 archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/test/resources/log4j.properties delete mode 100644 archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/tomcat/context.xml diff --git a/archetypes/alfresco-allinone-archetype/src/main/resources/archetype-resources/__rootArtifactId__-share-jar/src/main/assembly/amp.xml b/archetypes/alfresco-allinone-archetype/src/main/resources/archetype-resources/__rootArtifactId__-share-jar/src/main/assembly/amp.xml new file mode 100644 index 00000000..6ef3c094 --- /dev/null +++ b/archetypes/alfresco-allinone-archetype/src/main/resources/archetype-resources/__rootArtifactId__-share-jar/src/main/assembly/amp.xml @@ -0,0 +1,26 @@ + + + build-amp-file + + + amp + + + false + + + ${project.basedir}/src/main/resources/alfresco/module/${project.artifactId}/module.properties + true + + + + + + lib + + + + \ No newline at end of file diff --git a/archetypes/alfresco-platform-jar-archetype/src/main/resources/archetype-resources/pom.xml b/archetypes/alfresco-platform-jar-archetype/src/main/resources/archetype-resources/pom.xml index 1d69fc18..cc5962c0 100644 --- a/archetypes/alfresco-platform-jar-archetype/src/main/resources/archetype-resources/pom.xml +++ b/archetypes/alfresco-platform-jar-archetype/src/main/resources/archetype-resources/pom.xml @@ -32,8 +32,9 @@ executing for example $ mvn clean install alfresco:run --> org.alfresco alfresco-platform - 5.1.g - 5.1.f + + 5.2.a-EA + 5.1.g - + 3.0.0-SNAPSHOT - + UTF-8 - + + org.alfresco + share + 5.1.g + 6.3 - - ${alfresco.share.artifactId} - - + 8081 - - http://localhost:8080/alfresco - + + 1.1.6 - - - - - - ${alfresco.groupId} - alfresco-platform-distribution - ${alfresco.version} - pom - import - - - - - + ${alfresco.groupId} - share - ${alfresco.version} + ${alfresco.share.war.artifactId} + ${alfresco.share.version} classes provided + - org.springframework.extensions.surf + org.alfresco.surf spring-surf-api + ${alfresco.surf.version} provided - + - net.alchim31.maven - yuicompressor-maven-plugin + org.alfresco.maven.plugin + alfresco-maven-plugin + ${alfresco.sdk.version} + + + false + false + false + + + true + + + + + + maven-assembly-plugin + 2.6 + + + build-amp-file + package + + single + + + false + src/main/assembly/amp.xml + + + + + + org.alfresco.maven.plugin + alfresco-maven-plugin + ${alfresco.sdk.version} + + + + + + + org.zeroturnaround + jrebel-maven-plugin + ${jrebel.version} + + + generate-rebel-xml + process-resources + + generate + + + + + + true + + + true + + + + + + src/main/resources + true + + + + + + src/test/resources + true + + - - - - enterprise - - - ${alfresco.groupId} - share-enterprise - ${alfresco.version} - classes - provided - - - - + + + + alfresco-public + https://artifacts.alfresco.com/nexus/content/groups/public + + + alfresco-public-snapshots + https://artifacts.alfresco.com/nexus/content/groups/public-snapshots + + true + daily + + + + + + alfresco-plugin-public + https://artifacts.alfresco.com/nexus/content/groups/public + + + alfresco-plugin-public-snapshots + https://artifacts.alfresco.com/nexus/content/groups/public-snapshots + + true + daily + + + + \ No newline at end of file diff --git a/archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/run.bat b/archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/run.bat index e2451a65..6b17b4bc 100644 --- a/archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/run.bat +++ b/archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/run.bat @@ -1,20 +1,9 @@ :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: Dev environment startup script for Alfresco Community. :: :: :: -:: Downloads the spring-loaded lib if not existing and :: -:: runs the Share AMP applied to Share WAR. :: :: Note. requires Alfresco.war to be running in another :: :: Tomcat on port 8080. :: :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: @echo off -set springloadedfile=%HOME%\.m2\repository\org\springframework\springloaded\@@springloaded.version@@\springloaded-@@springloaded.version@@.jar - -if not exist %springloadedfile% ( - mvn validate -Psetup -) - -set MAVEN_OPTS=-javaagent:"%springloadedfile%" -noverify - -mvn integration-test -Pamp-to-war -nsu -:: mvn integration-test -Pamp-to-war +mvn clean install -DskipTests=true alfresco:run diff --git a/archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/run.sh b/archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/run.sh index 2146adfd..e1366448 100755 --- a/archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/run.sh +++ b/archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/run.sh @@ -1,10 +1,4 @@ #!/bin/bash -# Downloads the spring-loaded lib if not existing and runs the Share AMP applied to Share WAR # Note. requires Alfresco.war to be running in another Tomcat on port 8080 -springloadedfile=~/.m2/repository/org/springframework/springloaded/@@springloaded.version@@/springloaded-@@springloaded.version@@.jar -if [ ! -f $springloadedfile ]; then -mvn validate -Psetup -fi - -MAVEN_OPTS="-javaagent:$springloadedfile -noverify" mvn integration-test -Pamp-to-war +mvn clean install -DskipTests=true alfresco:run diff --git a/archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/main/amp/config/alfresco/web-extension/__artifactId__-slingshot-application-context.xml b/archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/main/amp/config/alfresco/web-extension/__artifactId__-slingshot-application-context.xml deleted file mode 100644 index e17b9f32..00000000 --- a/archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/main/amp/config/alfresco/web-extension/__artifactId__-slingshot-application-context.xml +++ /dev/null @@ -1,29 +0,0 @@ -#set($symbol_pound='#') -#set($symbol_dollar='$') -#set($symbol_escape='\' ) - - - - - - - - - - alfresco.web-extension.messages.${artifactId} - - - - - \ No newline at end of file diff --git a/archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/main/amp/config/alfresco/web-extension/site-webscripts/com/example/pages/simple-page.get.js b/archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/main/amp/config/alfresco/web-extension/site-webscripts/com/example/pages/simple-page.get.js deleted file mode 100644 index c7039c4d..00000000 --- a/archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/main/amp/config/alfresco/web-extension/site-webscripts/com/example/pages/simple-page.get.js +++ /dev/null @@ -1,27 +0,0 @@ -model.jsonModel = { - widgets: [{ - id: "SET_PAGE_TITLE", - name: "alfresco/header/SetTitle", - config: { - title: "This is a simple page" - } - }, - { - id: "MY_HORIZONTAL_WIDGET_LAYOUT", - name: "alfresco/layout/HorizontalWidgets", - config: { - widgetWidth: 50, - widgets: [ - { - name: "alfresco/logo/Logo", - config: { - logoClasses: "alfresco-logo-only" - } - }, - { - name: "example/widgets/TemplateWidget" - } - ] - } - }] -}; \ No newline at end of file diff --git a/archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/main/amp/file-mapping.properties b/archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/main/amp/file-mapping.properties deleted file mode 100644 index 45cccaf5..00000000 --- a/archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/main/amp/file-mapping.properties +++ /dev/null @@ -1,14 +0,0 @@ -# Custom AMP to WAR location mappings - -# -# The following property can be used to include the standard set of mappings. -# The contents of this file will override any defaults. The default is -# 'true', i.e. the default mappings will be augmented or modified by values in -# this file. -# -include.default=true - -# -# Custom mappings. If 'include.default' is false, then this is the complete set. -# -/web=/ diff --git a/archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/main/amp/web/js/example/widgets/i18n/TemplateWidget.properties b/archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/main/amp/web/js/example/widgets/i18n/TemplateWidget.properties deleted file mode 100644 index 6335f99d..00000000 --- a/archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/main/amp/web/js/example/widgets/i18n/TemplateWidget.properties +++ /dev/null @@ -1,2 +0,0 @@ -hello-label=Hello from i18n! -hello-test=New label! \ No newline at end of file diff --git a/archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/main/assembly/amp.xml b/archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/main/assembly/amp.xml new file mode 100644 index 00000000..6ef3c094 --- /dev/null +++ b/archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/main/assembly/amp.xml @@ -0,0 +1,26 @@ + + + build-amp-file + + + amp + + + false + + + ${project.basedir}/src/main/resources/alfresco/module/${project.artifactId}/module.properties + true + + + + + + lib + + + + \ No newline at end of file diff --git a/archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/main/amp/web/js/example/widgets/TemplateWidget.js b/archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/main/resources/META-INF/resources/__artifactId__/js/tutorials/widgets/TemplateWidget.js similarity index 100% rename from archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/main/amp/web/js/example/widgets/TemplateWidget.js rename to archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/main/resources/META-INF/resources/__artifactId__/js/tutorials/widgets/TemplateWidget.js diff --git a/archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/main/amp/web/js/example/widgets/css/TemplateWidget.css b/archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/main/resources/META-INF/resources/__artifactId__/js/tutorials/widgets/css/TemplateWidget.css similarity index 72% rename from archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/main/amp/web/js/example/widgets/css/TemplateWidget.css rename to archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/main/resources/META-INF/resources/__artifactId__/js/tutorials/widgets/css/TemplateWidget.css index 0e9d06a3..dcc67a9c 100644 --- a/archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/main/amp/web/js/example/widgets/css/TemplateWidget.css +++ b/archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/main/resources/META-INF/resources/__artifactId__/js/tutorials/widgets/css/TemplateWidget.css @@ -2,4 +2,5 @@ border: 1px #000000 solid; padding: 1em; width: 100px; + background-color: deepskyblue; } \ No newline at end of file diff --git a/archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/main/resources/META-INF/resources/__artifactId__/js/tutorials/widgets/i18n/TemplateWidget.properties b/archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/main/resources/META-INF/resources/__artifactId__/js/tutorials/widgets/i18n/TemplateWidget.properties new file mode 100644 index 00000000..6a69646b --- /dev/null +++ b/archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/main/resources/META-INF/resources/__artifactId__/js/tutorials/widgets/i18n/TemplateWidget.properties @@ -0,0 +1,3 @@ +hello-label=Hello from i18n + + diff --git a/archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/main/amp/web/js/example/widgets/templates/TemplateWidget.html b/archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/main/resources/META-INF/resources/__artifactId__/js/tutorials/widgets/templates/TemplateWidget.html similarity index 100% rename from archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/main/amp/web/js/example/widgets/templates/TemplateWidget.html rename to archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/main/resources/META-INF/resources/__artifactId__/js/tutorials/widgets/templates/TemplateWidget.html diff --git a/archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/main/resources/META-INF/resources/test.html b/archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/main/resources/META-INF/resources/test.html deleted file mode 100644 index 53ec260b..00000000 --- a/archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/main/resources/META-INF/resources/test.html +++ /dev/null @@ -1,6 +0,0 @@ - - -

This is a test web resource loaded from the JAR/META-INF/resources. - This, per Servlet 3 spec is mapped to the root of the webapp

- - \ No newline at end of file diff --git a/archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/main/resources/META-INF/share-config-custom.xml.sample b/archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/main/resources/META-INF/share-config-custom.xml.sample index ac18c131..d50e936d 100644 --- a/archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/main/resources/META-INF/share-config-custom.xml.sample +++ b/archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/main/resources/META-INF/share-config-custom.xml.sample @@ -6,7 +6,7 @@ Note. Any configuration related to the whole Share.war webapp (i.e. not specific to this share extension) should be placed in the environment specific config: - alfresco/tomcat/shared/classes/alfresco/web-extension/share-config-custom.xml file + allinone/share-war/src/main/resources/alfresco/web-extension/share-config-custom.xml file --> diff --git a/archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/main/amp/module.properties b/archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/main/resources/alfresco/module/__artifactId__/module.properties similarity index 95% rename from archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/main/amp/module.properties rename to archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/main/resources/alfresco/module/__artifactId__/module.properties index 0e5c045a..158500f6 100644 --- a/archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/main/amp/module.properties +++ b/archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/main/resources/alfresco/module/__artifactId__/module.properties @@ -24,7 +24,7 @@ module.id=${project.artifactId} #module.aliases=myModule-123, my-module module.title=${project.name} module.description=${project.description} -module.version=${noSnapshotVersion} +module.version=${project.version} # The following optional properties can be used to prevent the module from being added # to inappropriate versions of the WAR file. diff --git a/archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/main/resources/alfresco/web-extension/__artifactId__-slingshot-application-context.xml b/archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/main/resources/alfresco/web-extension/__artifactId__-slingshot-application-context.xml new file mode 100644 index 00000000..2ed294d9 --- /dev/null +++ b/archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/main/resources/alfresco/web-extension/__artifactId__-slingshot-application-context.xml @@ -0,0 +1,29 @@ +#set($symbol_pound='#') +#set($symbol_dollar='$') +#set($symbol_escape='\' ) + + + + + + + + + + alfresco.web-extension.messages.${artifactId} + + + + + \ No newline at end of file diff --git a/archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/main/amp/config/alfresco/web-extension/messages/__artifactId__.properties b/archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/main/resources/alfresco/web-extension/messages/__artifactId__.properties similarity index 100% rename from archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/main/amp/config/alfresco/web-extension/messages/__artifactId__.properties rename to archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/main/resources/alfresco/web-extension/messages/__artifactId__.properties diff --git a/archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/main/amp/config/alfresco/web-extension/site-data/extensions/__artifactId__-example-widgets.xml b/archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/main/resources/alfresco/web-extension/site-data/extensions/__artifactId__-example-widgets.xml similarity index 86% rename from archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/main/amp/config/alfresco/web-extension/site-data/extensions/__artifactId__-example-widgets.xml rename to archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/main/resources/alfresco/web-extension/site-data/extensions/__artifactId__-example-widgets.xml index 08c3a80e..1e02188c 100644 --- a/archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/main/amp/config/alfresco/web-extension/site-data/extensions/__artifactId__-example-widgets.xml +++ b/archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/main/resources/alfresco/web-extension/site-data/extensions/__artifactId__-example-widgets.xml @@ -12,7 +12,7 @@ - + diff --git a/archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/main/amp/config/alfresco/web-extension/site-webscripts/com/example/pages/simple-page.get.desc.xml b/archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/main/resources/alfresco/web-extension/site-webscripts/com/example/pages/simple-page.get.desc.xml similarity index 100% rename from archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/main/amp/config/alfresco/web-extension/site-webscripts/com/example/pages/simple-page.get.desc.xml rename to archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/main/resources/alfresco/web-extension/site-webscripts/com/example/pages/simple-page.get.desc.xml diff --git a/archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/main/amp/config/alfresco/web-extension/site-webscripts/com/example/pages/simple-page.get.html.ftl b/archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/main/resources/alfresco/web-extension/site-webscripts/com/example/pages/simple-page.get.html.ftl similarity index 100% rename from archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/main/amp/config/alfresco/web-extension/site-webscripts/com/example/pages/simple-page.get.html.ftl rename to archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/main/resources/alfresco/web-extension/site-webscripts/com/example/pages/simple-page.get.html.ftl diff --git a/archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/main/resources/alfresco/web-extension/site-webscripts/com/example/pages/simple-page.get.js b/archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/main/resources/alfresco/web-extension/site-webscripts/com/example/pages/simple-page.get.js new file mode 100644 index 00000000..8cd0877d --- /dev/null +++ b/archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/main/resources/alfresco/web-extension/site-webscripts/com/example/pages/simple-page.get.js @@ -0,0 +1,29 @@ +model.jsonModel = { + widgets: [{ + id: "SET_PAGE_TITLE", + name: "alfresco/header/SetTitle", + config: { + title: "This is a sample HELLO page" + } + }, + { + id: "MY_HORIZONTAL_WIDGET_LAYOUT", + name: "alfresco/layout/HorizontalWidgets", + config: { + widgetWidth: 50, + widgets: [ + { + id: "DEMO_SIMPLE_LOGO", + name: "alfresco/logo/Logo", + config: { + logoClasses: "alfresco-logo-only" + } + }, + { + id: "DEMO_SIMPLE_MSG", + name: "tutorials/widgets/TemplateWidget" + } + ] + } + }] +}; \ No newline at end of file diff --git a/archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/main/amp/config/alfresco/web-extension/site-webscripts/org/alfresco/README.md b/archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/main/resources/alfresco/web-extension/site-webscripts/org/alfresco/README.md similarity index 100% rename from archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/main/amp/config/alfresco/web-extension/site-webscripts/org/alfresco/README.md rename to archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/main/resources/alfresco/web-extension/site-webscripts/org/alfresco/README.md diff --git a/archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/site/apt/advanced-usage.apt.vm b/archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/site/apt/advanced-usage.apt.vm deleted file mode 100644 index 07612ad3..00000000 --- a/archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/site/apt/advanced-usage.apt.vm +++ /dev/null @@ -1,62 +0,0 @@ - ------ - Share AMP Archetype Advanced Usage - ------ - Gabriele Columbro - ------ - Aug 2014 - ------ - -AMP Unit Testing - - Unit test your AMP customization is as easy as adding your tests in <<>>. The current module in development - will be added to the test classpath together with all necessary Alfresco Spring contexts. - - Running <<>> will results in your unit tests to be run. You can skip this (<<>>) - adding <<<-DskipTests>>> to your command line. - -Share AMP Archetype properties - - In the AMP archetype (as in the whole Part of the Alfresco SDK\x99) properties are configurable at many levels: - - * as POM properties - - * direclty in *.properties, particularly - - * <<>> (filtered and packaged in the AMP) - - * <</alfresco-global.properties>>> (environment dependent properties for WAR run embedded) - -* Common properties - - Archetype behavior can mostly be controlled directly in the POM, via common properties provided by the parent POM. - See {{{../../poms/alfresco-sdk-parent/sdk-properties.html} SDK properties reference}} for details. - - -* AMP specific properties - - In addition to the common properties, the following properties are specific of the AMP archetype. You can change - these properties to select a different WAR to install your AMP to (e.g. a pre-customized Alfresco or Share instance): - -+---+ - - ... - - - alfresco - ${alfresco.groupId} - ${alfresco.version} - - ... - -+---+ - -Parent POM and behavior customization - - To customize the behavior of your project, check out full set of the properties and plugin configurations defined in the - {{{../../poms/alfresco-sdk-parent/index.html}single entry point parent POM}}. - - One quick way to do that is to use the <<>> to analyze your POM at runtime. - diff --git a/archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/site/apt/index.apt.vm b/archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/site/apt/index.apt.vm deleted file mode 100644 index da730320..00000000 --- a/archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/site/apt/index.apt.vm +++ /dev/null @@ -1,52 +0,0 @@ - ------ - Building AMPs (Alfresco Module Packages) with Maven - ------ - Gabriele Columbro - ------ - Aug 2014 - ------ - -Introduction - - The Share AMP Archetype is a sample fully featured project to manage AMP (Alfresco Module Package) projects for Alfresco Share. - This archetype can be used for Alfresco Share. For Alfresco Repository AMPs, please refer to the {{{../alfresco-amp-archetype/index.html}Alfresco AMP archetype}} - -* Features - - Amongst other features, this archetype provides support for: - - * <<>> packaging support for your projects - - * AMP dependency management in Maven - - * Installation of AMPs in the Share WAR - - * AMP Unit Testing support. Just run the standard <<>> and see your <<>> Alfresco unit tests run. - An sample Unit Test is provided in this archetype. - - * Embedded run in Tomcat and embedded H2 database for demo purposes, rapid application development and integration testing. Share runs on port 8081 by default, but you can control - this setting with the <<>> pom property. - (<>: this is not a {{{http://www.alfresco.com/services/subscription/supported-platforms/} supported stack}} so use <>) - -How to create a project: - - You can create the latest release archetype with the following command: - -+---+ -mvn archetype:generate -DarchetypeCatalog=https://artifacts.alfresco.com/nexus/content/groups/public/archetype-catalog.xml -Dfilter=org.alfresco.maven.archetype: -+---+ - - You should then: - - [[1]] Select the <<>> option - - [[2]] Specify the <<>> and <<>> for the project you want to create - - [[3]] () Select Alfresco Version / Edition (current default is: Alfresco Community 5.0.c) - - You can find new Share AMP project ready to go in the <<>> folder. - -Usage - - Instructions on how to use the Share AMP archetype can be found on the {{{./usage.html}usage page}}, while - for more advanced use cases refer to the {{{./advanced-usage.html}advanced usage page}} diff --git a/archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/site/apt/usage.apt.vm b/archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/site/apt/usage.apt.vm deleted file mode 100644 index 6c3f8b56..00000000 --- a/archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/site/apt/usage.apt.vm +++ /dev/null @@ -1,73 +0,0 @@ - ------ - Share AMP Archetype Usage - ------ - Gabriele Columbro - ------ - Nov 2012 - ------ - - -Prerequisites - - See {{{../../prerequisites.html}SDK Pre-Requisites}} to successfully run this archetype. - - -Project layout - - The archetype generated project should look like: - -+---+ - - pom.xml - src/main/amp - |-> module.properties - |-> file-mapping.properties (optional) - |-> config/ - |-> web/ - |-> licenses/ - src/main/java //Java classes to be packaged in the AMP embedded JAR) - src/main/resources //resources to the packaged in the AMP embedded JAR - src/main/resources/META-INF/resource //resources to the packaged in the AMP embedded JAR/META-INF and automatically mapped to the root of the webapp - src/test/java // Unit tests - src/test/resources // Unit test resources - src/test/properties/ // Environment aware alfresco-global.properties. By default =local - -+---+ - - Basically by default the folder <<>> maps the {{{https://wiki.alfresco.com/wiki/AMP_Files#The_structure_of_an_AMP_file}AMP structure}} and it's where you can build your module. - -Usage - - This project manages an AMP and provides support for typical development lifecycle use cases like: - - * packaging - - * rapid development - - * testing (unit and integration) - - * run embedded - - * integration testing - - * release and distribution of your AMP artifact. - - The AMPs produced with this project are fully compatible with Alfresco MMT, in fact the Maven Alfresco plugin used to manage AMPs in this SDK embeds the official Alfresco MMT to install depdended AMPs. - -Commands - - Common AMP project lifecycle commands you want to run are: - - * <<>>: Runs unit tests and packages AMP in <<<$\{project.build.directory\}/$\{project.build.finalName\}.amp>>> - - * <<>>: Like <<>> but also installs AMP in local Maven repository to be depended upon - - * <<>>: Like <<>> but skips unit tests - - * <<>> Like <<>> - but also installs and runs the resulting WAR+AMP in Tomcat + H2 embedded from running and development. - This also enables rapid application development features, like hot reloading and remote JUnit running. - When you run this command then you can access in your browser <<< {{{http://localhost:8081/share}}} >>>. - - * <<>>: Removes DB, alf_data, indexes and log files. Useful to purge the development repo (by default self contained in <<<$\{project.basedir\}/alf_data_dev>>> - diff --git a/archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/site/site.xml b/archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/site/site.xml deleted file mode 100644 index 1751116a..00000000 --- a/archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/site/site.xml +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/test/resources/alfresco/web-extension/share-config-custom.xml b/archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/test/resources/alfresco/web-extension/share-config-custom.xml deleted file mode 100644 index 203f37ab..00000000 --- a/archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/test/resources/alfresco/web-extension/share-config-custom.xml +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - - production - - - - false - - - - - - - - true - - false - - - - - - - - - - - - - alfresco-noauth - Alfresco - unauthenticated access - Access to Alfresco Repository WebScripts that do not require authentication - alfresco - ${alfresco.repo.url}/s - none - - - - alfresco - Alfresco - user access - Access to Alfresco Repository WebScripts that require user authentication - alfresco - ${alfresco.repo.url}/s - user - - - - alfresco-feed - Alfresco Feed - Alfresco Feed - supports basic HTTP authentication via the EndPointProxyServlet - http - ${alfresco.repo.url}/s - true - user - - - - activiti-admin - Activiti Admin UI - user access - Access to Activiti Admin UI, that requires user authentication - activiti-admin-connector - ${alfresco.repo.url}/activiti-admin - user - - - - - diff --git a/archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/test/resources/log4j.properties b/archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/test/resources/log4j.properties deleted file mode 100644 index 280996b9..00000000 --- a/archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/test/resources/log4j.properties +++ /dev/null @@ -1,52 +0,0 @@ -# This file is copied from Alfresco Share 5.0.d -# Overrides tomcat/webapps/share/WEB-INF/classes/log4j,properties -# and sets new file location from property and log level from property. -# - -# Set root logger level to error -log4j.rootLogger=${app.log.root.level}, Console, File - -###### Console appender definition ####### - -# All outputs currently set to be a ConsoleAppender. -log4j.appender.Console=org.apache.log4j.ConsoleAppender -log4j.appender.Console.layout=org.apache.log4j.PatternLayout - -# use log4j NDC to replace %x with tenant domain / username -log4j.appender.Console.layout.ConversionPattern=%d{ISO8601} %x %-5p [%c{3}] [%t] %m%n -#log4j.appender.Console.layout.ConversionPattern=%d{ABSOLUTE} %-5p [%c] %m%n - -###### File appender definition ####### -log4j.appender.File=org.apache.log4j.DailyRollingFileAppender -log4j.appender.File.File=${app.log.dir}alfresco.log -log4j.appender.File.Append=true -log4j.appender.File.DatePattern='.'yyyy-MM-dd -log4j.appender.File.layout=org.apache.log4j.PatternLayout -log4j.appender.File.layout.ConversionPattern=%d{yyyy-MM-dd} %d{ABSOLUTE} %-5p [%c] [%t] %m%n - -# Spring -log4j.logger.org.springframework=warn -# Turn off Spring remoting warnings that should really be info or debug. -log4j.logger.org.springframework.remoting.support=error -log4j.logger.org.springframework.util=error - -# MyFaces -log4j.logger.org.apache.myfaces.util.DebugUtils=info -log4j.logger.org.apache.myfaces.el.VariableResolverImpl=error -log4j.logger.org.apache.myfaces.application.jsp.JspViewHandlerImpl=error -log4j.logger.org.apache.myfaces.taglib=error - -# Alfresco -log4j.logger.org.alfresco=error -log4j.logger.org.alfresco.config=warn -log4j.logger.org.alfresco.config.JndiObjectFactoryBean=warn -log4j.logger.org.alfresco.web=info - -# Web Framework -log4j.logger.org.springframework.extensions.webscripts=info -log4j.logger.org.springframework.extensions.webscripts.ScriptLogger=warn -log4j.logger.org.springframework.extensions.webscripts.ScriptDebugger=off - -# Freemarker -# Note the freemarker.runtime logger is used to log non-fatal errors that are handled by Alfresco's retrying transaction handler -log4j.logger.freemarker.runtime= \ No newline at end of file diff --git a/archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/tomcat/context.xml b/archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/tomcat/context.xml deleted file mode 100644 index 58a995fa..00000000 --- a/archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/tomcat/context.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - - - - -