Fixes issue #164, merged pull request #216

- -Penterprise is now added and SDK will run against latest alfresco
enterprise
- currently Alfresco INTERNAL only (no Enterprise SNAPSHOTs published)
- tested with latest Enterprise HEAD and also aligned artifactId to new
naming (alfresco-enterprise|share-enterprise)
- updated docs


Merge remote-tracking branch 'origin/enterprise-profile'

Conflicts:
	archetypes/alfresco-allinone-archetype/src/main/resources/archetype-resources/pom.xml
	archetypes/alfresco-amp-archetype/src/main/resources/archetype-resources/pom.xml
	archetypes/share-amp-archetype/src/main/resources/archetype-resources/pom.xml
	poms/alfresco-sdk-parent/pom.xml
	poms/alfresco-sdk-parent/src/site/apt/sdk-profiles.apt.vm
	src/site/apt/prerequisites.apt.vm
This commit is contained in:
mindthegab 2014-09-11 01:28:54 -04:00
commit a0c8e3e867
10 changed files with 91 additions and 50 deletions

View File

@ -23,11 +23,11 @@
| Defines the groupId for the Alfresco Artifacts to work against. As of 4.2 the only allowed value is: org.alfresco | Defines the groupId for the Alfresco Artifacts to work against. As of 4.2 the only allowed value is: org.alfresco
| NOTE: See http://docs.alfresco.com/4.2/concepts/dev-extensions-maven-sdk-tutorials-alfresco-enterprise.html for details | NOTE: See http://docs.alfresco.com/4.2/concepts/dev-extensions-maven-sdk-tutorials-alfresco-enterprise.html for details
--> -->
<alfresco.groupId>${alfresco_target_groupId}</alfresco.groupId> <!-- <alfresco.groupId>${alfresco_target_groupId}</alfresco.groupId> -->
<!-- Defines the Alfresco version to work against. <!-- Defines the Alfresco version to work against.
Community versions are typically identified by major.minor.character (4.2.a) while Enterprise versions are identified by major.minor.digit (4.2.0) Community versions are typically identified by major.minor.character (4.2.a) while Enterprise versions are identified by major.minor.digit (4.2.0)
--> -->
<alfresco.version>${alfresco_target_version}</alfresco.version> <!--<alfresco.version>${alfresco_target_version}</alfresco.version>-->
<!-- This control the root logging level for all apps --> <!-- This control the root logging level for all apps -->
<app.log.root.level>WARN</app.log.root.level> <app.log.root.level>WARN</app.log.root.level>
<!-- This controls the default data location for dir.root --> <!-- This controls the default data location for dir.root -->

View File

@ -27,7 +27,7 @@
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>${alfresco.groupId}</groupId> <groupId>${alfresco.groupId}</groupId>
<artifactId>alfresco</artifactId> <artifactId>${alfresco.repo.artifactId}</artifactId>
<type>war</type> <type>war</type>
</dependency> </dependency>
<!-- Demonstrating the dependency / installation of the repo AMP developed in the 'repo-amp' module --> <!-- Demonstrating the dependency / installation of the repo AMP developed in the 'repo-amp' module -->
@ -63,7 +63,7 @@
<!-- The Alfresco WAR --> <!-- The Alfresco WAR -->
<overlay> <overlay>
<groupId>${alfresco.groupId}</groupId> <groupId>${alfresco.groupId}</groupId>
<artifactId>alfresco</artifactId> <artifactId>${alfresco.repo.artifactId}</artifactId>
<type>war</type> <type>war</type>
<!-- To allow inclusion of META-INF --> <!-- To allow inclusion of META-INF -->
<excludes/> <excludes/>
@ -140,15 +140,16 @@
</plugin> </plugin>
</plugins> </plugins>
</build> </build>
<!-- Needed to fix http://code.google.com/p/maven-alfresco-archetypes/issues/detail?id=150 --> <!-- Needed to fix http://code.google.com/p/maven-alfresco-archetypes/issues/detail?id=150.
Only for community, scope controlled by dependencyManagement via sdk-parent -->
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>org.slf4j</groupId> <groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId> <artifactId>jcl-over-slf4j</artifactId>
<version>1.5.11</version>
</dependency> </dependency>
</dependencies> </dependencies>
</profile> </profile>
<!-- Installs the needed runtime artifact for an RM (Records Management) project -->
<profile> <profile>
<id>rm</id> <id>rm</id>
<properties> <properties>

View File

