diff --git a/maven-alfresco-archetypes/maven-alfresco-amp-archetype/pom.xml b/maven-alfresco-archetypes/maven-alfresco-amp-archetype/pom.xml index 59a007fb..2f22a96b 100644 --- a/maven-alfresco-archetypes/maven-alfresco-amp-archetype/pom.xml +++ b/maven-alfresco-archetypes/maven-alfresco-amp-archetype/pom.xml @@ -51,6 +51,20 @@ 2.0-alpha-3 + + + org.apache.maven.plugins + maven-release-plugin + 2.0-beta-7 + + + + clean package + deploy site:depoy changes:announcement-mail + ${svn.tags.url} + + + diff --git a/maven-alfresco-archetypes/maven-alfresco-amp-archetype/src/main/resources/archetype-resources/README.txt b/maven-alfresco-archetypes/maven-alfresco-amp-archetype/src/main/resources/archetype-resources/README.txt index 94a7efb0..2875f453 100644 --- a/maven-alfresco-archetypes/maven-alfresco-amp-archetype/src/main/resources/archetype-resources/README.txt +++ b/maven-alfresco-archetypes/maven-alfresco-amp-archetype/src/main/resources/archetype-resources/README.txt @@ -64,20 +64,17 @@ all AMP and WAR dependencies specified) also with a sensible default 'alfresco/e default alfresco run. Find these test configuaration files in 'src/test/resources' and environment dependent properties in src/test/properties//application.properties -SOON TO COME: ------------- - -- Shared configuration (site + release + plugin config) with maven-alfresco-extension-archetype via super POM - - PROJECT LAYOUT -------------- src --------------------------------------------------------> (source folder) | - |__ main ___ __ resources --------------------------> mapped in the classpath (alfresco module config goes here, as well as other classpath resources) - | | | NB: best practice groupId.artifactId=moduleId is used by the archetype and by the AMP unpacker - | | |__ ex: alfresco/module/com.sourcesense.${artifactId} ---> Example Alfresco module config + |__ main ___ __ resources --------------------------> mapped in the classpath. Add here classpath resources + | | + | |__ config----- alfresco module config goes here. + | | | Get's copied (by best practice) by build into package alfresco/module/groupId.artifactId. + | | | This convention is used by the archetype and by the AMP unpacker. + | | |__ ex: alfresco/module/com.sourcesense.alfresco.mymodule ---> Example Alfresco module config | | | | | |__ java -------------------------------> customization java classes @@ -92,38 +89,7 @@ src --------------------------------------------------------> (source folder) | | | | | |__ local -------------> default application.properties | | - -target - Project build dir + | + target - Project build dir -FAQ: ----- ---- Eclipse configuration --Run ' mvn eclipse:eclipse ' --hit "Refresh" on your Eclipse project - ---- Db access problems: -Remember to setup appropriate permissions for selected db / build profile. -You can either edit accordingly and then run: mysql -u root < tools/mysql/db_setup.sql - -or if you use POM property 'alfresco.db.name' you have sql files already filtered (after process-resources phase) in - -mysql -u root -p < target/classes/tools/[db_setup,db_remove].sql - ---- Out of memory errors: -Run your build with : -MAVEN_OPTS="-Xms256m -Xmx512m -XX:PermSize=128m" mvn ... ... - ---- Content integrity errors on restore running with jetty embedded -Did you remove also alf_data_jetty apart from the alf_jetty db ? - ---- Release Problems with LC_ALL -If underlying svn complains about LC_ALL variable please consider running your release prepending: -LC_ALL="C" (macosx environments, see http://svn.haxx.se/users/archive-2006-07/0320.shtml) - --- Deploy a generally available AMP into a maven repo for dependency usage - -mvn deploy:deploy-file -DrepositoryId=repo --Dfile=/Users/youruser/projectz/alfresco/alfresco-recordsmanagement-2.1.0.amp --DgroupId=org.alfresco.community -DartifactId=recordsmanagement -Dversion=2.1.0 --Dpackaging=amp -Durl=scp://... \ No newline at end of file diff --git a/maven-alfresco-archetypes/maven-alfresco-amp-archetype/src/site/apt/layout.apt.vm b/maven-alfresco-archetypes/maven-alfresco-amp-archetype/src/site/apt/layout.apt.vm new file mode 100644 index 00000000..3c4a6397 --- /dev/null +++ b/maven-alfresco-archetypes/maven-alfresco-amp-archetype/src/site/apt/layout.apt.vm @@ -0,0 +1,43 @@ + ----- + Archetype Project Generated Layout + ----- + + + +What do I have when I created the project? + + You will encounter an AMP project structure, filtered with values you provided in creation phase, + which has the following layout: + + +------------------------------------------------------------------ + + +src --------------------------------------------------------> (source folder) + | + |__ main ___ __ resources --------------------------> mapped in the classpath. Add here classpath resources + | | + | |__ config----- alfresco module config goes here. + | | | Get's copied (by best practice) by build into package alfresco/module/groupId.artifactId. + | | | This convention is used by the archetype and by the AMP unpacker. + | | |__ ex: alfresco/module/com.sourcesense.alfresco.mymodule ---> Example Alfresco module config + | | + | | + | |__ java -------------------------------> customization java classes + | | + | |__ webapp -----------------------------> AMP overlay folder - this folder is overlayed (so may overwrite other dependent AMPs) + + | + |__ test __ __ resources _ + | | | + | | |__ alfresco/extension ---> alfresco overriding Spring contexts + | | + | |__ properties -------------------------> environment aware application properties files + | | | + | | |__ local -------------> default application.properties + | | + | + target - Project build dir + +------------------------------------------------------------------ + diff --git a/maven-alfresco-archetypes/maven-alfresco-amp-archetype/src/site/apt/readme.apt.vm b/maven-alfresco-archetypes/maven-alfresco-amp-archetype/src/site/apt/readme.apt.vm index e69de29b..a16f3532 100644 --- a/maven-alfresco-archetypes/maven-alfresco-amp-archetype/src/site/apt/readme.apt.vm +++ b/maven-alfresco-archetypes/maven-alfresco-amp-archetype/src/site/apt/readme.apt.vm @@ -0,0 +1,56 @@ + ----- + Alfresco maven2 AMP lifecycle + ----- + + +What an AMP is? + + Alfresco Module packages are software modules to be added on top of the Alfresco ECM + platform. \ + As opposed to Alfresco Extensions (which can be generated with {{{http://repository.sourcesense.com/maven2-sites/maven-alfresco-extension-archetype} maven-alfresco-extension-archetype }}) + which are meant to mainly produce a single customized build of Alfresco, an AMP is a small + ZIP file primary product of the build lifecyle defined by the + + +--------- + amp +--------- + + POM property. Use this build to create and modules which then can be used as dependencies + by a maven-alfresco-extension generated project (e.g. enterprise Alfresco WAR customization). + + + +One command quickstart + + +------------- + $ MAVEN_OPTS="-Xms256m -Xmx512m -XX:PermSize=128m" mvn clean integration-test -P webapp +---------------- + + + will runns the jetty embedded with overlayed the currently developed AMP + + +FEATURES: + + + + AMP archetype + plugin features: + + * AMP customized build : <<>> + + * Alfresco webapp integrationt test via war creation and embedded run <<>> + + * Install/deployment of Alfresco compatible AMPs on a m2 repo <<< mvn install / deploy [ params ] >>> + + * using the {{{http://repository.sourcesense.com/maven2-sites/maven-amp-plugin} maven-amp-plugin}} WAR can depend on AMP artifacts and have them overlayed within the maven lifecycle, avoiding the boring MMT run. + + * AMP dependencies management: <<>> can take care of overlay AMP deps + + * Error safe single sourcing of POM properties <<>> and <<>> used to copy config in the proper package and to ensure consistency + + + Specific dependencies and different Alfresco versions can be specified in 'webapp' profile dependecies. Alfresco test webapp is overlayed (apart with + all AMP and WAR dependencies specified) also with a sensible default 'alfresco/extension' folder to have a clean safe reproduceable and portable + default alfresco run. Find these test configuaration files in 'src/test/resources' and environment dependent properties in src/test/properties//application.properties diff --git a/maven-alfresco-archetypes/maven-alfresco-amp-archetype/src/site/fml/faq.fml b/maven-alfresco-archetypes/maven-alfresco-amp-archetype/src/site/fml/faq.fml index f595bc70..5c90273d 100644 --- a/maven-alfresco-archetypes/maven-alfresco-amp-archetype/src/site/fml/faq.fml +++ b/maven-alfresco-archetypes/maven-alfresco-amp-archetype/src/site/fml/faq.fml @@ -5,9 +5,10 @@ How do I build an AMP? -

- Just Run mvn clean package -

+

+ Just Run + mvn clean package +

@@ -15,7 +16,7 @@

You can run Jetty embedded in maven by typing - mvn clean integration-test -P webapp + mvn clean integration-test -P webapp

@@ -23,11 +24,9 @@ Are AMP transitive dependencies supported?

- Yes, they are, both from AMP and WAR packaging projects. - For AMP projects this will turn out into having a final built AMP - which contains all the chain of AMPs the current AMP is depending upon. - For WAR projects all AMPs will be unpacked in the proper position - same as the MMT would do. + Yes, they are, both from AMP and WAR packaging projects. For AMP projects this will turn out into having a final built AMP which + contains all the chain of AMPs the current AMP is depending upon. For WAR projects all AMPs will be unpacked in the proper + position same as the MMT would do.

@@ -35,12 +34,39 @@ Is MMT needed with maven?

- No, it is not. The whole point of it is getting rid of the annoying - non integrated in the lifecycle MMT run. - We created the maven-amp-plugin for - managing and processing AMP lifecycle, making MMT obsolete. + No, it is not. The whole point of it is getting rid of the annoying non integrated in the lifecycle MMT run. We created the + maven-amp-plugin + for managing and processing AMP lifecycle, making MMT obsolete.

+ + Developer questions + + How do I configure Eclipse? + +
    +
  • Run mvn eclipse:eclipse
  • +
  • hit "Refresh" on your Eclipse project
  • +
+
+
+ + Why I get PermGen or HeapSpace errors + +

Run your build with : MAVEN_OPTS="-Xms256m -Xmx512m -XX:PermSize=128m" mvn ...

+
+
+ + How do I deploy a generally available AMP into a maven repo for dependency usage + + + mvn deploy:deploy-file -DrepositoryId=repo -Dfile=/Users/youruser/projectz/alfresco/alfresco-recordsmanagement-2.1.0.amp + -DgroupId=org.alfresco.community -DartifactId=recordsmanagement -Dversion=2.1.0 -Dpackaging=amp -Durl=scp://... + + + +
+ \ No newline at end of file diff --git a/maven-alfresco-archetypes/maven-alfresco-amp-archetype/src/site/site.xml b/maven-alfresco-archetypes/maven-alfresco-amp-archetype/src/site/site.xml index 6e826fbd..bec51a1f 100644 --- a/maven-alfresco-archetypes/maven-alfresco-amp-archetype/src/site/site.xml +++ b/maven-alfresco-archetypes/maven-alfresco-amp-archetype/src/site/site.xml @@ -23,10 +23,17 @@ - - + - + + + + + + + + + diff --git a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/pom.xml b/maven-alfresco-archetypes/maven-alfresco-extension-archetype/pom.xml index d5d90ae5..9238bb8f 100644 --- a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/pom.xml +++ b/maven-alfresco-archetypes/maven-alfresco-extension-archetype/pom.xml @@ -60,6 +60,20 @@ --> + + + org.apache.maven.plugins + maven-release-plugin + 2.0-beta-7 + + + + clean package + deploy site:depoy changes:announcement-mail + ${svn.tags.url} + + + diff --git a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/apt/layout.apt.vm b/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/apt/layout.apt.vm new file mode 100644 index 00000000..89a790f0 --- /dev/null +++ b/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/apt/layout.apt.vm @@ -0,0 +1,44 @@ + ----- + Archetype Project Generated Layout + ----- + + + +What do I have when I created the project? + + You will encounter an AMP project structure, filtered with values you provided in creation phase, + which has the following layout: + + +------------------------------------------------------------------ + + +src --------------------------------------------------------> (source folder) + | + |__ main ___ __ resources --------------------------> mapped in the classpath + | | | + | | |__ alfresco/extension ---> alfresco overriding Spring contexts + | | + | |__ properties -------------------------> environment aware application properties files + | | | + | | |__ local -------------> default application.properties + | | + | |__ java -------------------------------> customization java classes + | | + | |__ webapp -----------------------------> alfresco webapp overlay folder - this folder is overlayed (so may overwrite alfresco war) + | | + | |__ WEB-INF ----------------> drop in this folder WEB-INF custom / overwriting files (e.g. faces-config-custom.xml / web.xml) + | + |__ test + +tools -- + |__ ant ---------------------------------------------> ant tools + |__ m2 ---------------------------------------------> maven2 tools + |__ export ------------------------------------------> support folder for automatic restore (drop acp+xml files here) + |__ mysql -------------------------------------------> mysql setup/remove scripts, filtered based on the profile into + +target - Project build dir + + +------------------------------------------------------------------ + diff --git a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/apt/readme.apt.vm b/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/apt/readme.apt.vm index daa4bb39..0912c8e6 100644 --- a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/apt/readme.apt.vm +++ b/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/apt/readme.apt.vm @@ -63,16 +63,10 @@ Features (maven2 only): Through Doxia also PDF and RTF output is supported from single sourced source files (apart from Doxia limitations) for easy enterprise integration. \ To test an example typing <<>> will run your site in jetty embedded on port 8080, with redeployment of site source files. To stage the site just type <<>> and to deploy to remote site location, guess what, <<>> - -TODO: - - See ${svn.url}/TODO.txt - - -ROADMAP: - - See ${svn.url}/ROADMAP.txt - + + * <> + Using the maven-amp-plugin as pre configured in the archetype we're able to handle + AMP transitive dependencies and having them packaged in the WAR REFERENCES: diff --git a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/site.xml b/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/site.xml index d99182c9..0834cc4a 100644 --- a/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/site.xml +++ b/maven-alfresco-archetypes/maven-alfresco-extension-archetype/src/site/site.xml @@ -1,33 +1,40 @@ - org.apache.maven.skins - maven-stylus-skin - 1.0 + org.apache.maven.skins + maven-stylus-skin + 1.0 - - + + - - - Maven alfresco Extension archetype - v. ${project.version} - ${site_site_url} - images/logo_noclaim.png - - - - - - + + + Maven alfresco Extension archetype - v. ${project.version} + ${site_site_url} + images/logo_noclaim.png + + + + + + - - - - - - - - + + + + + + + - + + + + + + + + diff --git a/maven-alfresco-archetypes/pom.xml b/maven-alfresco-archetypes/pom.xml index fe043039..48722cb2 100644 --- a/maven-alfresco-archetypes/pom.xml +++ b/maven-alfresco-archetypes/pom.xml @@ -22,7 +22,6 @@ maven-alfresco-amp-archetype maven-alfresco-extension-archetype - maven-alfresco-archetypes-base https://maven-alfresco-archetypes.googlecode.com/svn @@ -129,18 +128,6 @@ g.columbro - - org.apache.maven.plugins - maven-release-plugin - 2.0-beta-7 - - - - clean package - deploy site:site site:deploy - ${svn.tags.url} - - org.apache.maven.plugins maven-release-plugin @@ -148,7 +135,7 @@ true clean package - deploy site:site site:deploy + deploy ${svn.tags.url} diff --git a/maven-alfresco-archetypes/src/site/site.xml b/maven-alfresco-archetypes/src/site/site.xml deleted file mode 100644 index 9e044dee..00000000 --- a/maven-alfresco-archetypes/src/site/site.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - org.apache.maven.skins - maven-stylus-skin - 1.0 - - - - - - - - Maven alfresco archetypes - v. ${project.version} - ${site_site_url} - http://www.sourcesense.com/resources/images/top.gif - - - - - - - - - - - - - - - -