alfresco-sdk-parent
Used in:
components
- OverviewOverview
- VersionsVersions
- DependentsDependents
- DependenciesDependencies
<dependency> <groupId>org.alfresco.maven</groupId> <artifactId>alfresco-sdk-parent</artifactId> <version>2.2.0</version> </dependency>
<?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <artifactId>alfresco-sdk-parent</artifactId> <name>Maven Alfresco SDK - Parent POM</name> <description> The Maven Alfresco SDK Parent POM exposes the developer features of the Maven Alfresco SDK. Declare this POM as parent for your project and select the Alfresco version/edition by defining the alfresco.groupId, alfresco.version, and share.version in your POM. </description> <packaging>pom</packaging> <!-- This parent is only needed for SDK release purposes. It does not add behaviors --> <parent> <groupId>org.alfresco.maven</groupId> <artifactId>alfresco-sdk-aggregator</artifactId> <version>2.2.0</version> <relativePath>../../pom.xml</relativePath> </parent> <!-- This defines the version of the SDK in terms of features --> <version>2.2.0</version> <properties> <!-- The build will use an Alfresco Community Version by default. Enable the 'enterprise' profile to use an Alfresco Enterprise version instead. For available community versions see: https://artifacts.alfresco.com/nexus/content/groups/public/org/alfresco/alfresco/ --> <alfresco.groupId>org.alfresco</alfresco.groupId> <alfresco.version>${alfresco.community.default.version}</alfresco.version> <alfresco.repo.artifactId>alfresco</alfresco.repo.artifactId> <alfresco.share.artifactId>share</alfresco.share.artifactId> <!-- Alfresco Webapp context paths. Note. what used to be the Alfresco Explorer UI (/alfresco) is now just an info page as this UI has been removed. --> <alfresco.client.contextPath>/alfresco</alfresco.client.contextPath> <share.client.contextPath>/share</share.client.contextPath> <!-- This is the name of the Alfresco data folder. Configured in alfresco-global.properties with the 'dir.root' property. This folder will contain all content files, index files, and database with metadata when running embedded. (best practice is absolute path to this folder, here we use session.executionRootDirectory property to get correct path to alf_data when running in AIO and Repo AMP) --> <alfresco.data.location>${session.executionRootDirectory}/alf_data_dev</alfresco.data.location> <!-- Alfresco Repo Database configuration. By default it uses a flat file H2 database to be able to run embedded. The H2 database implementation is brought in via the tomcat7-maven-plugin as a dependency. The data files for the H2 database will be created in a relative path, such as alf_data_dev/h2_data/alf_dev, see alfresco.db.url below. For more information about the db parameters see:http://www.h2database.com/html/features.html --> <alfresco.db.name>alf_dev</alfresco.db.name> <alfresco.db.username>alfresco</alfresco.db.username> <alfresco.db.password>alfresco</alfresco.db.password> <alfresco.db.params>AUTO_SERVER=TRUE;DB_CLOSE_ON_EXIT=FALSE;LOCK_TIMEOUT=10000;MVCC=FALSE;LOCK_MODE=0 </alfresco.db.params> <alfresco.db.url>jdbc:h2:${alfresco.data.location}/h2_data/${alfresco.db.name};${alfresco.db.params}</alfresco.db.url> <alfresco.db.datasource.class>org.h2.jdbcx.JdbcDataSource</alfresco.db.datasource.class> <!-- Alfresco Module Packages (AMP) settings --> <!-- To know which resource folder to filter for AMP extension projects --> <app.amp.folder>src/main/amp</app.amp.folder> <!-- To know which folder filtered AMP resources should end up in under /target --> <app.amp.output.folder>${project.build.directory}/amp</app.amp.output.folder> <!-- AMP excludes when installing into a WAR, by default empty (i.e. everything is included) --> <app.amp.overlay.excludes /> <!-- Empty AMP source excludes by default, see the amp-to-war profile for usage example --> <app.amp.excludes /> <!-- Settings related to the stand-alone AMP extension projects. Note. Not applicable to the all-in-one project, which has separate projects for Alfresco.war and Share.war. --> <!-- This points to where the WAR is assembled with the AMP applied when running embedded. We set the docBase for the virtual webapp context to this folder so we can easily detect changes while running. For example: my-repo-amp/target/my-repo-amp-war (Alfresco.war extension) my-share-amp/target/my-share-amp-war (Share.war extension) --> <app.amp.client.war.folder>${project.build.directory}/amp-war</app.amp.client.war.folder> <!-- The Maven artifact ID to use when loading the WAR that the AMP should be applied to, defaults to the alfresco.war artifact ID, overriding this in the share-amp project. --> <app.amp.client.war.artifactId>${alfresco.repo.artifactId}</app.amp.client.war.artifactId> <!-- Environment specific property files related to the Alfresco Repo configuration (Alfresco.war). By default there is a 'local' environment configured with an alfresco-global.properties file in the following places: alfresco-allinone/repo/src/main/properties/local/alfresco-global.properties alfresco-allinone/repo-amp/src/test/properties/local/alfresco-global.properties alfresco-amp/src/test/properties/local/alfresco-global.properties To setup a new environment such as 'ci' (Continues Integration), create a new directory under /properties: alfresco-allinone/repo/src/main/properties/ci/alfresco-global.properties alfresco-allinone/repo-amp/src/test/properties/ci/alfresco-global.properties alfresco-amp/src/test/properties/ci/alfresco-global.properties Change the property values in the files as needed. And when the CI server builds the project supply the environment specific setting as follows: $mvn clean integration-test -Denv=ci --> <env>local</env> <app.properties.folder>src/main/properties/${env}</app.properties.folder> <app.properties.test.folder>src/test/properties/${env}</app.properties.test.folder> <app.properties.include>**</app.properties.include> <app.properties.test.include>**</app.properties.test.include> <!-- Turns on/off POM properties filtering globally. By default filtering is on. This can be overridden in your POM, but do it at your own risk as it may break SDK functionalities --> <app.filtering.enabled>true</app.filtering.enabled> <!-- Additional command line arguments, used by Surefire forked JVM--> <argLine>-Xms256m -Xmx1524m -XX:MaxPermSize=256m -Duser.language=en</argLine> <!-- Logging in project's target folder by default NOTE: Remember the trailing slash when overriding this. --> <app.log.dir>${project.build.directory}/</app.log.dir> <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.7.13</app.slf4j.version> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <!-- Maven Plugins Versions used by the SDK --> <maven.compiler.version>3.5</maven.compiler.version> <maven.compiler.source>1.7</maven.compiler.source> <maven.compiler.target>1.7</maven.compiler.target> <maven.clean.version>3.0.0</maven.clean.version> <maven.dependency.version>2.10</maven.dependency.version> <maven.enforcer.plugin>1.4.1</maven.enforcer.plugin> <maven.resources.version>2.7</maven.resources.version> <maven.surefire.version>2.19.1</maven.surefire.version> <maven.install.version>2.5.2</maven.install.version> <maven.jar.version>2.6</maven.jar.version> <maven.war.version>2.6</maven.war.version> <maven.antrun.version>1.8</maven.antrun.version> <maven.release.version>2.5.3</maven.release.version> <maven.buildhelper.version>1.10</maven.buildhelper.version> <maven.replacer.version>1.5.3</maven.replacer.version> <maven.tomcat.version>2.2</maven.tomcat.version> <!-- This is used for the site deployment procedure (override in your POM as needed) --> <stagingDirectory>../../target/staging/poms/alfresco-sdk-parent</stagingDirectory> <!-- This is used to set the version for the following Alfresco artifacts: - Maven Alfresco plugin that enables Maven to handle AMP files (alfresco-maven-plugin) - Alfresco Rapid Application Development module that starts remote JUnit runner and enables remote unit testing alfresco-rad) --> <maven.alfresco.version>2.2.0</maven.alfresco.version> <maven.alfresco.api.explorer.version>1.0</maven.alfresco.api.explorer.version> <!-- Setup the default Embedded Tomcat port for use by the tomcat7-maven-plugin so it can be accessed from the Groovy scripts and other places --> <maven.tomcat.port>8080</maven.tomcat.port> <!-- Sets the H2 Database version to use. Note. Upgrading to 1.4.186 did not work, on second start (after initial db creation etc) it will not connect... --> <h2.version>1.4.190</h2.version> </properties> <!-- Alfresco Public releases and snapshot repositories (For community version, see also 'enterprise' profile). NOTE: This can be removed when/if Alfresco will be on Maven Central --> <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> <repository> <id>sonatype-snapshots</id> <name>Sonatype Snapshot Repo</name> <url>https://oss.sonatype.org/content/repositories/snapshots/</url> <releases> <enabled>false</enabled> </releases> <snapshots> <enabled>true</enabled> </snapshots> </repository> </repositories> <pluginRepositories> <pluginRepository> <id>sonatype-public</id> <url>http://oss.sonatype.org/content/groups/public</url> </pluginRepository> <pluginRepository> <id>sonatype-snapshots</id> <url>https://oss.sonatype.org/content/repositories/snapshots</url> <snapshots> <enabled>true</enabled> <updatePolicy>daily</updatePolicy> </snapshots> </pluginRepository> <pluginRepository> <id>alfresco-plugin-public</id> <url>https://artifacts.alfresco.com/nexus/content/groups/public</url> </pluginRepository> <pluginRepository> <id>alfresco-plugin-public-snapshots</id> <url>https://artifacts.alfresco.com/nexus/content/groups/public-snapshots</url> <snapshots> <enabled>true</enabled> <updatePolicy>daily</updatePolicy> </snapshots> </pluginRepository> </pluginRepositories> <build> <finalName>${project.artifactId}-${project.version}</finalName> <pluginManagement> <plugins> <plugin> <groupId>org.alfresco.maven.plugin</groupId> <artifactId>alfresco-maven-plugin</artifactId> <version>${maven.alfresco.version}</version> <extensions>true</extensions> <configuration> <snapshotToTimestamp>true</snapshotToTimestamp> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>${maven.compiler.version}</version> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-resources-plugin</artifactId> <version>${maven.resources.version}</version> <configuration> <encoding>UTF-8</encoding> <nonFilteredFileExtensions> <nonFilteredFileExtension>ftl</nonFilteredFileExtension> <nonFilteredFileExtension>acp</nonFilteredFileExtension> <nonFilteredFileExtension>jpg</nonFilteredFileExtension> <nonFilteredFileExtension>png</nonFilteredFileExtension> <nonFilteredFileExtension>gif</nonFilteredFileExtension> <nonFilteredFileExtension>svg</nonFilteredFileExtension> <nonFilteredFileExtension>pdf</nonFilteredFileExtension> <nonFilteredFileExtension>doc</nonFilteredFileExtension> <nonFilteredFileExtension>docx</nonFilteredFileExtension> <nonFilteredFileExtension>xls</nonFilteredFileExtension> <nonFilteredFileExtension>xlsx</nonFilteredFileExtension> <nonFilteredFileExtension>ppt</nonFilteredFileExtension> <nonFilteredFileExtension>pptx</nonFilteredFileExtension> <nonFilteredFileExtension>bin</nonFilteredFileExtension> <nonFilteredFileExtension>lic</nonFilteredFileExtension> <nonFilteredFileExtension>swf</nonFilteredFileExtension> <nonFilteredFileExtension>zip</nonFilteredFileExtension> <nonFilteredFileExtension>msg</nonFilteredFileExtension> <nonFilteredFileExtension>jar</nonFilteredFileExtension> <nonFilteredFileExtension>ttf</nonFilteredFileExtension> <nonFilteredFileExtension>eot</nonFilteredFileExtension> <nonFilteredFileExtension>woff</nonFilteredFileExtension> <nonFilteredFileExtension>woff2</nonFilteredFileExtension> <nonFilteredFileExtension>css</nonFilteredFileExtension> <nonFilteredFileExtension>ico</nonFilteredFileExtension> <nonFilteredFileExtension>psd</nonFilteredFileExtension> <nonFilteredFileExtension>js</nonFilteredFileExtension> </nonFilteredFileExtensions> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-war-plugin</artifactId> <version>${maven.war.version}</version> <configuration> <archiveClasses>false</archiveClasses> <archive> <manifest> <addClasspath>true</addClasspath> </manifest> </archive> </configuration> <dependencies> <dependency> <groupId>org.alfresco.maven.plugin</groupId> <artifactId>alfresco-maven-plugin</artifactId> <version>${maven.alfresco.version}</version> </dependency> </dependencies> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-clean-plugin</artifactId> <version>${maven.clean.version}</version> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-dependency-plugin</artifactId> <version>${maven.dependency.version}</version> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <version>${maven.surefire.version}</version> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-install-plugin</artifactId> <version>${maven.install.version}</version> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> <version>${maven.jar.version}</version> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-antrun-plugin</artifactId> <version>${maven.antrun.version}</version> </plugin> <plugin> <groupId>com.google.code.maven-replacer-plugin</groupId> <artifactId>replacer</artifactId> <version>${maven.replacer.version}</version> </plugin> <!-- Configures tomcat with proper deps and performance fixes --> <plugin> <groupId>org.apache.tomcat.maven</groupId> <artifactId>tomcat7-maven-plugin</artifactId> <version>${maven.tomcat.version}</version> <configuration> <useSeparateTomcatClassLoader>true</useSeparateTomcatClassLoader> </configuration> <dependencies> <dependency> <groupId>com.h2database</groupId> <artifactId>h2</artifactId> <version>${h2.version}</version> </dependency> </dependencies> </plugin> <!--m2e configuration only to prevent errors in import. NOTE: This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself. --> <plugin> <groupId>org.eclipse.m2e</groupId> <artifactId>lifecycle-mapping</artifactId> <version>1.0.0</version> <configuration> <lifecycleMappingMetadata> <pluginExecutions> <pluginExecution> <pluginExecutionFilter> <groupId>org.alfresco.maven.plugin</groupId> <artifactId>alfresco-maven-plugin</artifactId> <versionRange>[0.0,)</versionRange> <goals> <goal>set-version</goal> <goal>refresh-share</goal> <goal>refresh-repo</goal> <goal>refresh</goal> </goals> </pluginExecutionFilter> <action> <execute> <runOnIncremental>true</runOnIncremental> <runOnConfiguration>true</runOnConfiguration> </execute> </action> </pluginExecution> </pluginExecutions> </lifecycleMappingMetadata> </configuration> </plugin> <!-- Compress JavaScript files and store as *-min.js --> <plugin> <groupId>net.alchim31.maven</groupId> <artifactId>yuicompressor-maven-plugin</artifactId> <version>1.5.1</version> <executions> <execution> <id>compress-js</id> <phase>process-resources</phase> <goals> <goal>compress</goal> </goals> <configuration> <excludes> <exclude>**/webscripts/**</exclude> <exclude>**/site-webscripts/**</exclude> <exclude>**/*.lib.js</exclude> <exclude>**/*.css</exclude> </excludes> <sourceDirectory>src/main/amp</sourceDirectory> <outputDirectory>${project.build.directory}/amp</outputDirectory> <!-- Exclude resources so we don't get an extra dir structure with -min.js files --> <excludeResources>true</excludeResources> <jswarn>false</jswarn> </configuration> </execution> </executions> </plugin> </plugins> </pluginManagement> <resources> <resource> <directory>src/main/resources</directory> <filtering>${app.filtering.enabled}</filtering> </resource> <resource> <directory>${app.amp.folder}</directory> <targetPath>${app.amp.output.folder}</targetPath> <filtering>${app.filtering.enabled}</filtering> </resource> </resources> <testResources> <testResource> <directory>src/test/resources</directory> <filtering>${app.filtering.enabled}</filtering> </testResource> </testResources> </build> <profiles> <!-- ==================================================================================================== MANUALLY-ACTIVATED PROFILES ==================================================================================================== --> <!-- Cleans Alfresco data folder (i.e. /alf_data_dev), which contains content store, solr indexes, and H2 database. It will also clean out any .log files. This is different from doing a $mvn clean, which just removes the /target directories for each module. So to wipe everything out and start from scratch you can do: $mvn clean -Ppurge --> <profile> <id>purge</id> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-clean-plugin</artifactId> <configuration> <filesets> <fileset> <directory>${alfresco.data.location}</directory> </fileset> <fileset> <directory>${project.basedir}</directory> <includes> <include>**/*.log*</include> </includes> </fileset> </filesets> </configuration> </plugin> </plugins> </build> </profile> <!-- Enables working with the Alfresco Enterprise version. If you don't specify an enterprise version below, a default version will be used (See alfresco-sdk-aggregator pom), which is usually the latest one, it depends on which SDK version you have. To set a specific Alfresco Enterprise version, manually override the alfresco.version property below . NOTE: As you can see below, 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 file if you are an Enterprise customer or Partner. --> <profile> <id>enterprise</id> <properties> <alfresco.version>${alfresco.enterprise.default.version}</alfresco.version> <alfresco.repo.artifactId>alfresco-enterprise</alfresco.repo.artifactId> <!-- In 5.1 there is only one release of Share that works with both the Community and the Enterprise version of the product. i.e. there is no more a share-enterprise artifact... --> <alfresco.share.artifactId>share</alfresco.share.artifactId> <!-- Not needed in the webapp for enterprise --> <app.slf4j.scope>provided</app.slf4j.scope> </properties> <repositories> <repository> <id>alfresco-private-repository</id> <url>https://artifacts.alfresco.com/nexus/content/groups/private</url> </repository> </repositories> <pluginRepositories> <pluginRepository> <id>alfresco-private-repository</id> <url>https://artifacts.alfresco.com/nexus/content/groups/private</url> </pluginRepository> </pluginRepositories> </profile> <!-- Profile related to the stand-alone AMP extension projects. This profile will enable you to apply a Repo AMP or Share AMP to the Alfresco.WAR or Share.war web application, and then run the customized WAR in an embedded Tomcat instance with the H2 database. Note. This is similar to the run profile in the all-in-one archetype, except you don't get: - the Share Webapp and Solr4 Webapp when working with a Repo AMP. - the Repo Webapp and Solr4 Webapp when working with a Share AMP (in this case we assume an Alfresco.war is already running on 8080 in some other Tomcat) Note. This profile is not used when you are working with an all-in-one project! --> <profile> <id>amp-to-war</id> <properties> <skipTests>true</skipTests> </properties> <build> <plugins> <!-- Fetch and unpack Alfresco Repository/Share WAR (alfresco.war or share.war) --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-dependency-plugin</artifactId> <executions> <execution> <id>unpack-alfresco</id> <phase>prepare-package</phase> <goals> <goal>unpack</goal> </goals> <configuration> <outputDirectory>${app.amp.client.war.folder}</outputDirectory> <artifactItems> <artifactItem> <groupId>${alfresco.groupId}</groupId> <artifactId>${app.amp.client.war.artifactId}</artifactId> <type>war</type> <version>${alfresco.version}</version> </artifactItem> </artifactItems> </configuration> </execution> </executions> </plugin> <!-- The current AMP artifact is installed into the Alfresco.war or share.war using alfresco-maven-plugin --> <plugin> <groupId>org.alfresco.maven.plugin</groupId> <artifactId>alfresco-maven-plugin</artifactId> <executions> <execution> <id>amps-to-war-overlay</id> <phase>package</phase> <goals> <goal>install</goal> </goals> </execution> </executions> <configuration> <!-- We need to selectively not install web resources (i.e. /web folder in AMP), so these files can be picked up directly from the build project instead, enabling rapid application dev --> <includeWebResources>false</includeWebResources> </configuration> </plugin> <!-- Configures Tomcat to run with the alfresco.war or share.war as virtual webapp. (http://tomcat.apache.org/tomcat-7.0-doc/config/context.html#Virtual_webapp) The target/classes and target/test-classes (containing tests and the amp config for test purposes) are prepended to the running webapp context, so changes from the IDE are automatically picked up first. See context.xml for details. --> <plugin> <groupId>org.apache.tomcat.maven</groupId> <artifactId>tomcat7-maven-plugin</artifactId> <dependencies> <!-- Bring in the H2 Database scripts needed when running embedded, they are now available from the standard generated artifacts, no longer needed to be picked up from the alfresco-rad project --> <dependency> <groupId>org.alfresco</groupId> <artifactId>alfresco-repository</artifactId> <version>${alfresco.version}</version> <classifier>h2scripts</classifier> <exclusions> <exclusion> <groupId>*</groupId> <artifactId>*</artifactId> </exclusion> </exclusions> </dependency> <!-- Explicitly bring in the Plexus Archiver so assembly goes quicker --> <dependency> <groupId>org.codehaus.plexus</groupId> <artifactId>plexus-archiver</artifactId> <version>2.3</version> </dependency> <!-- Include remote Junit testing lib and start remote JUnit runner --> <dependency> <groupId>org.alfresco.maven</groupId> <artifactId>alfresco-rad</artifactId> <version>${maven.alfresco.version}</version> </dependency> </dependencies> <executions> <execution> <id>run-embedded</id> <goals> <goal>run</goal> </goals> <phase>integration-test</phase> <configuration> <useTestClasspath>false</useTestClasspath> <ignorePackaging>true</ignorePackaging> <useSeparateTomcatClassLoader>true</useSeparateTomcatClassLoader> <systemProperties> <java.io.tmpdir>${project.build.directory}</java.io.tmpdir> </systemProperties> <delegate>true</delegate> <contextFile>${project.basedir}/tomcat/context.xml</contextFile> <!-- Encode url in UTF-8 for proper character handling --> <uriEncoding>UTF-8</uriEncoding> </configuration> </execution> </executions> </plugin> </plugins> </build> </profile> <!-- ==================================================================================================== AUTO-ACTIVATED PROFILES ==================================================================================================== --> <!-- Enables AMP specific processing when a module.properties file is found. The following files will be filtered and copied to the test-classpath so they can be picked up by tests and tomcat embedded: module.properties file for the AMP /config directory content for the AMP --> <profile> <id>enable-amp</id> <activation> <file> <exists>src/main/amp/module.properties</exists> </file> </activation> <build> <plugins> <plugin> <groupId>org.alfresco.maven.plugin</groupId> <artifactId>alfresco-maven-plugin</artifactId> <extensions>true</extensions> </plugin> <!-- Copies module properties to the test classpath in the right location, so that it can be picked up by tests and tomcat embedded --> <plugin> <artifactId>maven-resources-plugin</artifactId> <executions> <execution> <id>add-module-properties-to-test-classpath</id> <phase>process-test-resources</phase> <goals> <goal>copy-resources</goal> </goals> <configuration> <outputDirectory>${project.build.testOutputDirectory}</outputDirectory> <resources> <resource> <directory>${app.amp.folder}</directory> <includes> <include>module.properties</include> </includes> <filtering>${app.filtering.enabled}</filtering> <targetPath>alfresco/module/${project.artifactId}</targetPath> </resource> </resources> </configuration> </execution> <execution> <id>add-module-config-to-test-classpath</id> <phase>process-test-resources</phase> <goals> <goal>copy-resources</goal> </goals> <configuration> <outputDirectory>${project.build.testOutputDirectory}</outputDirectory> <resources> <resource> <directory>${app.amp.folder}/config</directory> <includes> <include>**/*</include> </includes> <filtering>${app.filtering.enabled}</filtering> </resource> </resources> </configuration> </execution> </executions> </plugin> </plugins> </build> </profile> <!-- Enables alfresco testing dependencies if a src/test/java folder is found, by adding appropriate dependencies --> <profile> <id>enable-alfresco-testing</id> <activation> <file> <exists>src/test/java</exists> </file> </activation> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <version>${maven.surefire.version}</version> </plugin> </plugins> </build> <dependencies> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <scope>test</scope> </dependency> <!-- Add RAD capabilities for remote JUnit test running and start remote JUnit runner. Scope=test so the custom JUnit remote runner is found in the Maven test classpath --> <dependency> <groupId>org.alfresco.maven</groupId> <artifactId>alfresco-rad</artifactId> <version>${maven.alfresco.version}</version> <scope>test</scope> </dependency> </dependencies> </profile> <!-- The following 2 profiles adds the /properties directories as resource directories in the project. This means we can filter the property files in these directories. The presence of this /properties directory also activates these profiles. --> <profile> <id>enable-properties-filtering</id> <activation> <file> <!-- No properties allowed here. Only hardcoded values are properly interpreted --> <exists>src/main/properties</exists> </file> </activation> <build> <plugins> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>build-helper-maven-plugin</artifactId> <version>${maven.buildhelper.version}</version> <executions> <execution> <id>add-env-properties</id> <phase>generate-resources</phase> <goals> <goal>add-resource</goal> </goals> <configuration> <resources> <resource> <directory>${app.properties.folder}</directory> <includes> <include>${app.properties.include}</include> </includes> <filtering>${app.filtering.enabled}</filtering> </resource> </resources> </configuration> </execution> </executions> </plugin> </plugins> </build> </profile> <profile> <id>enable-test-properties-filtering</id> <activation> <file> <!-- No properties allowed here. Only hardcoded values are properly interpreted --> <exists>src/test/properties</exists> </file> </activation> <build> <plugins> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>build-helper-maven-plugin</artifactId> <version>${maven.buildhelper.version}</version> <executions> <execution> <id>add-env-test-properties</id> <phase>generate-resources</phase> <goals> <goal>add-test-resource</goal> </goals> <configuration> <resources> <resource> <directory>${app.properties.test.folder}</directory> <includes> <include>${app.properties.test.include}</include> </includes> <filtering>${app.filtering.enabled}</filtering> </resource> </resources> </configuration> </execution> </executions> </plugin> </plugins> </build> </profile> <!-- Brings in the H2 Database and JDBC Driver for use in Embedded testing. (activated if a test alfresco-global.properties is found) --> <profile> <id>config-h2-support</id> <activation> <file> <exists>src/test/properties/local/alfresco-global.properties</exists> </file> </activation> <dependencies> <!-- h2 Dependency --> <dependency> <groupId>com.h2database</groupId> <artifactId>h2</artifactId> <version>${h2.version}</version> <scope>test</scope> </dependency> </dependencies> </profile> <!-- This profile, which is active by default, enforces some SDK requirements, currently: - min Alfresco version - min Java version - min Maven version --> <profile> <id>enforce-sdk-rules</id> <activation> <file><missing>does-not-exist.tmp</missing></file><!-- turn on this profile (by triggering on a file that is not expected to exist) --> </activation> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-enforcer-plugin</artifactId> <version>${maven.enforcer.plugin}</version> <executions> <execution> <id>enforce-sdk-requirements</id> <goals> <goal>enforce</goal> </goals> <configuration> <rules> <!-- Test for Alfresco version --> <requireProperty> <property>alfresco.version</property> <message>The SDK 2.2.x is supported only for Alfresco 5.1.x Community and above or Alfresco Enterprise 5.1 and above </message> <regex>^(5\.(1\.[a-z1-9]|[1-9])|6\.).*$</regex> </requireProperty> <!-- Test for Maven version --> <requireMavenVersion> <version>3.2.2</version> </requireMavenVersion> </rules> <fail>true</fail> </configuration> </execution> </executions> </plugin> </plugins> </build> </profile> <!-- Turn on webapp refresh for both Alfresco Repo (alfresco.war) and Alfresco Share (share.war) if we find a module.properties file for an AMP extension. --> <profile> <id>refresh-both</id> <activation> <file> <exists>src/main/amp/module.properties</exists> </file> </activation> <build> <plugins> <plugin> <groupId>org.alfresco.maven.plugin</groupId> <artifactId>alfresco-maven-plugin</artifactId> <executions> <execution> <id>refresh-webscripts-repo-and-share</id> <phase>process-resources</phase> <goals> <goal>refresh</goal> </goals> </execution> </executions> </plugin> </plugins> </build> </profile> <!-- ==================================================================================================== ONE OFF/SETUP operations ==================================================================================================== --> <!-- Does any SDK dev environment preparation and setup, currently does the following: - Downloads Spring Loaded java agent, which is used from the Maven repo location via the run.sh script --> <profile> <id>setup</id> <activation> <activeByDefault>false</activeByDefault> </activation> <build> <!-- This simply downloads the spring-loaded jar to ~/.m2/repository/org/springframework/spring-loaded/${springloaded.version}/spring-loaded-${springloaded.version}.jar --> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-dependency-plugin</artifactId> <executions> <execution> <id>get-spring-loaded</id> <phase>validate</phase> <goals> <goal>get</goal> </goals> <configuration> <artifact>org.springframework:springloaded:${springloaded.version}</artifact> </configuration> </execution> </executions> </plugin> </plugins> </build> </profile> <!-- ==================================================================================================== EXPERIMENTAL ==================================================================================================== --> <!-- Invokes the Alfresco Technical Validation tool at https://github.com/AlfrescoLabs/technical-validation --> <profile> <id>atv</id> <properties> <maven.alfresco.validation.skip>false</maven.alfresco.validation.skip> <maven.alfresco.validation.sourceLocation>${project.build.directory}/${project.build.finalName}-src </maven.alfresco.validation.sourceLocation> </properties> <build> <plugins> <plugin> <artifactId>maven-resources-plugin</artifactId> <executions> <execution> <id>isolate-project-src</id> <phase>generate-resources</phase> <goals> <goal>copy-resources</goal> </goals> <configuration> <outputDirectory>${maven.alfresco.validation.sourceLocation}</outputDirectory> <resources> <resource> <directory>${project.basedir}</directory> <excludes> <exclude>target</exclude> </excludes> <filtering>${app.filtering.enabled}</filtering> </resource> </resources> </configuration> </execution> </executions> </plugin> <plugin> <groupId>org.alfresco.maven.plugin</groupId> <artifactId>alfresco-maven-plugin</artifactId> <executions> <execution> <id>run-atv</id> <phase>verify</phase> <goals> <goal>validate</goal> </goals> </execution> </executions> </plugin> <plugin> <groupId>de.herschke</groupId> <artifactId>neo4j-maven-plugin</artifactId> <version>2.0.2-20140827</version> <executions> <execution> <id>start-neo4j-server</id> <phase>post-integration-test</phase> <goals> <goal>start-server</goal> </goals> </execution> <execution> <id>stop-neo4j-server</id> <phase>verify</phase> <goals> <goal>stop-server</goal> </goals> </execution> </executions> <configuration> <port>7474</port> </configuration> </plugin> </plugins> </build> </profile> <!-- ==================================================================================================== !!! DEPRECATED !!! ==================================================================================================== --> <!-- Profile to enable rapid application development with JRebel. Automatically generates rebel.xml files. NOTE: This experimental feature was added in the SDK 1.1.0 but is now deprecated as of version 2.x in favor of spring-loaded. --> <profile> <id>jrebel</id> <build> <plugins> <plugin> <groupId>org.zeroturnaround</groupId> <artifactId>jrebel-maven-plugin</artifactId> <version>1.1.5</version> <executions> <execution> <id>generate-rebel-xml</id> <phase>prepare-package</phase> <goals> <goal>generate</goal> </goals> </execution> </executions> <configuration> <packaging>war</packaging> <generateDefaultElements>false</generateDefaultElements> <classpath> <resources> <resource> <directory>${project.build.outputDirectory}</directory> </resource> <resource> <directory>${project.build.testOutputDirectory}</directory> </resource> </resources> </classpath> <web> <resources> <resource> <target>/</target> <directory>${project.build.directory}/${project.build.finalName}</directory> </resource> <resource> <target>/</target> <directory>${project.build.directory}/${project.build.finalName}-war</directory> </resource> </resources> </web> </configuration> </plugin> </plugins> </build> </profile> </profiles> </project>