@ -16,7 +16,7 @@
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>${alfresco.groupId}</groupId> <groupId>${alfresco.groupId}</groupId>
<artifactId>share</artifactId> <artifactId>${alfresco.share.artifactId}</artifactId>
<type>war</type> <type>war</type>
</dependency> </dependency>
<!-- Demonstrating the dependency / installation of the share AMP developed in the 'share-amp' module --> <!-- Demonstrating the dependency / installation of the share AMP developed in the 'share-amp' module -->
@ -44,7 +44,7 @@
<!-- The Share WAR --> <!-- The Share WAR -->
<overlay> <overlay>
<groupId>${alfresco.groupId}</groupId> <groupId>${alfresco.groupId}</groupId>
<artifactId>share</artifactId> <artifactId>${alfresco.share.artifactId}</artifactId>
<type>war</type> <type>war</type>
<!-- To allow inclusion of META-INF --> <!-- To allow inclusion of META-INF -->
<excludes/> <excludes/>
@ -61,6 +61,7 @@
</plugins> </plugins>
</build> </build>
<profiles> <profiles>
<!-- Installs the needed runtime component for an Alfresco RM (Records Management) project -->
<profile> <profile>
<id>rm</id> <id>rm</id>
<properties> <properties>

View File

@ -12,15 +12,6 @@
<requiredProperty key="alfresco_target_version"> <requiredProperty key="alfresco_target_version">
<defaultValue>5.0.a</defaultValue> <defaultValue>5.0.a</defaultValue>
</requiredProperty> </requiredProperty>
<requiredProperty key="alfresco_target_amp_client_war">
<defaultValue>alfresco</defaultValue>
</requiredProperty>
<requiredProperty key="alfresco_target_amp_client_war_groupId">
<defaultValue>org.alfresco</defaultValue>
</requiredProperty>
<requiredProperty key="alfresco_target_amp_client_war_version">
<defaultValue>5.0.a</defaultValue>
</requiredProperty>
<requiredProperty key="package"> <requiredProperty key="package">
<defaultValue>(not used)</defaultValue> <defaultValue>(not used)</defaultValue>
</requiredProperty> </requiredProperty>

View File

@ -25,22 +25,26 @@
| Defines the groupId for the Alfresco Artifacts to work against. As of 4.2 the only allowed value is: org.alfresco | Defines the groupId for the Alfresco Artifacts to work against. As of 4.2 the only allowed value is: org.alfresco
| NOTE: See http://docs.alfresco.com/4.2/concepts/dev-extensions-maven-sdk-tutorials-alfresco-enterprise.html for details | NOTE: See http://docs.alfresco.com/4.2/concepts/dev-extensions-maven-sdk-tutorials-alfresco-enterprise.html for details
--> -->
<alfresco.groupId>${alfresco_target_groupId}</alfresco.groupId> <!-- <alfresco.groupId>${alfresco_target_groupId}</alfresco.groupId> -->
<!-- Defines the Alfresco version to work against. <!-- Defines the Alfresco version to work against.
Community versions are typically identified by major.minor.character (4.2.a) while Enterprise versions are identified by major.minor.digit (4.2.0) --> Community versions are typically identified by major.minor.character (4.2.a) while Enterprise versions are identified by major.minor.digit (4.2.0) -->
<alfresco.version>${alfresco_target_version}</alfresco.version> <!-- <alfresco.version>${alfresco_target_version}</alfresco.version>-->
<app.log.root.level>WARN</app.log.root.level> <app.log.root.level>WARN</app.log.root.level>
<alfresco.data.location>alf_data_dev</alfresco.data.location> <alfresco.data.location>alf_data_dev</alfresco.data.location>
<!-- Defines the target WAR artifactId to run this amp, only used with the -Pamp-to-war switch
. | Allowed values: alfresco | share. Defaults to a repository AMP, but could point to your foundation WAR -->
<alfresco.client.war>${alfresco_target_amp_client_war}</alfresco.client.war>
<!-- Defines the target WAR groupId to run this amp, only used with the -Pamp-to-war switch
. | Could be org.alfresco or your corporate groupId -->
<alfresco.client.war.groupId>${alfresco_target_amp_client_war_groupId}</alfresco.client.war.groupId>
<!-- Defines the target WAR version to run this amp, only used with the -Pamp-to-war switch -->
<alfresco.client.war.version>${alfresco_target_amp_client_war_version}</alfresco.client.war.version>
<!-- This controls which properties will be picked in src/test/properties for embedded run --> <!-- This controls which properties will be picked in src/test/properties for embedded run -->
<env>local</env> <env>local</env>
<!-- Defines the target WAR artifactId to run this amp, only used with the -Pamp-to-war profile
| Defaults to a vanilla repository AMP, but could point to your foundation / aggregator WAR
. | Allowed values for Community: alfresco | share
| Allowed values for Enterprise: alfresco-enterprise | share-enterprise
<!-- <alfresco.client.war>${alfresco.repo.artifactId}</alfresco.client.war> -->
<!-- Defines the target WAR groupId to run this amp, only used with the -Pamp-to-war switch
. | Could be org.alfresco or your corporate groupId -->
<!-- <alfresco.client.war.groupId>${alfresco.groupId}</alfresco.client.war.groupId> -->
<!-- Defines the target WAR version to run this amp, only used with the -Pamp-to-war switch -->
<!-- <alfresco.client.war.version>${alfresco.version}</alfresco.client.war.version>-->
</properties> </properties>
<!-- Here we realize the connection with the Alfresco selected platform <!-- Here we realize the connection with the Alfresco selected platform

