mirror of
https://github.com/Alfresco/alfresco-sdk.git
synced 2025-08-07 17:49:34 +00:00
-- fixed site:deploy
-- added docs for each modules -- deployed a staging snapshot at https://artifacts.alfresco.com/nexus/content/repositories/alfresco-docs/alfresco-lifecycle-aggregator/latest/index.html -- TODO: check links! git-svn-id: http://maven-alfresco-archetypes.googlecode.com/svn/trunk@633 04253f4f-3451-0410-a141-5562f1e59037
This commit is contained in:
@@ -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/<env>/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
|
@@ -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
|
||||
|
||||
* <<<src/main/properties/<env>/alfresco-global.properties>>> (environment dependent <<<alfresco-global.properties>>> packaged in the WAR )
|
||||
|
||||
* For Alfresco AMP projects
|
||||
|
||||
* <<<src/test/properties/<env>/alfresco-global.properties>>> (environment dependent <<<alfresco-global.properties>>> for test WAR run)
|
||||
|
||||
Build Environment (e.g. local, test, staging, prod) can be easily switched by setting the <<<<env>>>> 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 <<<maven-help-plugin:effective-pom>>> to analyze your POM at runtime.
|
@@ -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:
|
||||
|
||||
* <<<amp>>> 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 <<<alfresco-allinone-archetype>>> option
|
||||
|
||||
[[2]] Specify the <<<groupId>>> and <<<artifactId>>> for the project you want to create
|
||||
|
||||
[[3]] (<Optionally>) 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 <<<artifactId>>> 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}}
|
@@ -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:
|
||||
|
||||
* <<<amp>>>: An Repository Tier AMP project, demonstrating sample project structure and demo component loading. It 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>>>: An Alfresco <<<alfresco-*-*-solr.zip>>> overlay / customization to configure {{{http://solr.apache.org}Apache Solr}} cores properties
|
||||
|
||||
* <<<wcmqs>>>: An Alfresco Web Quick Start overlay / customization. WQS Repository and Share AMPs are also installed on Alfresco and Share.
|
||||
|
||||
* <<<runner>>>: 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.
|
||||
(<<NOTE>>: this is not a {{{http://www.alfresco.com/services/subscription/supported-platforms/} supported stack}} so use <<only for development purposes>>)
|
||||
|
||||
* 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.
|
||||
|
||||
<<NOTE>>: 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 :
|
||||
|
||||
* <<<mvn package>>>: Runs unit tests and packages all customized modules in their respective \${project.build.directory}/\${project.build.finalName}.amp
|
||||
|
||||
* <<<mvn install>>>: Like <<<mvn package>>> but also installs all modules in local Maven repository to be depended upon
|
||||
|
||||
* <<<mvn install -Dmaven.test.skip=true>>>: Like <<<mvn install>>> but skips unit tests
|
||||
|
||||
* <<<mvn install -Prun>>>: Like <<<mvn install>>> but also trigger the <<<runner>>> project to run Alfresco, Share, Solr and Web Quick Start in Jetty (with H2 embedded database)
|
||||
|
||||
* <<<mvn clean -Ppurge>>>: Removes DB, alf_data and log files
|
||||
|
||||
* Commands from from the <<<runner>>> project
|
||||
|
||||
* <<<mvn jetty:run -Prun'>>> or <<<'mvn integration-test -Prun'>>> to quickly run already packaged webapps
|
||||
|
||||
Advanced usage
|
||||
|
||||
See the {{{./advanced-usage.html}advanced usage page}}
|
33
archetypes/alfresco-allinone-archetype/src/site/site.xml
Normal file
33
archetypes/alfresco-allinone-archetype/src/site/site.xml
Normal file
@@ -0,0 +1,33 @@
|
||||
<project>
|
||||
<body>
|
||||
<menu ref="parent" inherit="bottom"/>
|
||||
|
||||
<menu name="Alfresco AMP Archetype">
|
||||
<item name="Introduction" href="index.html"/>
|
||||
<item name="Usage" href="usage.html"/>
|
||||
<item name="Advanced Usage" href="advanced-usage.html"/>
|
||||
</menu>
|
||||
|
||||
<menu name="Maven Alfresco SDK">
|
||||
<item name="Home" href="/index.html" />
|
||||
<item name="Maven Alfresco SDK Prerequisites" href="/prerequisites.html" />
|
||||
<item name="Why using SDK?" href="/why.html" />
|
||||
<item name="Alfresco SDK Parent POM" href="https://artifacts.alfresco.com/nexus/content/repositories/alfresco-docs/alfresco-lifecycle-aggregator/latest/poms/alfresco-sdk-parent/index.html" />
|
||||
<item name="Alfresco Platform Distribution POM" href="https://artifacts.alfresco.com/nexus/content/repositories/alfresco-docs/alfresco-platform-distribution/latest/index.html" />
|
||||
<item name="Maven AMP Plugin" href="http://maven.alfresco.com/nexus/content/repositories/alfresco-docs/maven-alfresco-lifecycle/latest/plugins/maven-amp-plugin/index.html" />
|
||||
</menu>
|
||||
|
||||
<menu name="Maven Alfresco Community">
|
||||
<item name="Alfresco Maven Wiki Docs" href="http://wiki.alfresco.com/wiki/Maven_Alfresco_SDK" />
|
||||
<item name="Alfresco with Maven for Dummies" href="https://wiki.alfresco.com/wiki/Maven_For_Dummies" />
|
||||
<item name="Developer Access (Google Code)" href="http://code.google.com/p/maven-alfresco-archetypes/" />
|
||||
<item name="Gabriele Columbro's blog" href="http://www.mindthegab.com/" />
|
||||
<item name="Maurizio Pillitu's blog" href="http://www.session.it/" />
|
||||
<item name="Carlo Sciolla's blog" href="http://skuro.tk/" />
|
||||
<item name="Enterprise adoption" href="http://www.slideshare.net/guest67a9ba/maven-application-lifecycle-management-for-alfresco" />
|
||||
</menu>
|
||||
|
||||
<!--<menu ref="reports"/>-->
|
||||
|
||||
</body>
|
||||
</project>
|
@@ -63,11 +63,5 @@
|
||||
<include>**/*.xml</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
<fileSet filtered="false" encoding="UTF-8">
|
||||
<directory></directory>
|
||||
<includes>
|
||||
<include>*.txt</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
</fileSets>
|
||||
</archetype-descriptor>
|
||||
|
@@ -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/<env>/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
|
@@ -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 <<<src/test/java>>>. The current module in development
|
||||
will be added to the test classpath together with all necessary Alfresco Spring contexts.
|
||||
|
||||
Running <<<mvn test>>> will results in your unit tests to be run. You can skip this (<<<not recommended>>>)
|
||||
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
|
||||
|
||||
* <<<src/main/amp/module.properties>>> (filtered and packaged in the AMP)
|
||||
|
||||
* <<<src/test/properties/<env>/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:
|
||||
|
||||
+---+
|
||||
<project>
|
||||
...
|
||||
<properties>
|
||||
<!-- Determines the target WAR for this AMP. Allowed values: alfresco | share . Defaults to an 'alfresco' AMP -->
|
||||
<alfresco.client.war>alfresco</alfresco.client.war>
|
||||
</properties>
|
||||
...
|
||||
</project>
|
||||
+---+
|
||||
|
||||
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 <<<maven-help-plugin:effective-pom>>> to analyze your POM at runtime.
|
||||
|
51
archetypes/alfresco-amp-archetype/src/site/apt/index.apt.vm
Normal file
51
archetypes/alfresco-amp-archetype/src/site/apt/index.apt.vm
Normal file
@@ -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:
|
||||
|
||||
* <<<amp>>> 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 <<<mvn test>>> and see your <<<src/test/java>>> 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
|
||||
(<<NOTE>>: this is not a {{{http://www.alfresco.com/services/subscription/supported-platforms/} supported stack}} so use <<only for development purposes>>)
|
||||
|
||||
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 <<<alfresco-amp-archetype>>> option
|
||||
|
||||
[[2]] Specify the <<<groupId>>> and <<<artifactId>>> for the project you want to create
|
||||
|
||||
[[3]] (<Optionally>) Select Alfresco Version / Edition (current default is: Alfresco Community 4.2.b)
|
||||
|
||||
You can find new Alfresco AMP project ready to go in the <<<artifactId>>> 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}}
|
74
archetypes/alfresco-amp-archetype/src/site/apt/usage.apt.vm
Normal file
74
archetypes/alfresco-amp-archetype/src/site/apt/usage.apt.vm
Normal file
@@ -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/<env> // <env>=local by default, environment aware alfresco-global.properties for embedded run
|
||||
|
||||
+---+
|
||||
|
||||
Basically by default the folder <<<src/main/amp>>> 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:
|
||||
|
||||
* <<<mvn package>>>: Runs unit tests and packages AMP in \${project.build.directory}/\${project.build.finalName}.amp
|
||||
|
||||
* <<<mvn install>>>: Like <<<mvn package>>> but also installs AMP in local Maven repository to be depended upon
|
||||
|
||||
* <<<mvn install -Dmaven.test.skip=true>>>: Like <<<mvn install>>> but skips unit tests
|
||||
|
||||
* <<<mvn package -Pamp-to-war>>>: Like <<<mvn package>>> but also installs the AMP onto an Alfresco WAR.
|
||||
|
||||
* <<<mvn integration-test -Pamp-to-war>>> Like <<<mvn package -Pamp-to-war>>>
|
||||
but also runs the resulting WAR+AMP in Jetty + H2 embedded for integration testing
|
||||
|
||||
* <<<mvn integration-test -Pamp-to-war -Dalfresco.client.war=share>>>: Like <<<mvn integration-test -Pamp-to-war>>> but installs the AMP and runs on the Share WAR in Jetty embeded.
|
||||
|
||||
* <<<mvn clean -Ppurge>>>: Removes DB, alf_data, indexes and log files. Useful to purge the development repo (by default self contained in <<<\${project.basedir}/alf_data_dev>>>
|
||||
|
34
archetypes/alfresco-amp-archetype/src/site/site.xml
Normal file
34
archetypes/alfresco-amp-archetype/src/site/site.xml
Normal file
@@ -0,0 +1,34 @@
|
||||
<project>
|
||||
<body>
|
||||
<menu ref="parent" inherit="bottom"/>
|
||||
|
||||
<menu name="Alfresco AMP Archetype">
|
||||
<item name="Introduction" href="index.html"/>
|
||||
<item name="Usage" href="usage.html"/>
|
||||
<item name="Advanced Usage" href="advanced-usage.html"/>
|
||||
</menu>
|
||||
|
||||
<menu name="Maven Alfresco SDK">
|
||||
<item name="Home" href="/index.html" />
|
||||
<item name="Maven Alfresco SDK Prerequisites" href="../../prerequisites.html" />
|
||||
<item name="Maven Alfresco SDK Properties" href="/poms/alfresco-sdk-parent/sdk-properties.html" />
|
||||
<item name="Why using SDK?" href="/why.html" />
|
||||
<item name="Alfresco SDK Parent POM" href="https://artifacts.alfresco.com/nexus/content/repositories/alfresco-docs/alfresco-lifecycle-aggregator/latest/poms/alfresco-sdk-parent/index.html" />
|
||||
<item name="Alfresco Platform Distribution POM" href="https://artifacts.alfresco.com/nexus/content/repositories/alfresco-docs/alfresco-platform-distribution/latest/index.html" />
|
||||
<item name="Maven AMP Plugin" href="http://maven.alfresco.com/nexus/content/repositories/alfresco-docs/maven-alfresco-lifecycle/latest/plugins/maven-amp-plugin/index.html" />
|
||||
</menu>
|
||||
|
||||
<menu name="Maven Alfresco Community">
|
||||
<item name="Alfresco Maven Wiki Docs" href="http://wiki.alfresco.com/wiki/Maven_Alfresco_SDK" />
|
||||
<item name="Alfresco with Maven for Dummies" href="https://wiki.alfresco.com/wiki/Maven_For_Dummies" />
|
||||
<item name="Developer Access (Google Code)" href="http://code.google.com/p/maven-alfresco-archetypes/" />
|
||||
<item name="Gabriele Columbro's blog" href="http://www.mindthegab.com/" />
|
||||
<item name="Maurizio Pillitu's blog" href="http://www.session.it/" />
|
||||
<item name="Carlo Sciolla's blog" href="http://skuro.tk/" />
|
||||
<item name="Enterprise adoption" href="http://www.slideshare.net/guest67a9ba/maven-application-lifecycle-management-for-alfresco" />
|
||||
</menu>
|
||||
|
||||
<!--<menu ref="reports"/>-->
|
||||
|
||||
</body>
|
||||
</project>
|
@@ -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
|
||||
|
||||
|
@@ -3,6 +3,7 @@
|
||||
<menu ref="parent" inherit="bottom"/>
|
||||
|
||||
<menu name="Plugin info">
|
||||
<item name="Introduction" href="index.html"/>
|
||||
<item name="Goals" href="plugin-info.html"/>
|
||||
<item name="Usage" href="usage.html"/>
|
||||
<item name="Advanced Usage" href="advanced-usage.html"/>
|
||||
@@ -15,9 +16,12 @@
|
||||
<item name="Maven Alfresco All In One Archetype" href="https://artifacts.alfresco.com/nexus/content/repositories/alfresco-docs/alfresco-lifecycle-aggregator/latest/archetypes/alfresco-allinone-archetype/index.html"/>
|
||||
</menu>
|
||||
|
||||
<menu name="SDK Resources">
|
||||
<item name="FAQ" href="faq.html" />
|
||||
<item name="Alfresco SDK POM" href="https://artifacts.alfresco.com/nexus/content/repositories/alfresco-docs/alfresco-lifecycle-aggregator/latest/poms/alfresco-sdk-parent/index.html" />
|
||||
<menu name="Maven Alfresco SDK">
|
||||
<item name="Home" href="/index.html" />
|
||||
<item name="Maven Alfresco SDK Prerequisites" href="../../prerequisites.html" />
|
||||
<item name="Maven Alfresco SDK Properties" href="/poms/alfresco-sdk-parent/sdk-properties.html" />
|
||||
<item name="Why using SDK?" href="/why.html" />
|
||||
<item name="Alfresco SDK Parent POM" href="https://artifacts.alfresco.com/nexus/content/repositories/alfresco-docs/alfresco-lifecycle-aggregator/latest/poms/alfresco-sdk-parent/index.html" />
|
||||
<item name="Alfresco Platform Distribution POM" href="https://artifacts.alfresco.com/nexus/content/repositories/alfresco-docs/alfresco-platform-distribution/latest/index.html" />
|
||||
<item name="Maven AMP Plugin" href="http://maven.alfresco.com/nexus/content/repositories/alfresco-docs/maven-alfresco-lifecycle/latest/plugins/maven-amp-plugin/index.html" />
|
||||
</menu>
|
||||
|
25
pom.xml
25
pom.xml
@@ -22,6 +22,12 @@
|
||||
</license>
|
||||
</licenses>
|
||||
|
||||
<scm>
|
||||
<connection>scm:svn:${scm.url.base}/trunk</connection>
|
||||
<developerConnection>scm:svn:${scm.url.base}/trunk</developerConnection>
|
||||
<url>${scm.url.base}/trunk</url>
|
||||
</scm>
|
||||
|
||||
<developers>
|
||||
<developer>
|
||||
<id>gabriele.columbro</id>
|
||||
@@ -94,7 +100,10 @@
|
||||
|
||||
<properties>
|
||||
<maven.archetype.version>2.2</maven.archetype.version>
|
||||
<maven.release.version>2.3.2</maven.release.version>
|
||||
<maven.site.url>https://artifacts.alfresco.com/nexus/content/repositories/alfresco-docs/alfresco-lifecycle-aggregator/latest</maven.site.url>
|
||||
<scm.url.base>https://maven-alfresco-archetypes.googlecode.com/svn</scm.url.base>
|
||||
<scm.tag.base>${scm.url.base}/tags</scm.tag.base>
|
||||
</properties>
|
||||
|
||||
<build>
|
||||
@@ -113,9 +122,25 @@
|
||||
<artifactId>archetype-packaging</artifactId>
|
||||
<version>${maven.archetype.version}</version>
|
||||
</extension>
|
||||
<extension>
|
||||
<groupId>org.apache.maven.wagon</groupId>
|
||||
<artifactId>wagon-webdav-jackrabbit</artifactId>
|
||||
<version>2.2</version>
|
||||
</extension>
|
||||
</extensions>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-release-plugin</artifactId>
|
||||
<version>${maven.release.version}</version>
|
||||
<configuration>
|
||||
<tagBase>${scm.tag.base}</tagBase>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>alfresco-public</id>
|
||||
|
@@ -270,6 +270,15 @@
|
||||
<filtering>${app.filtering.enabled}</filtering>
|
||||
</testResource>
|
||||
</testResources>
|
||||
|
||||
<extensions>
|
||||
<extension>
|
||||
<groupId>org.apache.maven.wagon</groupId>
|
||||
<artifactId>wagon-webdav-jackrabbit</artifactId>
|
||||
<version>2.2</version>
|
||||
</extension>
|
||||
</extensions>
|
||||
|
||||
</build>
|
||||
|
||||
<!-- Feature / behavioral profiles -->
|
||||
|
39
poms/alfresco-sdk-parent/src/site/apt/index.apt.vm
Normal file
39
poms/alfresco-sdk-parent/src/site/apt/index.apt.vm
Normal file
@@ -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 <<<single entry point>>> 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:
|
||||
+---+
|
||||
<project>
|
||||
...
|
||||
<parent>
|
||||
<groupId>org.alfresco.maven</groupId>
|
||||
<artifactId>alfresco-sdk-parent</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</parent>
|
||||
...
|
||||
</project>
|
||||
+---+
|
||||
|
||||
This will reference the Alfresco SDK project as <<<parent>>> 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 <Projects using this POM> or the {{{/index.html}SDK Home Page}} for more samples.
|
37
poms/alfresco-sdk-parent/src/site/apt/sdk-profiles.apt.vm
Normal file
37
poms/alfresco-sdk-parent/src/site/apt/sdk-profiles.apt.vm
Normal file
@@ -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 <<<recommended>>> 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 <<<src/test/java>>> is present | test |
|
||||
| enable-amp | Activates AMP packaging | Automatic if <<<src/main/amp/modules.properties>>> is present | test |
|
||||
*-----------+--------------+-------------+-------------+
|
||||
|
||||
The full list of available profiles (with their activation conditions) can be instead found in the <<<profiles>>> section of the
|
||||
{{{${scm.tags.url}/poms/alfresco-sdk-parent/pom.xml} <20>lfresco SDK POM}}.
|
||||
|
||||
Full SDK properties reference
|
||||
|
||||
The full reference of properties defined in the SDK can be obtained by looking
|
||||
at the <<<properties>>> section of the current version of the <<<alfresco-sdk-parent>>> 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 <<breaking>> SDK conventions and therefore <<your build>>>
|
45
poms/alfresco-sdk-parent/src/site/apt/sdk-properties.apt.vm
Normal file
45
poms/alfresco-sdk-parent/src/site/apt/sdk-properties.apt.vm
Normal file
@@ -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:
|
||||
|
||||
+---+
|
||||
<project>
|
||||
...
|
||||
<!--
|
||||
| SDK properties have sensible defaults in the SDK parent,
|
||||
| but you can override the properties below to use another version.
|
||||
| For more available properties see the alfresco-sdk-parent POM.
|
||||
-->
|
||||
<properties>
|
||||
<alfresco.groupId>org.alfresco</alfresco.groupId>
|
||||
<alfresco.version>4.2.b</alfresco.version>
|
||||
<!-- Defines root logger log level for testing and embedded run -->
|
||||
<app.log.root.level>WARN</app.log.root.level>
|
||||
<!-- Logging dir. Note the trailing slash is required -->
|
||||
<app.log.dir>${project.build.directory}/</app.log.root.level>
|
||||
<!-- The alf_data folder -->
|
||||
<alfresco.data.location>alf_data_dev</alfresco.data.location>
|
||||
<!-- This controls which properties will be picked in src/test/properties for embedded run -->
|
||||
<env>local</env>
|
||||
</properties>
|
||||
...
|
||||
</project>
|
||||
+---+
|
||||
|
||||
|
||||
Full SDK properties reference
|
||||
|
||||
The full reference of properties defined in the SDK can be obtained by looking
|
||||
at the <<<properties>>> section of the current version of the <<<alfresco-sdk-parent>>> 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 <<breaking>> SDK conventions and therefore <<your build>>>
|
@@ -4,21 +4,18 @@
|
||||
<artifactId>maven-fluido-skin</artifactId>
|
||||
<version>1.3.0</version>
|
||||
</skin>
|
||||
|
||||
<custom>
|
||||
<fluidoSkin>
|
||||
<topBarIcon>
|
||||
<name>Alfresco Software</name>
|
||||
<alt>Maven Fluido Skin</alt>
|
||||
<alt>Alfresco Software</alt>
|
||||
<src>http://people.apache.org/~gabriele/Alfresco-logo-transparent-thin.png</src>
|
||||
<href>http://www.alfresco.com</href>
|
||||
</topBarIcon>
|
||||
<topBarEnabled>true</topBarEnabled>
|
||||
<navBarStyle>navbar-inverse</navBarStyle>
|
||||
<sideBarEnabled>false</sideBarEnabled>
|
||||
<twitter>
|
||||
<user>mindthegabz</user>
|
||||
<showUser>true</showUser>
|
||||
<showFollowers>true</showFollowers>
|
||||
</twitter>
|
||||
<facebookLike />
|
||||
<googlePlusOne />
|
||||
<googleSearch>
|
||||
@@ -40,9 +37,24 @@
|
||||
|
||||
<menu ref="parent" inherit="bottom"/>
|
||||
|
||||
<menu name="SDK Resources">
|
||||
<item name="FAQ" href="faq.html" />
|
||||
<item name="Alfresco SDK POM" href="https://artifacts.alfresco.com/nexus/content/repositories/alfresco-docs/alfresco-lifecycle-aggregator/latest/poms/alfresco-sdk-parent/index.html" />
|
||||
<menu name="Maven Alfresco SDK Parent POM">
|
||||
<item name="Introduction" href="./index.html" />
|
||||
<item name="Maven Alfresco SDK Properties" href="./sdk-properties.html" />
|
||||
<item name="Maven Alfresco SDK Profiles" href="./sdk-profiles.html" />
|
||||
</menu>
|
||||
|
||||
<menu name="Projects using this POM">
|
||||
<item name="Alfresco AMP Archetype" href="../../archetypes/alfresco-amp-archetype/index.html" />
|
||||
<item name="Alfresco All-in-One Archetype" href="../../archetypes/alfresco-allinone-archetype/index.html" />
|
||||
</menu>
|
||||
|
||||
|
||||
<menu name="Maven Alfresco SDK">
|
||||
<item name="Home" href="/index.html" />
|
||||
<item name="Maven Alfresco SDK Prerequisites" href="../../prerequisites.html" />
|
||||
<item name="Maven Alfresco SDK Properties" href="../../poms/alfresco-sdk-parent/sdk-properties.html" />
|
||||
<item name="Why using SDK?" href="../../why.html" />
|
||||
<item name="Alfresco SDK Parent POM" href="https://artifacts.alfresco.com/nexus/content/repositories/alfresco-docs/alfresco-lifecycle-aggregator/latest/poms/alfresco-sdk-parent/index.html" />
|
||||
<item name="Alfresco Platform Distribution POM" href="https://artifacts.alfresco.com/nexus/content/repositories/alfresco-docs/alfresco-platform-distribution/latest/index.html" />
|
||||
<item name="Maven AMP Plugin" href="http://maven.alfresco.com/nexus/content/repositories/alfresco-docs/maven-alfresco-lifecycle/latest/plugins/maven-amp-plugin/index.html" />
|
||||
</menu>
|
||||
|
@@ -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,19 +17,28 @@ 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 <<<<parent>>>> in your projects
|
||||
* {{{./poms/alfresco-sdk-parent/index.html}An SDK POM}} providing full Alfresco project lifecycle feature, to be added as a <<<<parent>>>> 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 <<<<dependencyManagement>>>> on a particular Alfresco version / edition (Community / Enterprise)
|
||||
* The {{{./plugins/alfresco-maven-plugin/index.html} Alfresco Maven Plugin}} to manage AMP packaging and dependencies
|
||||
|
||||
*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.
|
||||
* {{{https://artifacts.alfresco.com/nexus/content/repositories/alfresco-docs/alfresco-platform-distribution/latest}Alfresco Platform Distribution POM}} can (optionally) be used to provide centralized <<<<dependencyManagement>>>> 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.
|
||||
|
||||
* 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
|
36
src/site/apt/prerequisites.apt.vm
Normal file
36
src/site/apt/prerequisites.apt.vm
Normal file
@@ -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 <<an IDE>> nor <<web container or database>> 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 <<<MAVEN_OPTS="-Xms256m -Xmx1G -XX:PermSize=300m">>> to your environment if your plan to launch tests / run embedded in Jetty
|
||||
|
||||
* Java 1.7 is <<required>> to run Alfresco 4.2.b+
|
||||
|
||||
* <<No manual downloading>> of Alfresco distribution is required.
|
||||
Alfresco platform is retrieved automatically from {{{https://artifacts.alfresco.com} the Alfresco Artifacts Repository}}
|
||||
based on the <<<alfresco.groupId>>> and <<<alfresco.version>>> POM properties
|
||||
|
||||
|
||||
H2 Embedded Support Pre-Requisites
|
||||
|
||||
This SDK allows H2 embedded run of Alfresco (<<NOTE>>: 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}}.
|
37
src/site/apt/why.apt.vm
Normal file
37
src/site/apt/why.apt.vm
Normal file
@@ -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 <process reuse> of your development practices,
|
||||
and, in certain successful cases, Application Lifecycle Management process at large.
|
||||
|
||||
Therefore Alfresco Community and Enterprise <developers>, <architects> and <project managers> 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}}
|
||||
|
||||
* <<IDE-independent SDK>>, features are provided by Apache Maven, which is the sole 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, 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}})
|
||||
|
||||
* <<Process ready>>, as it scales from quick start rapid application development, to be seamlessly integrated in enterprise devleopment processes like Continuous Integration and Release
|
||||
|
||||
* <<Clean and readable>>, 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.
|
@@ -13,7 +13,7 @@
|
||||
<href>http://www.alfresco.com</href>
|
||||
</topBarIcon>
|
||||
<topBarEnabled>true</topBarEnabled>
|
||||
<navBarStyle>navbar-inverse</navBarStyle
|
||||
<navBarStyle>navbar-inverse</navBarStyle>
|
||||
<sideBarEnabled>false</sideBarEnabled>
|
||||
<facebookLike />
|
||||
<googlePlusOne />
|
||||
@@ -32,17 +32,20 @@
|
||||
|
||||
<body>
|
||||
|
||||
<menu ref="modules" inherit="bottom"/>
|
||||
|
||||
<menu ref="parent" inherit="bottom"/>
|
||||
|
||||
<menu name="SDK Resources">
|
||||
<item name="FAQ" href="faq.html" />
|
||||
<item name="Alfresco SDK POM" href="https://artifacts.alfresco.com/nexus/content/repositories/alfresco-docs/alfresco-lifecycle-aggregator/latest/poms/alfresco-sdk-parent/index.html" />
|
||||
<menu name="Maven Alfresco SDK">
|
||||
<item name="Introduction" href="index.html"/>
|
||||
<item name="Maven Alfresco SDK Prerequisites" href="prerequisites.html" />
|
||||
<item name="Maven Alfresco SDK Properties" href="./poms/alfresco-sdk-parent/sdk-properties.html" />
|
||||
<item name="Why using SDK?" href="./why.html" />
|
||||
<item name="Alfresco SDK Parent POM" href="./poms/alfresco-sdk-parent/index.html" />
|
||||
<item name="Alfresco Platform Distribution POM" href="https://artifacts.alfresco.com/nexus/content/repositories/alfresco-docs/alfresco-platform-distribution/latest/index.html" />
|
||||
<item name="Maven AMP Plugin" href="http://maven.alfresco.com/nexus/content/repositories/alfresco-docs/maven-alfresco-lifecycle/latest/plugins/maven-amp-plugin/index.html" />
|
||||
</menu>
|
||||
|
||||
<menu ref="modules" inherit="bottom"/>
|
||||
|
||||
<menu name="Community Docs">
|
||||
<item name="Alfresco Maven Wiki Docs" href="http://wiki.alfresco.com/wiki/Maven_Alfresco_SDK" />
|
||||
<item name="Alfresco with Maven for Dummies" href="https://wiki.alfresco.com/wiki/Maven_For_Dummies" />
|
||||
@@ -55,6 +58,5 @@
|
||||
|
||||
<menu ref="reports" />
|
||||
|
||||
|
||||
</body>
|
||||
</project>
|
||||
|
Reference in New Issue
Block a user