417 lines
14 KiB
XML
417 lines
14 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!--
|
|
* This program is free software: you can redistribute it and/or modify it
|
|
* under the terms of the GNU Lesser General Public License as published by
|
|
* the Free Software Foundation, either version 3 of the License, or (at your
|
|
* option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful, but WITHOUT
|
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
|
* more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License along
|
|
* with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
*
|
|
-->
|
|
<project xmlns="http://tiles.bluetrainsoftware.com/maven/tiles/1.1.0"
|
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
xsi:schemaLocation="http://tiles.bluetrainsoftware.com/maven/tiles/1.1.0 https://git.inteligr8.com/inteligr8/maven-tiles/raw/xsd/src/main/resources/maven-tiles.xsd">
|
|
|
|
<build>
|
|
<resources>
|
|
<!-- need to override default resources, even though this shows up in the build-helper too -->
|
|
<resource>
|
|
<directory>src/main/resources</directory>
|
|
<filtering>true</filtering>
|
|
<excludes>
|
|
<exclude>**/README*</exclude>
|
|
</excludes>
|
|
</resource>
|
|
</resources>
|
|
<plugins>
|
|
<plugin>
|
|
<groupId>org.codehaus.mojo</groupId>
|
|
<artifactId>build-helper-maven-plugin</artifactId>
|
|
<version>3.2.0</version>
|
|
<executions>
|
|
<execution>
|
|
<id>module-snapshot-timestamp</id>
|
|
<phase>initialize</phase>
|
|
<goals><goal>timestamp-property</goal></goals>
|
|
<configuration>
|
|
<name>module.timestamp</name>
|
|
<timeSource>build</timeSource>
|
|
<pattern>yyyyMMddHHmmss</pattern>
|
|
</configuration>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>com.inteligr8</groupId>
|
|
<artifactId>regex-maven-plugin</artifactId>
|
|
<version>1.0.5</version>
|
|
<executions>
|
|
<execution>
|
|
<id>acs-module-version</id>
|
|
<phase>initialize</phase>
|
|
<goals><goal>replace-text</goal></goals>
|
|
<configuration>
|
|
<text>${project.version}</text>
|
|
<newProperty>module.version</newProperty>
|
|
<regexes>
|
|
<!-- turn -SNAPSHOT into ATIMESTAMP -->
|
|
<regex>
|
|
<pattern>^(.*)-SNAPSHOT$</pattern>
|
|
<replacement>$1-A${module.timestamp}</replacement>
|
|
</regex>
|
|
<!-- all others are just a copy -->
|
|
<regex>
|
|
<pattern>^(.*)$</pattern>
|
|
<replacement>$1</replacement>
|
|
</regex>
|
|
</regexes>
|
|
</configuration>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.codehaus.mojo</groupId>
|
|
<artifactId>build-helper-maven-plugin</artifactId>
|
|
<version>3.2.0</version>
|
|
<executions>
|
|
<execution>
|
|
<id>add-acs-module-resources</id>
|
|
<phase>generate-resources</phase>
|
|
<goals><goal>add-resource</goal></goals>
|
|
<configuration>
|
|
<resources>
|
|
<!-- copy & filter all the resource files -->
|
|
<resource>
|
|
<directory>src/main/resources</directory>
|
|
<filtering>true</filtering>
|
|
<excludes>
|
|
<exclude>**/README*</exclude>
|
|
</excludes>
|
|
</resource>
|
|
<!-- copy & filter the contents of a convenient module folder -->
|
|
<resource>
|
|
<directory>src/main/module</directory>
|
|
<filtering>true</filtering>
|
|
<excludes>
|
|
<exclude>**/README*</exclude>
|
|
</excludes>
|
|
<targetPath>${project.build.directory}/module-classes/${alfresco.module.path}</targetPath>
|
|
</resource>
|
|
<!-- copy & filter the contents of standard web to web output -->
|
|
<resource>
|
|
<directory>src/main/web</directory>
|
|
<filtering>true</filtering>
|
|
<excludes>
|
|
<exclude>**/README*</exclude>
|
|
</excludes>
|
|
<targetPath>${project.build.directory}/web-resources/META-INF</targetPath>
|
|
</resource>
|
|
<!-- copy & filter the contents of standard webapp to web output -->
|
|
<resource>
|
|
<directory>src/main/webapp</directory>
|
|
<filtering>true</filtering>
|
|
<excludes>
|
|
<exclude>**/README*</exclude>
|
|
</excludes>
|
|
<targetPath>${project.build.directory}/web-resources/META-INF</targetPath>
|
|
</resource>
|
|
<!-- copy & filter the contents of Alfresco SDK assembly/web to web output -->
|
|
<resource>
|
|
<directory>src/main/assembly/web</directory>
|
|
<filtering>true</filtering>
|
|
<excludes>
|
|
<exclude>**/README*</exclude>
|
|
</excludes>
|
|
<targetPath>${project.build.directory}/web-resources/META-INF</targetPath>
|
|
</resource>
|
|
</resources>
|
|
</configuration>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
<!-- This plugin prevents binary file formats from being corrupted due to filtering -->
|
|
<plugin>
|
|
<artifactId>maven-resources-plugin</artifactId>
|
|
<version>3.2.0</version>
|
|
<configuration>
|
|
<encoding>UTF-8</encoding>
|
|
<nonFilteredFileExtensions>
|
|
<!-- jpg, jpeg, gif, bmp and png are added automatically -->
|
|
<nonFilteredFileExtension>ftl</nonFilteredFileExtension>
|
|
<nonFilteredFileExtension>acp</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>
|
|
<executions>
|
|
<!-- This plugin execution consolidates the generated/filtered resources into one directory for compiling -->
|
|
<execution>
|
|
<id>consolidate-resources</id>
|
|
<phase>process-resources</phase>
|
|
<goals><goal>copy-resources</goal></goals>
|
|
<configuration>
|
|
<outputDirectory>${project.build.packageDirectory}</outputDirectory>
|
|
<resources>
|
|
<resource>
|
|
<directory>${project.build.outputDirectory}</directory>
|
|
<filtering>false</filtering>
|
|
<excludes>
|
|
<exclude>**/*.class</exclude>
|
|
</excludes>
|
|
</resource>
|
|
<resource>
|
|
<directory>${project.build.directory}/module-classes</directory>
|
|
<filtering>false</filtering>
|
|
</resource>
|
|
<resource>
|
|
<directory>${project.build.directory}/web-resources</directory>
|
|
<filtering>false</filtering>
|
|
</resource>
|
|
</resources>
|
|
</configuration>
|
|
</execution>
|
|
<!-- This plugin execution consolidates the compiled resources into one directory for packaging -->
|
|
<execution>
|
|
<id>consolidate-classes</id>
|
|
<phase>process-test-classes</phase>
|
|
<goals><goal>copy-resources</goal></goals>
|
|
<configuration>
|
|
<outputDirectory>${project.build.packageDirectory}</outputDirectory>
|
|
<resources>
|
|
<resource>
|
|
<directory>${project.build.outputDirectory}</directory>
|
|
<filtering>false</filtering>
|
|
<includes>
|
|
<include>**/*.class</include>
|
|
</includes>
|
|
</resource>
|
|
</resources>
|
|
</configuration>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
<!-- This plugin minifies (compresses) JavaScript files -->
|
|
<plugin>
|
|
<groupId>net.alchim31.maven</groupId>
|
|
<artifactId>yuicompressor-maven-plugin</artifactId>
|
|
<version>1.5.1</version>
|
|
<configuration>
|
|
<excludes>
|
|
<exclude>**/webscripts/**</exclude>
|
|
<exclude>**/site-webscripts/**</exclude>
|
|
<exclude>**/*.lib.js</exclude>
|
|
<exclude>**/*.css</exclude>
|
|
<exclude>**/*-min.js</exclude>
|
|
<exclude>**/*-min.css</exclude>
|
|
<exclude>**/*.min.js</exclude>
|
|
<exclude>**/*.pack.js</exclude>
|
|
</excludes>
|
|
<excludeResources>true</excludeResources>
|
|
<force>true</force>
|
|
<jswarn>false</jswarn>
|
|
</configuration>
|
|
<executions>
|
|
<!-- This execution compresses the JavaScript files in the compiled classes folder -->
|
|
<execution>
|
|
<id>compress-resources</id>
|
|
<phase>compile</phase>
|
|
<goals>
|
|
<goal>compress</goal>
|
|
</goals>
|
|
<configuration>
|
|
<sourceDirectory>${project.build.packageDirectory}</sourceDirectory>
|
|
<outputDirectory>${project.build.packageDirectory}</outputDirectory>
|
|
</configuration>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
<!-- This plugin changes the packaging directory to the consolidated directory -->
|
|
<plugin>
|
|
<artifactId>maven-jar-plugin</artifactId>
|
|
<version>3.2.0</version>
|
|
<configuration>
|
|
<classesDirectory>${project.build.packageDirectory}</classesDirectory>
|
|
</configuration>
|
|
</plugin>
|
|
<!-- This plugin builds an AMP file during the package phase -->
|
|
<plugin>
|
|
<groupId>com.inteligr8.alfresco</groupId>
|
|
<artifactId>amp-maven-plugin</artifactId>
|
|
<version>1.1.4</version>
|
|
<executions>
|
|
<execution>
|
|
<id>build-amp-file</id>
|
|
<phase>package</phase>
|
|
<goals>
|
|
<goal>amp</goal>
|
|
</goals>
|
|
<configuration>
|
|
<classifier>${alfresco.module.classifier}</classifier>
|
|
<skip>${alfresco.module.noAmp}</skip>
|
|
</configuration>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
<!-- This plugin checks for an AMP file produced during the package phase -->
|
|
<plugin>
|
|
<groupId>com.inteligr8</groupId>
|
|
<artifactId>conditional-maven-plugin</artifactId>
|
|
<version>1.0.1</version>
|
|
<executions>
|
|
<execution>
|
|
<id>check-amp-file</id>
|
|
<phase>package</phase>
|
|
<goals>
|
|
<goal>file-existence</goal>
|
|
</goals>
|
|
<configuration>
|
|
<file>${project.build.directory}/${project.artifactId}-${project.version}.amp</file>
|
|
<trueValue>false</trueValue>
|
|
<falseValue>true</falseValue>
|
|
<newProperty>beedk.noAmp</newProperty>
|
|
</configuration>
|
|
</execution>
|
|
<execution>
|
|
<id>check-amp-classifier-file</id>
|
|
<phase>package</phase>
|
|
<goals>
|
|
<goal>file-existence</goal>
|
|
</goals>
|
|
<configuration>
|
|
<file>${project.build.directory}/${project.artifactId}-${project.version}-${alfresco.module.classifier}.amp</file>
|
|
<trueValue>false</trueValue>
|
|
<falseValue>true</falseValue>
|
|
<newProperty>beedk.noAmpClassifier</newProperty>
|
|
</configuration>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
<!-- This plugin enables/disables the AMP file during the install/deploy phases -->
|
|
<plugin>
|
|
<groupId>org.codehaus.mojo</groupId>
|
|
<artifactId>build-helper-maven-plugin</artifactId>
|
|
<version>3.2.0</version>
|
|
<executions>
|
|
<execution>
|
|
<id>attach-amp</id>
|
|
<phase>post-integration-test</phase>
|
|
<goals>
|
|
<goal>attach-artifact</goal>
|
|
</goals>
|
|
<configuration>
|
|
<artifacts>
|
|
<artifact>
|
|
<type>amp</type>
|
|
<file>${project.build.directory}/${project.artifactId}-${project.version}.amp</file>
|
|
</artifact>
|
|
</artifacts>
|
|
<skipAttach>${beedk.noAmp}</skipAttach>
|
|
</configuration>
|
|
</execution>
|
|
<execution>
|
|
<id>attach-amp-classifier</id>
|
|
<phase>post-integration-test</phase>
|
|
<goals>
|
|
<goal>attach-artifact</goal>
|
|
</goals>
|
|
<configuration>
|
|
<artifacts>
|
|
<artifact>
|
|
<type>amp</type>
|
|
<classifier>${alfresco.module.classifier}</classifier>
|
|
<file>${project.build.directory}/${project.artifactId}-${project.version}-${alfresco.module.classifier}.amp</file>
|
|
</artifact>
|
|
</artifacts>
|
|
<skipAttach>${beedk.noAmpClassifier}</skipAttach>
|
|
</configuration>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
</plugins>
|
|
</build>
|
|
|
|
<profiles>
|
|
<profile>
|
|
<id>scaffold-acs-module</id>
|
|
<activation>
|
|
<property>
|
|
<name>scaffold</name>
|
|
</property>
|
|
</activation>
|
|
<build>
|
|
<plugins>
|
|
<!-- This plugin downloads the required configurations for all modules -->
|
|
<plugin>
|
|
<groupId>com.googlecode.maven-download-plugin</groupId>
|
|
<artifactId>download-maven-plugin</artifactId>
|
|
<version>1.6.1</version>
|
|
<executions>
|
|
<execution>
|
|
<id>download-module-props</id>
|
|
<phase>generate-sources</phase>
|
|
<goals>
|
|
<goal>wget</goal>
|
|
</goals>
|
|
<configuration>
|
|
<url>https://raw.githubusercontent.com/Alfresco/alfresco-sdk/alfresco-sdk-aggregator-${alfresco.sdk.version}/archetypes/alfresco-platform-jar-archetype/src/main/resources/archetype-resources/src/main/resources/alfresco/module/__artifactId__/module.properties</url>
|
|
<outputDirectory>${basedir}/src/main/module</outputDirectory>
|
|
</configuration>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
</plugins>
|
|
</build>
|
|
</profile>
|
|
<profile>
|
|
<id>default-props</id>
|
|
<activation>
|
|
<property>
|
|
<name>!some-prop-that-never-exists</name>
|
|
</property>
|
|
</activation>
|
|
<properties>
|
|
<!-- configurable -->
|
|
<project.build.packageDirectory>${project.build.directory}/package</project.build.packageDirectory>
|
|
<alfresco.module.pathname>${project.groupId}.${project.artifactId}</alfresco.module.pathname>
|
|
<alfresco.module.classifier></alfresco.module.classifier>
|
|
<alfresco.module.noAmp>${beedk.jar.notest.empty}</alfresco.module.noAmp>
|
|
|
|
<!-- output -->
|
|
<alfresco.module.path>alfresco/module/${alfresco.module.pathname}</alfresco.module.path>
|
|
</properties>
|
|
</profile>
|
|
</profiles>
|
|
|
|
<tiles>
|
|
<!-- Documentation: https://git.inteligr8.com/inteligr8/ootbee-beedk/src/branch/stable/beedk-amp-check-tile -->
|
|
<tile>@project.groupId@:beedk-amp-check-tile:@project.version@</tile>
|
|
</tiles>
|
|
|
|
</project>
|