Fixed issue #164 (deployment to Maven Central).

Deployed the first snapshot.

Updated documentation getting ready for beta-1.

Removed jetty references.

Added docs for the share-amp-archetype
This commit is contained in:
mindthegab 2014-08-22 16:07:17 -04:00
parent e354786112
commit d367cf4a00
28 changed files with 372 additions and 162 deletions

View File

@ -54,25 +54,6 @@
</dependencies>
</dependencyManagement>
<!-- This repository is only needed to retrieve Alfresco parent POM.
NOTE: This can be removed when/if Alfresco will be on Maven Central
NOTE: The repository to be used for Alfresco Enterprise artifacts is
https://artifacts.alfresco.com/nexus/content/groups/private/. Please check
with Alfresco Support to get credentials to add to your ~/.m2/settings.xml
if you are a Enterprise customer or Partner
-->
<repositories>
<repository>
<id>alfresco-public</id>
<url>https://artifacts.alfresco.com/nexus/content/groups/public</url>
</repository>
<repository>
<id>alfresco-public-snapshots</id>
<url>https://artifacts.alfresco.com/nexus/content/groups/public-snapshots</url>
</repository>
</repositories>
<!-- Invoke your build with -Prun to run the multimodule project and enable rapid dev mode in your IDE.
See 'run' profile in the sub modules pom.xml for further behavioral details.
-->

View File

@ -19,7 +19,7 @@ All-in-One Archetype properties
* <<<src/main/properties/<env>/alfresco-global.properties>>> (environment dependent <<<alfresco-global.properties>>> packaged in the WAR )
* For Alfresco AMP projects
* For Alfresco/Share AMP projects
* <<<src/test/properties/<env>/alfresco-global.properties>>> (environment dependent <<<alfresco-global.properties>>> for test WAR run)

View File

@ -20,7 +20,7 @@ Introduction
* 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
* Embedded run in Tomcat and embedded H2 database of the full Alfresco suite, including Repository, Share, Solr
* Support for unit and integration testings
@ -29,7 +29,7 @@ How to create a project:
You can create the latest release archetype with the following command:
+---+
mvn archetype:generate -DarchetypeCatalog=https://artifacts.alfresco.com/nexus/content/groups/public/archetype-catalog.xml -Dfilter=org.alfresco.maven.archetype:
mvn archetype:generate -Dfilter=org.alfresco.maven.archetype:
+---+
You should then:
@ -38,11 +38,11 @@ mvn archetype:generate -DarchetypeCatalog=https://artifacts.alfresco.com/nexus/c
[[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.c)
[[3]] (<Optionally>) Select Alfresco Version / Edition (current default is: Alfresco Community 5.0.a)
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
Instructions on how to use the Alfresco All in One 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}}

View File