View File

@ -12,15 +12,6 @@
<requiredProperty key="alfresco_target_version"> <requiredProperty key="alfresco_target_version">
<defaultValue>5.0.a</defaultValue> <defaultValue>5.0.a</defaultValue>
</requiredProperty> </requiredProperty>
<requiredProperty key="alfresco_target_amp_client_war">
<defaultValue>share</defaultValue>
</requiredProperty>
<requiredProperty key="alfresco_target_amp_client_war_groupId">
<defaultValue>org.alfresco</defaultValue>
</requiredProperty>
<requiredProperty key="alfresco_target_amp_client_war_version">
<defaultValue>5.0.a</defaultValue>
</requiredProperty>
<requiredProperty key="package"> <requiredProperty key="package">
<defaultValue>(not used)</defaultValue> <defaultValue>(not used)</defaultValue>
</requiredProperty> </requiredProperty>

View File

@ -23,7 +23,7 @@
<properties> <properties>
<!-- Defines the target WAR artifactId to run this amp, only used with the -Pamp-to-war switch <!-- Defines the target WAR artifactId to run this amp, only used with the -Pamp-to-war switch
| Allowed values: alfresco | share. In this case it's configured to use OOTB share --> | Allowed values: alfresco | share. In this case it's configured to use OOTB share -->
<alfresco.client.war>share</alfresco.client.war> <alfresco.client.war>${alfresco.share.artifactId}</alfresco.client.war>
<!-- Since Alfresco is already running on port 8080, we run Share on port 8081 --> <!-- Since Alfresco is already running on port 8080, we run Share on port 8081 -->
<maven.tomcat.port>8081</maven.tomcat.port> <maven.tomcat.port>8081</maven.tomcat.port>
@ -35,7 +35,8 @@
Community versions are typically identified by major.minor.character (4.2.a), Community versions are typically identified by major.minor.character (4.2.a),
while Enterprise versions are identified by major.minor.digit (4.2.0) while Enterprise versions are identified by major.minor.digit (4.2.0)
--> -->
<alfresco.version>${alfresco_target_version}</alfresco.version> <!--<alfresco.version>${alfresco_target_version}</alfresco.version>-->
<!-- Defines the log level used in log4j.properties --> <!-- Defines the log level used in log4j.properties -->
<app.log.root.level>WARN</app.log.root.level> <app.log.root.level>WARN</app.log.root.level>

View File

