diff --git a/archetypes/alfresco-allinone-archetype/src/main/resources/archetype-resources/README.txt b/archetypes/alfresco-allinone-archetype/src/main/resources/archetype-resources/README.txt deleted file mode 100644 index 2a9cc811..00000000 --- a/archetypes/alfresco-allinone-archetype/src/main/resources/archetype-resources/README.txt +++ /dev/null @@ -1,128 +0,0 @@ -************* -Prerequisites -************* - -- The only prerequisite to follow reading this document is to have Apache Maven 3.0.3+ (or higher) installed -on your machine; there is no preferred IDE nor web container and database requirements needed. - -- It is strongly advised to use the Apache Maven official binary distributions downloaded from maven.apache.org; avoid -OS-specific distributions as much as possible. - -- add MAVEN_OPTS="-Xms256m -Xmx1G -XX:PermSize=300m" to your environment if your plan to launch tests / run embedded in Jetty - -***** -Usage -***** -This multi-module project manages an All-in-One Alfresco project and it's composed by the following modules: -- amp --> An Repository Tier AMP project, demonstrating sample project structure and demo component loading. Can be configured to work for Share -- alfresco --> An alfresco.war Repository Extension, overlaying the Alfresco WAR with custom resources / classes and depending on the 'amp' project -- share --> A share.war extension, overlaying the Share WAR with custom resoruces / classes -- solr --> A solr.zip overlay / customization to configure solr cores properties - -The project provides support for typical development lifecycle use cases like: -- packaging -- testing -- run embedded -- integration testing -- release and distribution - -of your Alfresco (and platform components) related artifacts. The AMPs produced with this project are fully compatible with Alfresco MMT, -in fact the Alfresco Maven plugin - used to manage AMPs in this SDK - embeds the official Alfresco MMT to install depended AMPs. - -Project layout: --------------- -parent-project - |-> amp - |-> alfresco - |-> share - |-> solr - |-> wcmqs (Alfresco Web Quick Start) - |-> runner (a Jetty embedded runner / integration test runner) - -Useful commands ---------------- -Running from parent project: -- mvn package --> Runs unit tests (if present) and packages all modules in their respective target/ -- mvn install --> Runs unit tests (if present) , packages and installs AMP in local Maven repository -- mvn install -Dmaven.test.skip=true --> Packages and installs AMP in local Maven repository, skipping tests -- mvn integration-test -Prun --> Runs unit tests and packages all modules and the runner project runs Alfresco, Share and Solr in Jetty + H2 -- mvn clean -Ppurge --> Removes DB, alf_data and log files - -Running from runner: -- 'mvn jetty:run -Prun' or 'mvn integration-test -Prun' to quickly run already packaged webapps - -Properties management ---------------------- -Properties are configurable at 2 levels: -- POM properties (in the parent POM or at single module level) -- direclty in each modules *.properties files, particularly - - src/main/properties//alfresco-global.properties (environment dependent properties for Alfresco WARs) - -Useful properties that can be fully controlled directly in the POM are: - -alfresco.data.location (default = alf_data_dev) -alfresco.db.name (default = alf_dev) -app.log.dir (default = target/) -app.log.root.level (default = INFO) - -*************************** -Maven Alfresco SDK Overview -*************************** - -The Maven Alfresco SDK is an effort that have been developing in the last 5 years - mostly driven by community efforts on -Google Code (http://code.google.com/p/maven-alfresco-archetypes) - which delivers archetypes for building Alfresco -integration project with Maven; builds are based on Alfresco Community and Enterprise artifacts released on the -Alfresco Artifacts Repository at https://artifacts.alfresco.com - -The Maven Alfresco SDK is full rewriting of the Maven Alfresco Lifecyle (latest version 3.9.1) and it's composed of 3 efforts: - -a) POM files: - - alfresco-sdk-parent: provides lifecycle features and behaviors for typical Alfresco development projects - - alfresco-platform-distribution: describes and provides dependencyManagement for artifacts of each Alfresco release - -b) alfresco-maven-plugin: - - defines the AMP packaging type and lifecycle in Maven - - emdeds Alfresco MMT to provide safe installation of single / multiple AMP -> WAR - - will potentially grow including more use cases around Alfresco / Maven - -c) The definition of (initially 2) archetypes that show some simple project's configuration using -the parent POMs - - AMP archetype (this archetype) - - All-in-One multi-module archetype including - - Alfresco Repository AMP - - Alfresco Repository extension project (WAR, also depending on the AMP) - - Share customization project (WAR) - - Solr customization project (WAR) - - Jetty embedded runner for the full platform (mvn clean install -Prun) - - -**************************************** -Why using this SDK might be a good idea? -**************************************** -The main reported advantages of using the Maven Alfresco SDK are: - -- IDE-independent SDK, all build-related features are provided by Apache Maven, which is the only -prerequisite to use this SDK - -- No IDE manual configuration, all modern IDEs offer advanced Maven integrations, so -feel free to use Eclipse, IntelliJ, or any other IDE to write your code and leverage Maven - -- Process ready: scales from quick start rapid application development, to be seamlessly -integrated in enterprise devleopment processes like Continuous Integration and Release - -- Language independent, you don't like Maven? You can still use Ant, Ivy, Buildr, Gradle, Leiningen or any other build -system that is compatible with Maven artifact resolution mechanism; just configure artifacts.alfresco.com as (one of) your -Maven repositories and you're ready to go - -- Javadoc and Sources support, provided by artifacts.alfresco.com related Maven artifacts; you don't need to manually -configure your IDE to attach (manually downloaded) sources to your (manually downloaded) binaries. - -- Clean and readable, the build logic related with OOTB Alfresco features is wrapped in 50 lines of pom.xml - -- Advanced build functionality, inherited by your parent POMs you can use embedded databases and j2ee -containers with (almost) no configuration at all, among other features exposed below. - -- One mvn command to generate, one mvn command to run embedded, this is all you need to do to have a local Alfresco running -on an empty laptop - -- Supports community and enterprise flawlessly, allowing to switch one to another very easily \ No newline at end of file diff --git a/archetypes/alfresco-allinone-archetype/src/site/apt/advanced-usage.apt.vm b/archetypes/alfresco-allinone-archetype/src/site/apt/advanced-usage.apt.vm new file mode 100644 index 00000000..f544e865 --- /dev/null +++ b/archetypes/alfresco-allinone-archetype/src/site/apt/advanced-usage.apt.vm @@ -0,0 +1,39 @@ + ------ + Alfresco Maven AMP Archetype Advanced Usage + ------ + Gabriele Columbro + ------ + Nov 2012 + ------ + + +All-in-One Archetype properties + + In each of the modules of the archetype (as in the whole Maven Alfresco SDK\x99) properties are configurable at many levels: + + * as POM properties + + * direclty in *.properties, particularly + + * For Alfresco WAR projects + + * <</alfresco-global.properties>>> (environment dependent <<>> packaged in the WAR ) + + * For Alfresco AMP projects + + * <</alfresco-global.properties>>> (environment dependent <<>> for test WAR run) + + Build Environment (e.g. local, test, staging, prod) can be easily switched by setting the <<<>>> property in yoru POM or + adding <<<-Denv=yourEnv>>> on the command line. + +* 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. + +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. \ No newline at end of file diff --git a/archetypes/alfresco-allinone-archetype/src/site/apt/index.apt.vm b/archetypes/alfresco-allinone-archetype/src/site/apt/index.apt.vm new file mode 100644 index 00000000..cf3d493d --- /dev/null +++ b/archetypes/alfresco-allinone-archetype/src/site/apt/index.apt.vm @@ -0,0 +1,48 @@ + ------ + Building AMPs (Alfresco Module Packages) with Maven + ------ + Gabriele Columbro + ------ + Nov 2012 + ------ + +Alfresco All-in-One Archetype - Part of the Maven Alfresco SDK\x99 + + The Alfresco All-in-One Archetype is a multi-module project, + leveraging Maven Alfresco SDK\x99 powerful capabilities to customize and run the full Alfresco platform embedded and all it's components. + The archetype does not require additional download and provides a perfect starting point for full-blown Alfresco projects. + +* Features + + Amongst other features, this archetype provides support for: + + * <<>> packaging support for your projects + + * AMP Dependency management and overlay in an Alfresco Repository or Share WAR + + * Embedded run in Jetty and embedded H2 database of the full Alfresco suite, including Repository, Share, Solr and Web Quick Start + + * Support for unit and integration testings + +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 ++---+ + + 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 4.2.b) + + You can find new Alfresco All-in-One project ready to go in the <<>> folder. + +Usage + + Instructions on how to use the Alfresco AMP archetype can be found on the {{{./usage.html}usage page}}, while + for more advanced use cases refer to the {{{./advanced-usage.html}usage page}} diff --git a/archetypes/alfresco-allinone-archetype/src/site/apt/usage.apt.vm b/archetypes/alfresco-allinone-archetype/src/site/apt/usage.apt.vm new file mode 100644 index 00000000..2937fdc8 --- /dev/null +++ b/archetypes/alfresco-allinone-archetype/src/site/apt/usage.apt.vm @@ -0,0 +1,87 @@ + ------ + Alfresco Maven AMP Archetype Usage + ------ + Gabriele Columbro + ------ + Nov 2012 + ------ + +Prerequisites + + See {{{/prerequisites.html} SDK Pre-Requisites}} to successfully run this archetype. + +Project layout + + The archetype generated multi-module project should look like: + ++---+ + pom.xml + |-> amp + |-> alfresco + |-> share + |-> solr + |-> wcmqs (Alfresco Web Quick Start) + |-> runner (a Jetty embedded runner / integration test runner) ++---+ + +* Modules + + The All-in-One Alfresco project is composed by the following modules: + + * <<>>: An Repository Tier AMP project, demonstrating sample project structure and demo component loading. It can be configured to work for Share + + * <<>>: An <<>> Repository Extension, overlaying the Alfresco WAR with custom resources / classes + and depending on the <<>> project + + * <<>>: A <<>> extension, overlaying the Share WAR with custom resoruces / classes + + * <<>>: An Alfresco <<>> overlay / customization to configure {{{http://solr.apache.org}Apache Solr}} cores properties + + * <<>>: An Alfresco Web Quick Start overlay / customization. WQS Repository and Share AMPs are also installed on Alfresco and Share. + + * <<>>: A Jetty + H2 runner, capable of running all the aforementioned projects in embedded mode for demo / integration-testing purposes + +Usage + + The project provides support for typical development lifecycle use cases like + + * AMP/WAR packaging + + * AMP Unit testing + + * run embedded in Jetty + H2 database. + (<>: this is not a {{{http://www.alfresco.com/services/subscription/supported-platforms/} supported stack}} so use <>) + + * Integration testing + + * AMP to WAR installation and overlay (embedding {{{http://wiki.alfresco.com/wiki/Module_Management_Tool}Alfresco Module Managment Tool}}) + + * release and distribution + + for all the components of the Alfresco landscape. + + <>: AMPs produced with this project are fully compatible with Alfresco MMT,in fact the Alfresco Maven plugin - used to manage AMPs in this SDK - embeds the official Alfresco MMT to install depended AMPs. + +Commands + +* Commands from the root aggregator project + + Common Alfresco project lifecycle commands you want to run from the aggregator : + + * <<>>: Runs unit tests and packages all customized modules in their respective \${project.build.directory}/\${project.build.finalName}.amp + + * <<>>: Like <<>> but also installs all modules in local Maven repository to be depended upon + + * <<>>: Like <<>> but skips unit tests + + * <<>>: Like <<>> but also trigger the <<>> project to run Alfresco, Share, Solr and Web Quick Start in Jetty (with H2 embedded database) + + * <<>>: Removes DB, alf_data and log files + +* Commands from from the <<>> project + + * <<>> or <<<'mvn integration-test -Prun'>>> to quickly run already packaged webapps + +Advanced usage + + See the {{{./advanced-usage.html}advanced usage page}} diff --git a/archetypes/alfresco-allinone-archetype/src/site/site.xml b/archetypes/alfresco-allinone-archetype/src/site/site.xml new file mode 100644 index 00000000..0bd3ff2a --- /dev/null +++ b/archetypes/alfresco-allinone-archetype/src/site/site.xml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/archetypes/alfresco-amp-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml b/archetypes/alfresco-amp-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml index a9e228f7..51ae2384 100644 --- a/archetypes/alfresco-amp-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml +++ b/archetypes/alfresco-amp-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml @@ -63,11 +63,5 @@ **/*.xml - - - - *.txt - - diff --git a/archetypes/alfresco-amp-archetype/src/main/resources/archetype-resources/README.txt b/archetypes/alfresco-amp-archetype/src/main/resources/archetype-resources/README.txt deleted file mode 100644 index fa3ced6f..00000000 --- a/archetypes/alfresco-amp-archetype/src/main/resources/archetype-resources/README.txt +++ /dev/null @@ -1,123 +0,0 @@ -************* -Prerequisites -************* - -- The only prerequisite to follow reading this document is to have Apache Maven 3.0.3+ (or higher) installed -on your machine; there is no preferred IDE nor web container and database requirements needed. - -- It is strongly advised to use the Apache Maven official binary distributions downloaded from maven.apache.org; avoid -OS-specific distributions as much as possible. - -- add MAVEN_OPTS="-Xms256m -Xmx1G -XX:PermSize=300m" to your environment if your plan to launch tests / run embedded in Jetty - -***** -Usage -***** -This project manages an AMP and provides support for typical development lifecycle use cases like: -- packaging -- testing -- 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 Alfresco Maven plugin used to manage AMPs in this SDK embeds the official Alfresco MMT to install depdended AMPs. - -Project layout: --------------- -- src/main/amp (maps the AMP structure, as per https://wiki.alfresco.com/wiki/AMP_Files#The_structure_of_an_AMP_file) - |-> module.properties - |-> file-mappings.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) - -Useful commands ---------------- -- mvn package --> Runs unit tests and packages AMP in target/ -- mvn install --> Runs unit tests, packages and installs AMP in local Maven repository -- mvn install -Dmaven.test.skip=true --> Packages and installs AMP in local Maven repository, skipping tests -- mvn package -Pamp-to-war --> Runs unit tests and packages AMP onto Alfresco WAR in target/ -- mvn integration-test -Pamp-to-war --> Runs unit tests, packages AMP onto Alfresco WAR and runs in Jetty + H2 embedded for integration testing -- mvn integration-test -Pamp-to-war -Dalfresco.client.war=share --> Runs unit tests, packages AMP onto Share WAR and runs in Jetty + H2 embedded for integration testing -- mvn clean -Ppurge --> Removes DB, alf_data and log files - -Properties management ---------------------- -Properties are configurable at 2 levels: -- POM properties -- direclty in *.properties, particularly - - src/main/amp/module.properties (filtered and packaged in the AMP) - - src/test/properties//alfresco-global.properties (environment dependent properties for WAR run embedded) - -Useful properties that can be fully controlled directly in the POM are: - -alfresco.data.location (default = alf_data_dev) -alfresco.db.name (default = alf_dev) -app.log.dir (default = target/) -app.log.root.level (default = INFO) - -*************************** -Maven Alfresco SDK Overview -*************************** - -The Maven Alfresco SDK is an effort that have been developing in the last 5 years - mostly driven by community efforts on -Google Code (http://code.google.com/p/maven-alfresco-archetypes) - which delivers archetypes for building Alfresco -integration project with Maven; builds are based on Alfresco Community and Enterprise artifacts released on the -Alfresco Artifacts Repository at https://artifacts.alfresco.com - -The Maven Alfresco SDK is full rewriting of the Maven Alfresco Lifecyle (latest version 3.9.1) and it's composed of 3 efforts: - -a) POM files: - - alfresco-sdk-parent: provides lifecycle features and behaviors for typical Alfresco development projects - - alfresco-platform-distribution: describes and provides dependencyManagement for artifacts of each Alfresco release - -b) alfresco-maven-plugin: - - defines the AMP packaging type and lifecycle in Maven - - emdeds Alfresco MMT to provide safe installation of single / multiple AMP -> WAR - - will potentially grow including more use cases around Alfresco / Maven - -c) The definition of (initially 2) archetypes that show some simple project's configuration using -the parent POMs - - AMP archetype (this archetype) - - All-in-One multi-module archetype including - - Alfresco Repository AMP - - Alfresco Repository extension project (WAR, also depending on the AMP) - - Share customization project (WAR) - - Solr customization project (WAR) - - Jetty embedded runner for the full platform (mvn clean install -Prun) - - -**************************************** -Why using this SDK might be a good idea? -**************************************** -The main reported advantages of using the Maven Alfresco SDK are: - -- IDE-independent SDK, all build-related features are provided by Apache Maven, which is the only -prerequisite to use this SDK - -- No IDE manual configuration, all modern IDEs offer advanced Maven integrations, so -feel free to use Eclipse, IntelliJ, or any other IDE to write your code and leverage Maven - -- Process ready: scales from quick start rapid application development, to be seamlessly -integrated in enterprise devleopment processes like Continuous Integration and Release - -- Language independent, you don't like Maven? You can still use Ant, Ivy, Buildr, Gradle, Leiningen or any other build -system that is compatible with Maven artifact resolution mechanism; just configure artifacts.alfresco.com as (one of) your -Maven repositories and you're ready to go - -- Javadoc and Sources support, provided by artifacts.alfresco.com related Maven artifacts; you don't need to manually -configure your IDE to attach (manually downloaded) sources to your (manually downloaded) binaries. - -- Clean and readable, the build logic related with OOTB Alfresco features is wrapped in 50 lines of pom.xml - -- Advanced build functionality, inherited by your parent POMs you can use embedded databases and j2ee -containers with (almost) no configuration at all, among other features exposed below. - -- One mvn command to generate, one mvn command to run embedded, this is all you need to do to have a local Alfresco running -on an empty laptop - -- Supports community and enterprise flawlessly, allowing to switch one to another very easily \ No newline at end of file diff --git a/archetypes/alfresco-amp-archetype/src/site/apt/advanced-usage.apt.vm b/archetypes/alfresco-amp-archetype/src/site/apt/advanced-usage.apt.vm new file mode 100644 index 00000000..8d592a8a --- /dev/null +++ b/archetypes/alfresco-amp-archetype/src/site/apt/advanced-usage.apt.vm @@ -0,0 +1,56 @@ + ------ + Alfresco Maven AMP Archetype Advanced Usage + ------ + Gabriele Columbro + ------ + Nov 2012 + ------ + +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. + +AMP Archetype properties + + In the AMP archetype (as in the whole Part of the Maven 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: + ++---+ + + ... + + + alfresco + + ... + ++---+ + +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. + \ No newline at end of file diff --git a/archetypes/alfresco-amp-archetype/src/site/apt/index.apt.vm b/archetypes/alfresco-amp-archetype/src/site/apt/index.apt.vm new file mode 100644 index 00000000..56041ff5 --- /dev/null +++ b/archetypes/alfresco-amp-archetype/src/site/apt/index.apt.vm @@ -0,0 +1,51 @@ + ------ + Building AMPs (Alfresco Module Packages) with Maven + ------ + Gabriele Columbro + ------ + Nov 2012 + ------ + +Alfresco AMP Archetype - Part of the Maven Alfresco SDK\x99 + + The Alfresco AMP Archetype is a sample fully featured project to manage AMP (Alfresco Module Package) projects. + This archetype can be used both for Alfresco Repository and Alfresco Share AMPs. + +* Features + + Amongst other features, this archetype provides support for: + + * <<>> packaging support for your projects + + * AMP dependency management in Maven + + * Installation of AMPs in an Alfresco or 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 Jetty and embedded H2 database for demo purposes, rapid application development and integration testing + (<>: 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 ++---+ + + 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 4.2.b) + + You can find new Alfresco AMP project ready to go in the <<>> folder. + +Usage + + Instructions on how to use the Alfresco 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}} \ No newline at end of file diff --git a/archetypes/alfresco-amp-archetype/src/site/apt/usage.apt.vm b/archetypes/alfresco-amp-archetype/src/site/apt/usage.apt.vm new file mode 100644 index 00000000..3ec386f8 --- /dev/null +++ b/archetypes/alfresco-amp-archetype/src/site/apt/usage.apt.vm @@ -0,0 +1,74 @@ + ------ + Alfresco Maven 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-mappings.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/test/java // Unit tests + src/test/resources // Unit test resources + src/test/properties/ // =local by default, environment aware alfresco-global.properties for embedded run + ++---+ + +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 + + * testing + + * 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 Alfresco Maven 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 the AMP onto an Alfresco WAR. + + * <<>> Like <<>> + but also runs the resulting WAR+AMP in Jetty + H2 embedded for integration testing + + * <<>>: Like <<>> but installs the AMP and runs on the Share WAR in Jetty embeded. + + * <<>>: Removes DB, alf_data, indexes and log files. Useful to purge the development repo (by default self contained in <<<\${project.basedir}/alf_data_dev>>> + \ No newline at end of file diff --git a/archetypes/alfresco-amp-archetype/src/site/site.xml b/archetypes/alfresco-amp-archetype/src/site/site.xml new file mode 100644 index 00000000..0cecc234 --- /dev/null +++ b/archetypes/alfresco-amp-archetype/src/site/site.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/plugins/alfresco-maven-plugin/src/site/apt/index.apt.vm b/plugins/alfresco-maven-plugin/src/site/apt/index.apt.vm index 1c294ad8..f72fe71c 100644 --- a/plugins/alfresco-maven-plugin/src/site/apt/index.apt.vm +++ b/plugins/alfresco-maven-plugin/src/site/apt/index.apt.vm @@ -16,7 +16,7 @@ Alfresco Maven Plugin - Part of the Maven Alfresco SDK\x99 *{{{./amp-mojo.html}alfresco:amp}} Packages an AMP file - *{{{./install-mojo.html}alfresco:install}} Installs one or multiple AMPs into an Alfresco WAR / exploded WAR folder + *{{{./install-mojo.html}alfresco:install}} Installs one or multiple AMPs into an Alfresco WAR / exploded WAR folder embedding {{{http://wiki.alfresco.com/wiki/Module_Management_Tool} Alfresco MMT}} *{{{./version-mojo.html}alfresco:version}} Parses ${project.version} removing literals (for AMP compatibility) and making the ${noSnapshot} property available in the POM diff --git a/plugins/alfresco-maven-plugin/src/site/site.xml b/plugins/alfresco-maven-plugin/src/site/site.xml index 970a67f4..28af7994 100644 --- a/plugins/alfresco-maven-plugin/src/site/site.xml +++ b/plugins/alfresco-maven-plugin/src/site/site.xml @@ -3,6 +3,7 @@ + @@ -15,9 +16,12 @@ - - - + + + + + + diff --git a/pom.xml b/pom.xml index 9b8bbbfa..8dab8a1e 100644 --- a/pom.xml +++ b/pom.xml @@ -22,6 +22,12 @@ + + scm:svn:${scm.url.base}/trunk + scm:svn:${scm.url.base}/trunk + ${scm.url.base}/trunk + + gabriele.columbro @@ -94,7 +100,10 @@ 2.2 + 2.3.2 https://artifacts.alfresco.com/nexus/content/repositories/alfresco-docs/alfresco-lifecycle-aggregator/latest + https://maven-alfresco-archetypes.googlecode.com/svn + ${scm.url.base}/tags @@ -113,8 +122,24 @@ archetype-packaging ${maven.archetype.version} + + org.apache.maven.wagon + wagon-webdav-jackrabbit + 2.2 + + + + org.apache.maven.plugins + maven-release-plugin + ${maven.release.version} + + ${scm.tag.base} + + + + diff --git a/poms/alfresco-sdk-parent/pom.xml b/poms/alfresco-sdk-parent/pom.xml index 779a846a..ac483568 100644 --- a/poms/alfresco-sdk-parent/pom.xml +++ b/poms/alfresco-sdk-parent/pom.xml @@ -144,7 +144,7 @@ dav:https://artifacts.alfresco.com/nexus/content/repositories/alfresco-docs/alfresco-lifecycle-aggregator/latest/poms/alfresco-sdk-parent/ - + ${project.artifactId} @@ -270,6 +270,15 @@ ${app.filtering.enabled} + + + + org.apache.maven.wagon + wagon-webdav-jackrabbit + 2.2 + + + diff --git a/poms/alfresco-sdk-parent/src/site/apt/index.apt.vm b/poms/alfresco-sdk-parent/src/site/apt/index.apt.vm new file mode 100644 index 00000000..55984683 --- /dev/null +++ b/poms/alfresco-sdk-parent/src/site/apt/index.apt.vm @@ -0,0 +1,39 @@ + ------ + Introduction + ------ + Gabriele Columbro + ------ + Nov 2012 + ------ + +Alfresco SDK Parent - Part of Maven Alfresco SDK\x99 + + The Alfresco SDK Parent POM ${project.version} is the <<>> for all Maven Alfresco SDK\x99 features. + It aggregates plugin configurations and dependencies to provide a set of profiles and properties to manage the full Alfresco projects Lifecycle on Maven. + + The current version of the POM in use in the Maven Alfresco SDK\x99 ${project.version} is available {{{${scm.tags.url}/poms/alfresco-sdk-parent/pom.xml} here}}. + +Usage + + You can reference Alfresco SDK POM in your POM adding the following snippet: ++---+ + + ... + + org.alfresco.maven + alfresco-sdk-parent + ${project.version} + + ... + ++---+ + + This will reference the Alfresco SDK project as <<>> project, allowing you to inherit all SDK features. + + Features are provided in terms of {{{./sdk-profiles.html} Maven profiles}}, and high configurability is provided with + {{{./sdk-properties}POM properties}} avaialble to sibling projects. + +* Examples / archetypes + + To kickstart your SDK experience and to provide examples on how to use it, archetypes are available already using this POM. + Check the menu item or the {{{/index.html}SDK Home Page}} for more samples. \ No newline at end of file diff --git a/poms/alfresco-sdk-parent/src/site/apt/sdk-profiles.apt.vm b/poms/alfresco-sdk-parent/src/site/apt/sdk-profiles.apt.vm new file mode 100644 index 00000000..30154697 --- /dev/null +++ b/poms/alfresco-sdk-parent/src/site/apt/sdk-profiles.apt.vm @@ -0,0 +1,37 @@ + ------ + Maven Alfresco SDK\x99 Profiles + ------ + Gabriele Columbro + ------ + Nov 2012 + ------ + +SDK Available Profiles + + The Maven Alfresco SDK\x99 defines common features required by different Alfresco projects. + While the <<>> way is to use full working examples of usage of these profiles (e.g. the + {{{./archetypes/alfresco-amp-archetype/index.html}AMP}} and {{{./archetypes/alfresco-allinone-archetype/index.html}All-in-One}} archetypes), + you can also directly use this POM as a parent in your custom project. + + Here goes the list of common used profiles (with their activation conditions): + +*-----------+--------------+-------------+-------------+ +|| Profile || Description || Activation | |Phase | +*-----------+--------------+-------------+-------------+ +| amp-to-war | Allows AMP projects to be run embedded on a WAR | Manual: <<<-Pamp-to-war>>> | integration-test | +| purge | Cleans all alf_data and logs from Alfresco runs | Manual: <<<-Ppurge>>> | clean | +| enable-amp-testing | Allows AMP unit testing | Automatic if <<>> is present | test | +| enable-amp | Activates AMP packaging | Automatic if <<>> is present | test | +*-----------+--------------+-------------+-------------+ + + The full list of available profiles (with their activation conditions) can be instead found in the <<>> section of the + {{{${scm.tags.url}/poms/alfresco-sdk-parent/pom.xml} lfresco SDK POM}}. + +Full SDK properties reference + + The full reference of properties defined in the SDK can be obtained by looking + at the <<>> section of the current version of the <<>> in use. + Check the {{{${scm.tags.url}/poms/alfresco-sdk-parent/pom.xml} current POM version}} for this. + + While in certain cases it might be useful to override defaults, make sure you know what you're doing, + as you might be <> SDK conventions and therefore <>> \ No newline at end of file diff --git a/poms/alfresco-sdk-parent/src/site/apt/sdk-properties.apt.vm b/poms/alfresco-sdk-parent/src/site/apt/sdk-properties.apt.vm new file mode 100644 index 00000000..d512aec4 --- /dev/null +++ b/poms/alfresco-sdk-parent/src/site/apt/sdk-properties.apt.vm @@ -0,0 +1,45 @@ + ------ + Maven Alfresco SDK Properties + ------ + Gabriele Columbro + ------ + Nov 2012 + ------ + +Common SDK properties + + Useful properties that can be fully controlled directly in the POM are: + ++---+ + + ... + + + org.alfresco + 4.2.b + + WARN + + ${project.build.directory}/ + + alf_data_dev + + local + + ... + ++---+ + + +Full SDK properties reference + + The full reference of properties defined in the SDK can be obtained by looking + at the <<>> section of the current version of the <<>> in use. + Check the {{{${scm.tags.url}/poms/alfresco-sdk-parent/pom.xml} current POM version}} for this. + + While in certain cases it might be useful to override defaults, make sure you know what you're doing, + as you might be <> SDK conventions and therefore <>> \ No newline at end of file diff --git a/poms/alfresco-sdk-parent/src/site/site.xml b/poms/alfresco-sdk-parent/src/site/site.xml index 6085fefe..56c286f5 100644 --- a/poms/alfresco-sdk-parent/src/site/site.xml +++ b/poms/alfresco-sdk-parent/src/site/site.xml @@ -4,21 +4,18 @@ maven-fluido-skin 1.3.0 + Alfresco Software - Maven Fluido Skin + Alfresco Software http://people.apache.org/~gabriele/Alfresco-logo-transparent-thin.png http://www.alfresco.com true + navbar-inverse false - - mindthegabz - true - true - @@ -40,9 +37,24 @@ - - - + + + + + + + + + + + + + + + + + + diff --git a/src/site/apt/index.apt b/src/site/apt/index.apt.vm similarity index 60% rename from src/site/apt/index.apt rename to src/site/apt/index.apt.vm index 020bab4e..ffb16e3f 100644 --- a/src/site/apt/index.apt +++ b/src/site/apt/index.apt.vm @@ -8,7 +8,7 @@ Maven Alfresco SDK\x99 - The Alfresco Maven SDK ${project.version} (formerly {{{https://artifacts.alfresco.com/nexus/content/repositories/alfresco-docs/maven-alfresco-lifecycle/latest/} Maven Alfresco Lifecycle 3.9.1}} + The Alfresco Maven SDK ${project.version} - formerly {{{https://artifacts.alfresco.com/nexus/content/repositories/alfresco-docs/maven-alfresco-lifecycle/latest/} Maven Alfresco Lifecycle 3.9.1}} - provides a fully fledged Maven support for {{{http://www.alfresco.com}Alfresco ECM}} WAR and {{{https://wiki.alfresco.com/wiki/AMP_Files}AMP}} project development. Being fully integrated with Maven it allows to both leverage the vast number of Maven plugins for your Alfresco project as well as integrated your project easily in Open Source and Enterprise development processes. @@ -17,25 +17,34 @@ Maven Alfresco SDK\x99 The Maven Alfresco SDK relies on a number of components: - *{{{./poms/alfresco-sdk-parent/index.html}An SDK POM}} providing full Alfresco project lifecycle feature, to be added as a <<<>>> in your projects + * {{{./poms/alfresco-sdk-parent/index.html}An SDK POM}} providing full Alfresco project lifecycle feature, to be added as a <<<>>> in your projects - * Archetypes like the {{{./archetypes/alfresco-amp-archetype/index/html}AMP}} or {{{./archetypes/alfresco-allinone-archetype/index.html}All-in-One}} providing sample project to kickstart your Alfresco development and boost it with best practices + * Archetypes like the {{{./archetypes/alfresco-amp-archetype/index.html}AMP}} or {{{./archetypes/alfresco-allinone-archetype/index.html}All-in-One}} providing sample project to kickstart your Alfresco development and boost it with best practices - *{{{https://artifacts.alfresco.com/nexus/content/repositories/alfresco-docs/alfresco-platform-distribution/latest}Alfresco Platform Distribution POM}} can (optionally) be used to provide centralized <<<>>> on a particular Alfresco version / edition (Community / Enterprise) + * The {{{./plugins/alfresco-maven-plugin/index.html} Alfresco Maven Plugin}} to manage AMP packaging and dependencies + + * {{{https://artifacts.alfresco.com/nexus/content/repositories/alfresco-docs/alfresco-platform-distribution/latest}Alfresco Platform Distribution POM}} can (optionally) be used to provide centralized <<<>>> on a particular Alfresco version / edition (Community / Enterprise) - *The {{{https://artifacts.alfresco.com}Alfresco Artifacts Repository}} provides backing for this SDK. Check the {{{http://wiki.alfresco.com/wiki/Alfresco_Artifacts_Repository}Alfresco Wiki}} for Community / Enterprise access information. + * The {{{https://artifacts.alfresco.com}Alfresco Artifacts Repository}} provides backing for this SDK. Check the {{{http://wiki.alfresco.com/wiki/Alfresco_Artifacts_Repository}Alfresco Wiki}} for Community / Enterprise access information. * Usage The Maven Alfresco SDK\x99 is fully documented in the single components websites (links above) as well as updated on {{{https://wiki.alfresco.com/wiki/Maven_Alfresco_SDK}the Alfresco Wiki}}. -* Alfresco Compatibility +* Pre-requisites + +** System prerequisites + + No manual Alfresco download, application server or database is required. + See details in the {{{./prerequisites.html} SDK pre-requisites page}}. + +** Alfresco Compatibility Maven Alfresco SDK\x99 ${project.version} is compatible (for now) with Alfresco Community / Enterprise 4.2(.b)+. The majority of the features might still work when using lower Alfresco versions, but certain artifacts might not be available in the {{{https://artifacts.alfresco.com}Alfresco Artifacts Repository}}. You can probably fix this with some Maven configuration, but use at your own risk. - + Project History * The Maven Alfresco SDK\x99 reached its version ${project.version}. diff --git a/src/site/apt/prerequisites.apt.vm b/src/site/apt/prerequisites.apt.vm new file mode 100644 index 00000000..b926f397 --- /dev/null +++ b/src/site/apt/prerequisites.apt.vm @@ -0,0 +1,36 @@ + ------ + Maven Alfresco SDK Prerequisites + ------ + Gabriele Columbro + ------ + Nov 2012 + ------ + + +Maven Alfresco SDK\x99 Pre-Requisites + + + The only real prerequisite of the Maven Alfresco SDK\x99 Apache Maven 3.0.3+ installed (and properly configured) on your machine; + neither <> nor <> are required. + + Additional tips: + + * It is strongly advised to use the Apache Maven official binary distributions downloaded from the {{http://maven.apache.org}official mirrors}}; avoid OS-specific distributions as much as possible. + + * add <<>> to your environment if your plan to launch tests / run embedded in Jetty + + * Java 1.7 is <> to run Alfresco 4.2.b+ + + * <> of Alfresco distribution is required. + Alfresco platform is retrieved automatically from {{{https://artifacts.alfresco.com} the Alfresco Artifacts Repository}} + based on the <<>> and <<>> POM properties + + +H2 Embedded Support Pre-Requisites + + This SDK allows H2 embedded run of Alfresco (<>: this is an unsupported configuration for Alfresco Enterprise) leveraging + the open source effort {{{https://github.com/skuro/alfresco-h2-support} Alfresco H2 Support}}. This bridge allows to emulate + Alfresco expected DB behavior and is therefore very specific to every Alfresco version. + + Maven Alfresco SDK\x99 ${project.version} uses version 1.5 of the Alfresco H2 Support. In case you experience + issues with the embedded DB support, please check the {{{https://github.com/skuro/alfresco-h2-support/wiki/H2-Database-support-for-Alfresco} H2 Support Compatibility matrix}}. \ No newline at end of file diff --git a/src/site/apt/why.apt.vm b/src/site/apt/why.apt.vm new file mode 100644 index 00000000..dfefa101 --- /dev/null +++ b/src/site/apt/why.apt.vm @@ -0,0 +1,37 @@ + ------ + Why using this SDK might be a good idea? + ------ + Gabriele Columbro + ------ + Nov 2012 + ------ + +Why would you use the Maven Alfresco SDK\x99? + + As a standard de facto, Maven allows you projects to be inherently more reusable and enables of your development practices, + and, in certain successful cases, Application Lifecycle Management process at large. + + Therefore Alfresco Community and Enterprise , and are the main stakeholders of this tentative to simplify + Alfresco development. Hope this helps :) + +* Developer features + + * No manual downloading of Alfresco distribution. It's all retrieved from {{{https://artifacts.alfresco.com} the Alfresco Artifacts Repository}} + + * <>, features are provided by Apache Maven, which is the sole prerequisite to use this SDK + + * <>, all modern IDEs offer advanced Maven integrations. So feel free to use Eclipse, IntelliJ, or any other IDE to write your code, while leveraging Maven to + standardize the way you work on Alfresco in your organization + + * Dependencies, POMs, Javadoc and Sources support - provided by {{{https://artifacts.alfresco.com} the Alfresco Artifacts Repository}} - for all Alfresco Artifacts; + Sources / Javadocs are automatically downloaded on demand by your IDE Maven integration (e.g. see {{{http://www.sonatype.org/m2eclipse/} m2eclipse}}) + + * <>, as it scales from quick start rapid application development, to be seamlessly integrated in enterprise devleopment processes like Continuous Integration and Release + + * <>, with a {{{./poms/alfresco-sdk-parent/index.html}single entry point}} for all SDK functionalities + + * Advanced build functionality, inherited by your parent POMs you can use embedded databases and j2ee containers with a zero configuration approach + + * One mvn command to generate, one mvn command to run embedded, this is all you need to do to have a local Alfresco running on an empty laptop + + * Supports community and enterprise seamlessly, allowing to switch one between versions / edition easily. \ No newline at end of file diff --git a/src/site/site.xml b/src/site/site.xml index 047bb6e6..3cff29a3 100644 --- a/src/site/site.xml +++ b/src/site/site.xml @@ -13,7 +13,7 @@ http://www.alfresco.com true - navbar-inversenavbar-inverse false @@ -32,17 +32,20 @@ - - - - - + + + + + + + + @@ -52,9 +55,8 @@ - + -