@ -20,36 +20,37 @@ Project layout
|-> alfresco
|-> share
|-> solr
|-> wcmqs (Alfresco Web Quick Start)
|-> runner (a Jetty embedded runner / integration test runner)
|-> runner (a Tomcat 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
* <<<repo-amp>>>: An Repository Tier AMP project, demonstrating sample project structure and demo component loading
* <<<alfresco>>>: An <<<alfresco.war>>> Repository Extension, overlaying the Alfresco WAR with custom resources / classes
* <<<repo>>>: 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
* <<<share-amp>>>: A Share Tier AMP project, demonstrating sample project structure and demo component loading
* <<<share>>>: A <<<share.war>>> extension, overlaying the Share WAR with the custom developed <<<share-amp>>>
* <<<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
* <<<runner>>>: A Tomcat + 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
* Rapid development, in full IDE integration, and with hot classes reloading (using spring-loaded, check {{{../../prerequisites.html}prerequisites}}).
* AMP/WAR packaging
* AMP Unit testing
* run embedded in Jetty + H2 database.
* run embedded in Tomcat + 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

View File

@ -25,13 +25,15 @@
<menu name="SDK components">
<item name="Maven Alfresco SDK" href="../../index.html" />
<item name="Alfresco AMP Archetype" href="../alfresco-amp-archetype/index.html" />
<item name="Share AMP Archetype" href="../share-amp-archetype/index.html" />
<item name="Alfresco All-in-One Archetype" href="./index.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="Alfresco Maven Plugin" href="../../plugins/alfresco-maven-plugin/index.html" />
</menu>
<menu name="Maven Alfresco Community">
<menu name="Maven Alfresco Docs">
<item name="Official Alfresco SDK docs" href="http://docs.alfresco.com/community/concepts/alfresco-sdk-intro.html" />
<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/" />

View File

@ -75,26 +75,4 @@
</dependency>
</dependencies>
<!-- This repository is only needed to retrieve Alfresco parent POM.
NOTE: This can be removed when/if Alfresco will be on Maven Central
NOTE: The repository to be used for Alfresco Enterprise artifacts is
https://artifacts.alfresco.com/nexus/content/groups/private/. Please check
with Alfresco Support to get credentials to add to your ~/.m2/settings.xml
if you are a Enterprise customer or Partner
-->
<repositories>
<repository>
<id>alfresco-public</id>
<url>https://artifacts.alfresco.com/nexus/content/groups/public</url>
</repository>
<repository>
<id>alfresco-public-snapshots</id>
<url>https://artifacts.alfresco.com/nexus/content/groups/public-snapshots</url>
<snapshots>
<enabled>true</enabled>
<updatePolicy>daily</updatePolicy>
</snapshots>
</repository>
</repositories>
</project>

View File

@ -20,7 +20,7 @@
# Sample custom content and index data location
# This will create alf_data Relative to appserver run folder
# In this default file we take the property from the POM (for compatbility with local jetty and jboss deployments) but it can also be edited here.
# In this default file we take the property from the POM (for compatbility with local tomcat and jboss deployments) but it can also be edited here.
dir.root=${alfresco.data.location}
# Allowed values are: NONE, AUTO, FULL
index.recovery.mode=NONE

View File

@ -34,7 +34,8 @@ AMP Archetype properties
* AMP specific properties
In addition to the common properties, the following properties are specific of the AMP archetype:
In addition to the common properties, the following properties are specific of the AMP archetype. You can change
these properties to select a different WAR to install your AMP to (e.g. a pre-customized Alfresco or Share instance):
+---+
<project>

View File

@ -9,7 +9,7 @@
Introduction
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.
This archetype can be used for Alfresco Repository. For Share, please refer to the {{{../share-amp-archetype/index.html}Share AMP archetype}}
* Features
@ -19,12 +19,12 @@ Introduction
* AMP dependency management in Maven
* Installation of AMPs in an Alfresco or Share WAR
* Installation of AMPs in an Alfresco 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
* Embedded run in Tomcat 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:
@ -32,7 +32,7 @@ How to create a project:
You can create the latest release archetype with the following command:
+---+
mvn archetype:generate -DarchetypeCatalog=https://artifacts.alfresco.com/nexus/content/groups/public/archetype-catalog.xml -Dfilter=org.alfresco.maven.archetype:
mvn archetype:generate -Dfilter=org.alfresco.maven.archetype:
+---+
You should then:

View File

@ -1,5 +1,5 @@
------
Alfresco Maven AMP Archetype Usage
Alfresco AMP Archetype Usage
------
Gabriele Columbro
------
@ -26,7 +26,7 @@ Project layout
|-> web/
|-> licenses/
src/main/java //Java classes to be packaged in the AMP embedded JAR)
src/main/resources //resources to the packaged in the AMP embedded JAR)
src/main/resources //resources to the packaged in the AMP embedded JAR
src/test/java // Unit tests
src/test/resources // Unit test resources
src/test/properties/<env> // Environment aware alfresco-global.properties. By default <env>=local
@ -41,7 +41,9 @@ Usage
* packaging
* testing
* rapid development
* testing (unit and integration)
* run embedded
@ -62,11 +64,10 @@ Commands
* <<<mvn install -Dmaven.test.skip=true>>>: Like <<<mvn install>>> but skips unit tests
* <<<mvn install -Pamp-to-war>>> Like <<<mvn package -Pamp-to-war>>>
but also installs and runs the resulting WAR+AMP in Tomcat + H2 embedded for integration testing.
When you run this command then you can access in your browser <<< {{{http://localhost:8080/alfresco}}} >>> or <<< {{{http://localhost:8080/share}}} >>>
depending on the value of the property <<<alfresco.client.war>>>
but also installs and runs the resulting WAR+AMP in Tomcat + H2 embedded from running and development.
This also enables rapid application development features, like hot reloading and remote JUnit running.
When you run this command then you can access in your browser <<< {{{http://localhost:8080/alfresco}}} >>>.
* <<<mvn install -Pamp-to-war -Dalfresco.client.war=share>>>: Like <<<mvn install -Pamp-to-war>>> but installs the AMP and runs on the Share WAR in Tomcat embedded.
* <<<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>>>

View File

@ -26,6 +26,7 @@
<menu name="SDK components">
<item name="Maven Alfresco SDK" href="../../index.html" />
<item name="Alfresco AMP Archetype" href="./index.html" />
<item name="Share AMP Archetype" href="../share-amp-archetype/index.html" />
<item name="Alfresco All-in-One Archetype" href="../alfresco-allinone-archetype/index.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" />
@ -33,6 +34,7 @@
</menu>
<menu name="Maven Alfresco Community">
<item name="Official Alfresco SDK docs" href="http://docs.alfresco.com/community/concepts/alfresco-sdk-intro.html" />
<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/" />

View File

@ -75,26 +75,4 @@
</dependencies>
<!-- This repository is only needed to retrieve Alfresco parent POM.
NOTE: This can be removed when/if Alfresco will be on Maven Central
NOTE: The repository to be used for Alfresco Enterprise artifacts is
https://artifacts.alfresco.com/nexus/content/groups/private/. Please check
with Alfresco Support to get credentials to add to your ~/.m2/settings.xml
if you are a Enterprise customer or Partner
-->
<repositories>
<repository>
<id>alfresco-public</id>
<url>https://artifacts.alfresco.com/nexus/content/groups/public</url>
</repository>
<repository>
<id>alfresco-public-snapshots</id>
<url>https://artifacts.alfresco.com/nexus/content/groups/public-snapshots</url>
<snapshots>
<enabled>true</enabled>
<updatePolicy>daily</updatePolicy>
</snapshots>
</repository>
</repositories>
</project>

View File

@ -0,0 +1,62 @@
------
Share AMP Archetype Advanced Usage
------
Gabriele Columbro
------
Aug 2014
------
AMP Unit Testing
Unit test your AMP customization is as easy as adding your tests in <<<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.
Share 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. You can change
these properties to select a different WAR to install your AMP to (e.g. a pre-customized Alfresco or Share instance):
+---+
<project>
...
<properties>
<!--
Determines the coordinates of target WAR for this AMP
Allowed values: alfresco (default) | share
-->
<alfresco.client.war>alfresco</alfresco.client.war>
<alfresco.client.war.groupId>${alfresco.groupId}</alfresco.client.war.groupId>
<alfresco.client.war.version>${alfresco.version}</alfresco.client.war.version>
</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.

View File

@ -0,0 +1,52 @@
------
Building AMPs (Alfresco Module Packages) with Maven
------
Gabriele Columbro
------
Aug 2014
------
Introduction
The Share AMP Archetype is a sample fully featured project to manage AMP (Alfresco Module Package) projects for Alfresco Share.
This archetype can be used for Alfresco Share. For Alfresco Repository AMPs, please refer to the {{{../alfresco-amp-archetype/index.html}Alfresco AMP archetype}}
* Features
Amongst other features, this archetype provides support for:
* <<<amp>>> packaging support for your projects
* AMP dependency management in Maven
* Installation of AMPs in the Share WAR
* AMP Unit Testing support. Just run the standard <<<mvn test>>> and see your <<<src/test/java>>> Alfresco unit tests run.
An sample Unit Test is provided in this archetype.
* Embedded run in Tomcat and embedded H2 database for demo purposes, rapid application development and integration testing. Share runs on port 8081 by default, but you can control
this setting with the <<<maven.tomcat.port>>> pom property.
(<<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 -Dfilter=org.alfresco.maven.archetype:
+---+
You should then:
[[1]] Select the <<<share-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 5.0.a)
You can find new Share AMP project ready to go in the <<<artifactId>>> folder.
Usage
Instructions on how to use the Share AMP archetype can be found on the {{{./usage.html}usage page}}, while
for more advanced use cases refer to the {{{./advanced-usage.html}advanced usage page}}

View File

@ -0,0 +1,73 @@
------
Share AMP Archetype Usage
------
Gabriele Columbro
------
Nov 2012
------
Prerequisites
See {{{../../prerequisites.html}SDK Pre-Requisites}} to successfully run this archetype.
Project layout
The archetype generated project should look like:
+---+
pom.xml
src/main/amp
|-> module.properties
|-> file-mapping.properties (optional)
|-> config/
|-> web/
|-> licenses/
src/main/java //Java classes to be packaged in the AMP embedded JAR)
src/main/resources //resources to the packaged in the AMP embedded JAR
src/main/resources/META-INF/resource //resources to the packaged in the AMP embedded JAR/META-INF and automatically mapped to the root of the webapp
src/test/java // Unit tests
src/test/resources // Unit test resources
src/test/properties/<env> // Environment aware alfresco-global.properties. By default <env>=local
+---+
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
* rapid development
* testing (unit and integration)
* run embedded
* integration testing
* release and distribution of your AMP artifact.
The AMPs produced with this project are fully compatible with Alfresco MMT, in fact the 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 install -Pamp-to-war>>> Like <<<mvn package -Pamp-to-war>>>
but also installs and runs the resulting WAR+AMP in Tomcat + H2 embedded from running and development.
This also enables rapid application development features, like hot reloading and remote JUnit running.
When you run this command then you can access in your browser <<< {{{http://localhost:8081/share}}} >>>.
* <<<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>>>

View File

@ -0,0 +1,51 @@
<project>
<body>
<!--<menu ref="parent" inherit="bottom"/>-->
<head>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', '${gaTrackingId}']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</head>
<menu name="Share 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="SDK components">
<item name="Maven Alfresco SDK" href="../../index.html" />
<item name="Alfresco AMP Archetype" href="../alfresco-amp-archetype/index.html" />
<item name="Share AMP Archetype" href="./index.html" />
<item name="Alfresco All-in-One Archetype" href="../alfresco-allinone-archetype/index.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="Alfresco Maven Plugin" href="../../plugins/alfresco-maven-plugin/index.html" />
</menu>
<menu name="Maven Alfresco Community">
<item name="Official Alfresco SDK docs" href="http://docs.alfresco.com/community/concepts/alfresco-sdk-intro.html" />
<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>
<!-- maybe it's inherited? -->
<!--<menu ref="reports"/>-->
</body>
</project>

View File

@ -24,7 +24,7 @@ Introduction
* 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
* Embedded run in Tomcat 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:
@ -32,7 +32,7 @@ How to create a project:
You can create the latest release archetype with the following command:
+---+
mvn archetype:generate -DarchetypeCatalog=https://artifacts.alfresco.com/nexus/content/groups/public/archetype-catalog.xml -Dfilter=org.alfresco.maven.archetype:
mvn archetype:generate -Dfilter=org.alfresco.maven.archetype:
+---+
You should then:

1
modules/alfresco-rad/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/target/

View File

@ -28,6 +28,7 @@
<menu name="SDK components">
<item name="Maven Alfresco SDK" href="../../index.html" />
<item name="Alfresco AMP Archetype" href="../../archetypes/alfresco-amp-archetype/index.html" />
<item name="Share AMP Archetype" href="../../archetypes/share-amp-archetype/index.html" />
<item name="Alfresco All-in-One Archetype" href="../../archetypes/alfresco-allinone-archetype/index.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" />
@ -35,6 +36,7 @@
</menu>
<menu name="Maven Alfresco Community">
<item name="Official Alfresco SDK docs" href="http://docs.alfresco.com/community/concepts/alfresco-sdk-intro.html" />
<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/" />

11
pom.xml
View File

@ -137,7 +137,7 @@
<profiles>
<profile>
<id>release</id>
<id>sdk-release</id>
<properties>
<maven.site.url>https://artifacts.alfresco.com/nexus/content/repositories/alfresco-docs/alfresco-lifecycle-aggregator/latest</maven.site.url>
<maven.release.version>2.4.2</maven.release.version>
@ -186,13 +186,12 @@
</reporting>
<distributionManagement>
<repository>
<id>alfresco-internal</id>
<url>https://artifacts.alfresco.com/nexus/content/repositories/releases</url>
<id>central-releases-staging</id>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2</url>
</repository>
<snapshotRepository>
<name>alfresco snapshots repository</name>
<id>alfresco-internal-snapshots</id>
<url>https://artifacts.alfresco.com/nexus/content/repositories/snapshots</url>
<id>central-snapshots</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
<site>
<id>alfresco-docs</id>

View File

@ -122,6 +122,14 @@
<junit.version>4.11</junit.version>
</properties>
<!-- This repository is only needed to retrieve Alfresco parent POM.
NOTE: This can be removed when/if Alfresco will be on Maven Central
NOTE: The repository to be used for Alfresco Enterprise artifacts is
https://artifacts.alfresco.com/nexus/content/groups/private/. Please check
with Alfresco Support to get credentials to add to your ~/.m2/settings.xml
if you are a Enterprise customer or Partner
-->
<repositories>
<repository>
<id>alfresco-public</id>

View File

@ -11,7 +11,7 @@ Introduction
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 {{{https://artifacts.alfresco.com/nexus/index.html#nexus-search;gav~org.alfresco.maven~alfresco-sdk-parent~${project.version}~pom~}on Alfresco Maven Repository}}.
The current version of the POM in use in the Maven Alfresco SDK\x99 ${project.version} is available {{{https://oss.sonatype.org/index.html#nexus-search;gav~org.alfresco.maven~alfresco-sdk-parent~${project.version}~pom~}on Maven Central}}.
Usage

View File

@ -60,6 +60,7 @@
<menu name="SDK components">
<item name="Maven Alfresco SDK" href="../../index.html" />
<item name="Alfresco AMP Archetype" href="../../archetypes/alfresco-amp-archetype/index.html" />
<item name="Share AMP Archetype" href="../../archetypes/share-amp-archetype/index.html" />
<item name="Alfresco All-in-One Archetype" href="../../archetypes/alfresco-allinone-archetype/index.html" />
<item name="Alfresco SDK Parent POM" href="./index.html" />
<item name="Alfresco Platform Distribution POM" href="https://artifacts.alfresco.com/nexus/content/repositories/alfresco-docs/alfresco-platform-distribution/latest/index.html" />
@ -67,6 +68,7 @@
</menu>
<menu name="Maven Alfresco Community">
<item name="Official Alfresco SDK docs" href="http://docs.alfresco.com/community/concepts/alfresco-sdk-intro.html" />
<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/" />

View File

@ -1,18 +0,0 @@
<?xml version="1.0"?>
<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd">
<Configure class="org.mortbay.jetty.webapp.WebAppContext">
<New id="myDataSource"
class="org.mortbay.jetty.plus.naming.Resource">
<Arg>jdbc/dataSource</Arg>
<Arg>
<New class="com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource">
<Set name="Url">jdbc:mysql://${alfresco.db.url}/${alfresco.db.name}</Set>
<Set name="User">${alfresco.db.username}</Set>
<Set name="Password">${alfresco.db.password}</Set>
</New>
</Arg>
</New>
</Configure>

View File

@ -3,26 +3,37 @@
------
Gabriele Columbro
------
Nov 2012
Aug 2014
------
Introduction
The Maven Alfresco SDK\x99 - formerly {{{https://artifacts.alfresco.com/nexus/content/repositories/alfresco-docs/maven-alfresco-lifecycle/latest/index.html} Maven Alfresco Lifecycle 3.9.1}} -
The (Maven) Alfresco SDK\x99 - formerly {{{https://artifacts.alfresco.com/nexus/content/repositories/alfresco-docs/maven-alfresco-lifecycle/latest/index.html} 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.
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}}.
The Maven Alfresco SDK\x99 is fully documented in the single components websites (see menu above).
For official (Enterprise) support of this SDK please refer to the features and tutorials documented in {{{http://docs.alfresco.com/community/concepts/alfresco-sdk-intro.html}the Official Alfresco Docs}}.
* Rationale
How to Use the SDK
The easiest way to use the SDK is to create a sample project using one of the available <<archetypes>> (Repo AMP, Share AMP, All in One).
You can also use the Alfresco SDK Parent POM directly in your Maven project to inherit Alfresco behaviors and configurations.
SDK Versions
As of version 2.0, releases for the Alfresco SDK are available in Maven Central.
Alfresco SDK 1.x versions rely on the {{{https://artifacts.alfresco.com/nexus/content/groups/public/}Alfresco Artifacts Repository}}.
For documentation on the Maven Alfresco SDK\x99 1.x please refer to {{{https://artifacts.alfresco.com/nexus/content/repositories/alfresco-docs/alfresco-lifecycle-aggregator/1.x/latest/index.html} Maven Alfresco SDK 1.x}}
SDK Alfresco Compatibility
Please refer to the {{{http://docs.alfresco.com/community/concepts/alfresco-sdk-compatibility.html}official Alfresco docs}} for details of SDK / Alfresco compatibility.
The Alfresco Maven SDK introduces a new way of conceiving software development, deployment and release of Alfresco related projects and artifacts.
In contrast to the manual (and error prone) deployment approach based on an installer / Alfresco WAR distribution(s) and the <infamous> <<<${extensionRoot}>>>,
the Maven SDK provides a unified access to fine grained Artifacts (jar,war,pom files),] that can be easily integrated
in your project by the means of Alfresco-specific Maven components and configurations. The main goal of this SDK is to
enable rapid development and prototyping of Alfresco projects, while enabling agile development practices (i.e. TDD, FDD)
and fostering process reuse due to standardization
Maven Alfresco SDK\x99 components
@ -30,7 +41,7 @@ Maven Alfresco SDK\x99 components
* {{{./poms/alfresco-sdk-parent/index.html}The SDK parent 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}Repo AMP}}, {{{./archetypes/share-amp-archetype/index.html}Share 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
* The {{{./plugins/alfresco-maven-plugin/index.html} Alfresco Maven Plugin}} to manage AMP packaging and dependencies
@ -45,12 +56,12 @@ Pre-requisites
No manual Alfresco download, application server or database is required.
See details in the {{{./prerequisites.html} SDK pre-requisites page}}.
* Alfresco Compatibility
* Rapid development with Spring Loaded
Maven Alfresco SDK\x99 ${project.version} is compatible (for now) with Alfresco Community (4.2b+) and Enterprise (4.1.2+).
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.
The SDK (as of 2.0) support true rapid development and IDE integration. To allow hot reload of Java classes the SDK leverages
{{{https://github.com/spring-projects/spring-loaded}spring-loaded}}, a library which allows seamless reloading of classfiles.
Check the {{{./prerequisites.html} SDK pre-requisites page}} to enable spring-loaded rapid development.
Project History
@ -67,3 +78,5 @@ Project History
* In October 2012 Alfresco finalises the {{{https://issues.alfresco.com/jira/browse/ALF-14353} Maven modularisation and dependency categorisation}}, delivering {{{https://artifacts.alfresco.com}artifacts and poms}}
* The new Alfresco Maven SDK 1.0 is released and presented on Tuesday 7 November at {{{http://devcon.alfresco.com/}Alfresco DevCon}} in Berlin.
* The new Alfresco Maven SDK 2.0 is released and presented on late 2014 November and released on Maven Central

View File

@ -3,31 +3,41 @@
------
Gabriele Columbro
------
Nov 2012
August 2014
------
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;
The only real prerequisite of the Maven Alfresco SDK\x99 Apache Maven 3.0.4 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
* add <<<MAVEN_OPTS="-Xms256m -Xmx1G -XX:PermSize=300m">>> to your environment if your plan to launch tests / run embedded in Tomcat
* Alfresco compability: Communtiy 4.2+ | Enterprise 4.1.2+
* Refer to this {{{http://docs.alfresco.com/community/concepts/alfresco-sdk-compatibility.html}matrix}} for Alfresco/SDK version compatibility
* Java 1.7 is <<required>> to run Alfresco 4.2.b+
* Java 1.7 is <<required>> to run Alfresco 4.2.b+ and the SDK 1.1.x +
* <<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
Enable hot class reload with spring-loaded
In order to enable hot class reload you should use the spring-loaded agent and run all your maven builds with it configured in the JVM.
To achieve this you can:
* Download the spring-loaded library from {{{http://search.maven.org/remotecontent?filepath=org/springframework/springloaded/1.2.0.RELEASE/springloaded-1.2.0.RELEASE.jar}here}}.
* Export the following MAVEN_OPTS: <<<MAVEN_OPTS="$MAVEN_OPTS -javaagent:/path/to/your/springloaded/jar/springloaded-1.2.0.RELEASE.jar -noverify">>>.
H2 Embedded Support Pre-Requisites
This SDK allows H2 embedded run of Alfresco (<<NOTE>>: this is an unsupported configuration for Alfresco Enterprise) leveraging

View File

@ -6,6 +6,15 @@
Nov 2012
------
Rationale
The Alfresco Maven SDK introduces a new way of conceiving software development, deployment and release of Alfresco related projects and artifacts.
In contrast to the manual (and error prone) deployment approach based on an installer / Alfresco WAR distribution(s) and the <infamous> <<<${extensionRoot}>>>,
the Maven SDK provides a unified access to fine grained Artifacts (jar,war,pom files),] that can be easily integrated
in your project by the means of Alfresco-specific Maven components and configurations. The main goal of this SDK is to
enable rapid development and prototyping of Alfresco projects, while enabling agile development practices (i.e. TDD, FDD)
and fostering process reuse due to standardization
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,

View File

@ -55,6 +55,7 @@
<menu name="SDK components">
<item name="Maven Alfresco SDK" href="./index.html" />
<item name="Alfresco AMP Archetype" href="./archetypes/alfresco-amp-archetype/index.html" />
<item name="Share AMP Archetype" href="./archetypes/alfresco-amp-archetype/index.html" />
<item name="Alfresco All-in-One Archetype" href="./archetypes/alfresco-allinone-archetype/index.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" />
@ -62,6 +63,7 @@
</menu>
<menu name="Community Docs">
<item name="Official Alfresco SDK docs" href="http://docs.alfresco.com/community/concepts/alfresco-sdk-intro.html" />
<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/" />