@ -38,11 +38,14 @@
--> -->
<alfresco.groupId>org.alfresco</alfresco.groupId> <alfresco.groupId>org.alfresco</alfresco.groupId>
<alfresco.version>5.0.a</alfresco.version> <alfresco.version>5.0.a</alfresco.version>
<!-- By default uses community artifacts (alfresco|share). Overridden in the 'enterprise' profile, with 'alfresco-enterprise' and 'share-enterprise' -->
<alfresco.repo.artifactId>alfresco</alfresco.repo.artifactId>
<alfresco.share.artifactId>share</alfresco.share.artifactId>
<!-- Values can be "alfresco" or "share". Default value is 'alfresco' assuming you are developing a repository AMP, change to share for share AMPs <!-- Values can be "alfresco" or "share". Default value is 'alfresco' assuming you are developing a repository AMP, change to share for share AMPs
| This impact (in AMP projects) the choice of the WAR project for embedded run | This impact (in AMP projects) the choice of the WAR project for embedded run
--> -->
<alfresco.client.war>alfresco</alfresco.client.war> <alfresco.client.war>${alfresco.repo.artifactId}</alfresco.client.war>
<alfresco.client.war.groupId>${alfresco.groupId}</alfresco.client.war.groupId> <alfresco.client.war.groupId>${alfresco.groupId}</alfresco.client.war.groupId>
<alfresco.client.war.version>${alfresco.version}</alfresco.client.war.version> <alfresco.client.war.version>${alfresco.version}</alfresco.client.war.version>
<alfresco.client.contextPath>/${alfresco.client.war}</alfresco.client.contextPath> <alfresco.client.contextPath>/${alfresco.client.war}</alfresco.client.contextPath>
@ -97,6 +100,10 @@
<app.log.dir>${project.build.directory}/</app.log.dir> <app.log.dir>${project.build.directory}/</app.log.dir>
<app.log.root.level>WARN</app.log.root.level> <app.log.root.level>WARN</app.log.root.level>
<!-- Needed for community to avoid weird logging exceptions -->
<app.slf4j.scope>runtime</app.slf4j.scope>
<app.slf4j.version>1.5.11</app.slf4j.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<!-- Maven Plugins Versions used by the SDK --> <!-- Maven Plugins Versions used by the SDK -->
@ -343,6 +350,19 @@
</testResources> </testResources>
</build> </build>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
<version>${app.slf4j.version}</version>
<scope>${app.slf4j.scope}</scope>
</dependency>
</dependencies>
</dependencyManagement>
<!-- Feature / behavioral profiles --> <!-- Feature / behavioral profiles -->
<profiles> <profiles>
<!-- Enable environment properties filtering based on the env property --> <!-- Enable environment properties filtering based on the env property -->
@ -669,12 +689,11 @@
<dependency> <dependency>
<groupId>org.slf4j</groupId> <groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId> <artifactId>jcl-over-slf4j</artifactId>
<version>1.5.11</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.slf4j</groupId> <groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId> <artifactId>slf4j-log4j12</artifactId>
<version>1.5.11</version> <version>${app.slf4j.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.alfresco.maven</groupId> <groupId>org.alfresco.maven</groupId>
@ -779,5 +798,32 @@
</plugins> </plugins>
</build> </build>
</profile> </profile>
<!-- NOTE: (Expertimental && Private) Alfresco 5 Enterprise is not released yet, this is used for internal testing
Enables working with Alfresco Enterprise latest version. You can then manually override the alfresco.version in your pom.xml
-->
<profile>
<id>enterprise</id>
<properties>
<alfresco.version>5.0-BF-SNAPSHOT</alfresco.version>
<alfresco.repo.artifactId>alfresco-enterprise</alfresco.repo.artifactId>
<alfresco.share.artifactId>share-enterprise</alfresco.share.artifactId>
<!-- Not needed in the webapp for enterprise -->
<app.slf4j.scope>provided</app.slf4j.scope>
</properties>
<repositories>
<repository>
<id>alfresco-internal</id>
<url>https://artifacts.alfresco.com/nexus/content/groups/internal</url>
</repository>
<repository>
<id>alfresco-internal-snapshots</id>
<url>https://artifacts.alfresco.com/nexus/content/repositories/internal-snapshots/</url>
<snapshots>
<enabled>true</enabled>
<updatePolicy>daily</updatePolicy>
</snapshots>
</repository>
</repositories>
</profile>
</profiles> </profiles>
</project> </project>

View File

@ -3,35 +3,39 @@
------ ------
Gabriele Columbro Gabriele Columbro
------ ------
Nov 2012 Aug 2014
------ ------
SDK Available Profiles SDK Available Profiles
The Maven Alfresco SDK\x99 defines common features required by different Alfresco projects. 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 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), {{{../../archetypes/alfresco-amp-archetype/index.html}Repo AMP}}, {{{../../archetypes/share-amp-archetype/index.html}Share 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. 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): Here goes the list of common used profiles (with their activation conditions):
*-----------+--------------+-------------+-------------+-------------+ *-----------+--------------+-------------+-------------+-------------+
|| Archetypes || Profile || Description || Activation || Phase | || Archetypes || Profile || Description || Activation || Phase |
*-----------+--------------+-------------+-------------+-------------+ *-----------+--------------+-------------+-------------+-------------+
| amp, share-amp | amp-to-war | Allows AMP projects to be run embedded on a WAR and in rapid dev mode | Manual: <<<-Pamp-to-war>>> | pre-integration-test | | amp, share-amp | amp-to-war | Allows AMP projects to be run embedded on a WAR and in rapid dev mode | Manual: <<<-Pamp-to-war>>> | pre-integration-test |
*-----------*--------------*-------------*-------------*-------------+ *-----------*--------------*-------------*-------------*-------------+
| any |purge | Cleans all alf_data and logs from Alfresco runs | Manual: <<<-Ppurge>>> | clean |
*-----------*--------------*-------------*-------------*-------------+
| all-in-one | run | Runs embedded Alfresco + Share + Solr in rapid dev mode | Manual: <<<-Prun>>> | pre-integration-test | | all-in-one | run | Runs embedded Alfresco + Share + Solr in rapid dev mode | Manual: <<<-Prun>>> | pre-integration-test |
*-----------*--------------*-------------*-------------*-------------+ *-----------*--------------*-------------*-------------*-------------+
| all-in-one | rm | Adds Records Management runtime and compile time dependencies | Manual: <<<-Prm>>> | package | | any | purge | Cleans all alf_data and logs from Alfresco runs | Manual: <<<-Ppurge>>> | clean |
*-----------*--------------*-------------*-------------*-------------+
| any | enterprise |Configures your build to use Alfresco Enterprise. Obtain your credentials with {{{https://support.alfresco.com}Alfresco Support}}| Manual: <<<-Penterprise>>> | N/A |
*-----------+--------------+-------------+-------------+-------------+ *-----------+--------------+-------------+-------------+-------------+
| any | setup | Sets up the sdk, e.g. grabs springloaded. | Manual: <<<-Psetup>>> (automated in the run.sh) | initialize | | any | setup | Sets up the sdk, e.g. grabs springloaded. | Manual: <<<-Psetup>>> (automated in the run.sh) | initialize |
*-----------+--------------+-------------+-------------+-------------+ *-----------+--------------+-------------+-------------+-------------+
| amp, share-amp | atv | (Experimental) Invokes the {{{https://github.com/AlfrescoLabs/technical-validation/}Alfresco Technical Validation tool}} | Manual: <<<-Patv>>> | validate | | all-in-one | rm | Adds Records Management runtime and compile time dependencies | Manual: <<<-Prm>>> | package |
*-----------+--------------+-------------+-------------+-------------+ *-----------+--------------+-------------+-------------+-------------+
| all-in-one | regression | (Experimental) Invokes the Alfresco {{{https://github.com/AlfrescoLabs/technical-validation/}Share PO}} Webdrone / Selenium based regression tests| Manual: <<<-Pregression>>> | integration-test | | all-in-one | regression | (Experimental) Invokes the Alfresco {{{https://github.com/AlfrescoLabs/technical-validation/}Share PO}} Webdrone / Selenium based regression tests| Manual: <<<-Pregression>>> | integration-test |
*-----------+--------------+-------------+-------------+-------------+ *-----------+--------------+-------------+-------------+-------------+
| amp, share-amp | atv | (Experimental) Invokes the {{{https://github.com/AlfrescoLabs/technical-validation/}Alfresco Technical Validation tool}} | Manual: <<<-Patv>>> | validate |
*-----------+--------------+-------------+-------------+-------------+
The full list of available profiles (with their activation conditions) can be instead found in the <<<profiles>>> section of the The full list of available profiles (with their activation conditions) can be instead found in the <<<profiles>>> section of the
{{{https://artifacts.alfresco.com/nexus/index.html#nexus-search;gav~org.alfresco.maven~alfresco-sdk-parent~${project.version}~pom~}Maven Alfresco SDK POM}}. {{{https://artifacts.alfresco.com/nexus/index.html#nexus-search;gav~org.alfresco.maven~alfresco-sdk-parent~${project.version}~pom~}Maven Alfresco SDK POM}}.

View File

@ -27,6 +27,8 @@ Maven Alfresco SDK\x99 Pre-Requisites
Alfresco platform is retrieved automatically from {{{https://artifacts.alfresco.com} the Alfresco Artifacts Repository}} Alfresco platform is retrieved automatically from {{{https://artifacts.alfresco.com} the Alfresco Artifacts Repository}}
based on the <<<alfresco.groupId>>> and <<<alfresco.version>>> POM properties based on the <<<alfresco.groupId>>> and <<<alfresco.version>>> POM properties
* If you're an Alfresco customer, you can setup a ~/.m2/settings.xml as documented on {{{http://docs.alfresco.com/4.2/tasks/dev-extensions-maven-sdk-tutorials-configure-maven-enterprise.html} Alfresco Docs page}} and specify <<<-Penterprise>>> on your Maven build command to use the latest Alfresco Enterprise version
Enable hot class reload with spring-loaded Enable hot class reload with spring-loaded