Permalink
Switch branches/tags
v5.23 v5.20 v5.19 v5.18 v5.17 v5.16 v5.15 v5.14 v5.13 v5.12 v5.11 v5.10 v5.9 v5.8 v5.7 v5.6 v5.5 v5.4 v5.3 v5.2 v5.1 v5.0 v4.58.57 v4.57.56 v4.56.55 v4.55.54 v4.55.54a v4.54.53 v4.53.52 v4.52.51 mergerd_master_20170324-ts jenkins-release_management-update_release-candidate_from_master-14 jenkins-ops-update_release_from_master-101 jenkins-ops-update_release_from_master-100 jenkins-ops-update_release_from_master-99 jenkins-ops-update_release_from_master-98 jenkins-ops-update_release_from_master-97 jenkins-ops-update_release_from_master-96 jenkins-ops-update_release_from_master-95 jenkins-ops-update_release_from_master-94 jenkins-ops-update_release_from_master-93 jenkins-ops-update_release_from_master-92 jenkins-ops-update_release_from_master-91 jenkins-ops-update_release_from_master-90 jenkins-ops-update_release_from_master-89 jenkins-ops-update_release_from_master-88 jenkins-ops-update_release_from_master-87 jenkins-ops-update_release_from_master-86 jenkins-ops-update_release_from_master-85 jenkins-ops-update_release_from_master-84 jenkins-ops-update_release_from_master-82 jenkins-ops-update_release_from_master-81 jenkins-ops-update_release_from_master-80 jenkins-ops-update_release_from_master-79 jenkins-ops-update_release_from_master-78 jenkins-ops-update_release_from_master-77 jenkins-ops-update_release_from_master-76 jenkins-ops-update_release_from_master-75 jenkins-ops-update_release_from_master-74 jenkins-ops-update_release_from_master-73 jenkins-ops-update_release_from_master-72 jenkins-ops-update_release_from_master-70 jenkins-ops-update_release_from_master-69 jenkins-ops-update_release_from_master-68 jenkins-ops-update_release_from_master-67 jenkins-ops-update_release_from_master-66 jenkins-ops-update_release_from_master-65 jenkins-ops-update_release_from_master-64 jenkins-ops-update_release_from_master-60 jenkins-ops-update_release_from_master-59 jenkins-ops-update_release_from_master-53 jenkins-ops-update_release_from_master-52 jenkins-ops-update_release_from_master-51 jenkins-ops-update_release_from_master-50 jenkins-ops-update_release_from_master-49 jenkins-ops-update_release_from_master-48 jenkins-ops-update_release_from_master-47 jenkins-ops-update_release_from_master-46 jenkins-ops-update_release_from_master-45 jenkins-ops-update_release_from_master-44 jenkins-ops-update_release_from_master-43 jenkins-ops-update_release_from_master-42 jenkins-ops-update_release_from_master-41 jenkins-ops-update_release_from_master-40 jenkins-ops-update_release_from_master-39 jenkins-ops-update_release_from_master-38 jenkins-ops-update_release_from_master-37 jenkins-ops-update_release_from_master-36 jenkins-ops-update_release_from_master-35 jenkins-ops-update_release_from_master-34 jenkins-ops-update_release_from_master-33 jenkins-ops-update_release_from_master-32 jenkins-ops-update_release_from_master-31 jenkins-ops-update_release_from_master-30 jenkins-ops-update_release_from_master-29 jenkins-ops-update_release_from_master-27 jenkins-ops-update_release_from_master-26 jenkins-ops-update_release_from_master-25 jenkins-ops-update_release_from_master-24 jenkins-ops-update_release_from_master-23
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
864 lines (778 sloc) 29.4 KB
<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>de.metas</groupId>
<artifactId>de.metas.parent.general</artifactId>
<version>10.0.0</version>
<packaging>pom</packaging>
<description>
Default parent pom with common settings (e.g. java file encoding) to be used by all maven projects.
</description>
<url>http://www.metasfresh.com/</url>
<organization>
<name>metas GmbH</name>
<url>http://www.metasfresh.com/</url>
</organization>
<inceptionYear>2015</inceptionYear>
<developers>
<developer>
<name>metasfresh contributors</name>
<organizationUrl>http://www.metasfresh.com/</organizationUrl>
<email>contributors@metasfresh.com</email>
</developer>
</developers>
<properties>
<!-- this is our default; individual projects might need to specify their own settings -->
<metasfresh.java.version>1.8</metasfresh.java.version>
<!--
3.8.0 is currently the latest and greatest. Spring boot declares some 2.x version that
see http://docs.spring.io/spring-boot/docs/1.2.3.RELEASE/reference/htmlsingle/#howto-customize-dependency-versions-with-maven
-->
<assertj.version>3.8.0</assertj.version>
<jasperreports.version>6.5.1</jasperreports.version>
<itext.version>2.1.7.js6</itext.version>
<!-- https://github.com/codecentric/spring-boot-admin -->
<spring-boot-admin.version>1.5.0</spring-boot-admin.version>
</properties>
<modules>
<!-- this module provides a shared set of assembly descriptors-->
<module>assemblies</module>
</modules>
<!--
<repositories>
<repository>
<id>metasfresh-repo</id>
<name>metasfresh maven repository (master branch)</name>
<releases>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
<checksumPolicy>warn</checksumPolicy>
</releases>
<url>https://repo.metasfresh.com/content/groups/mvn-master/</url>
</repository>
</repositories>
-->
<pluginRepositories>
<!-- our main repo is also our plugin repo; also see https://maven.apache.org/pom.html#Plugin_Repositories -->
<!-- see https://github.com/metasfresh/metasfresh-parent/issues/3 -->
<pluginRepository>
<id>metasfresh-repo</id>
<name>metasfresh maven repository (master branch)</name>
<url>https://repo.metasfresh.com/content/groups/mvn-master/</url>
</pluginRepository>
</pluginRepositories>
<distributionManagement>
<!--
Where to deploy build artifacts; the values are coming from the outside via cmd-line parameters.
Even if you can't deploy to this repo, you can still make your own builds and install them to your local repo.
-->
<repository>
<id>${deploy-repo-id}</id>
<name>${deploy-repo-name}</name>
<url>${deploy-repo-url}</url>
</repository>
</distributionManagement>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<version>${assertj.version}</version>
</dependency>
<dependency>
<groupId>net.sf.jasperreports</groupId>
<artifactId>jasperreports</artifactId>
<version>${jasperreports.version}</version>
</dependency>
<dependency>
<groupId>com.lowagie</groupId>
<artifactId>itext</artifactId>
<version>${itext.version}</version>
</dependency>
<!-- Thx for the two fonts to http://ansuz.sooke.bc.ca/page/fonts ^^ -->
<dependency>
<groupId>jp.osdn.ocra</groupId>
<artifactId>jp.osdn.ocra</artifactId>
<version>0.2</version>
</dependency>
<dependency>
<groupId>jp.osdn.ocrb</groupId>
<artifactId>jp.osdn.ocrb</artifactId>
<version>0.2.1</version>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.0.0</version>
</plugin>
<!-- we set the metasfresh-wide encoding for code and resource files to be UTF-8 by default -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.7.0</version>
<configuration>
<encoding>UTF-8</encoding>
<source>${metasfresh.java.version}</source>
<target>${metasfresh.java.version}</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.0.2</version>
<configuration>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<!-- note that currently we prefer org.jvnet.jaxb2.maven2:maven-jaxb2-plugin,
but don't have time to kick out this one -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jaxb2-maven-plugin</artifactId>
<version>2.3.1</version> <!-- https://github.com/metasfresh/metasfresh/issues/1598 -->
</plugin>
<plugin>
<groupId>org.jvnet.jaxb2.maven2</groupId>
<artifactId>maven-jaxb2-plugin</artifactId>
<version>0.13.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
<version>3.0.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
<version>2.4</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>3.3</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.7</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-reactor-plugin</artifactId>
<version>1.1</version>
</plugin>
<!-- Add the generic info plus ci build info to the manifests of all jars that we create -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.4</version>
<configuration>
<archive>
<manifest>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
<addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
</manifest>
<manifestEntries>
<ciBuildNo>${BUILD_NUMBER}</ciBuildNo>
<ciBuildTag>${BUILD_TAG}</ciBuildTag>
<ciJobName>${JOB_NAME}</ciJobName>
<ciBuildUrl>${BUILD_URL}</ciBuildUrl>
</manifestEntries>
</archive>
</configuration>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.20</version>
<configuration>
<!-- Jacoco prepare-agent builds some command-line params without -->
<!-- which jacoco will not instrument. Hence it is important to add -->
<!-- those command-line params here (${argLine} holds those params) -->
<argLine>${argLine} -Xms256m -Xmx2048m</argLine>
<!-- From http://www.jacoco.org/jacoco/trunk/doc/maven.html :
When using the maven-surefire-plugin or maven-failsafe-plugin you must not use a forkCount of 0
or set the forkMode to never as this would prevent the execution of the tests with the javaagent set and no coverage would be recorded.
-->
<forkCount>1</forkCount>
<!-- Hope to solve
Spring boot related tests fail on jenkins sometimes https://github.com/metasfresh/metasfresh/issues/2988
The problem might be related to the static variable Adempiere.instance which holds a SpringContext -->
<!-- reuseForks>false</reuseForks -->
<!-- reuseForks=false solved the problem, but we can't live with the increase in build time
<reuseForks>true</reuseForks> -->
<!-- random might be a good idea in general, but due to our known problems, prefer determinability
Again, see Spring boot related tests fail on jenkins sometimes https://github.com/metasfresh/metasfresh/issues/2988 -->
<runOrder>filesystem</runOrder>
<!-- runOrder>random</runOrder -->
<systemPropertyVariables>
<concordion.output.dir>${acceptance.reports.dir}</concordion.output.dir>
</systemPropertyVariables>
<includes>
<!-- default inclusions, see http://maven.apache.org/surefire/maven-surefire-plugin/examples/inclusion-exclusion.html -->
<include>**/Test*.java</include>
<include>**/*Test.java</include>
<include>**/*TestCase.java</include>
<!-- additional include, because we often use that pattern -->
<include>**/*Tests.java</include>
</includes>
</configuration>
</plugin>
<plugin>
<!--
gh #968: If we run mvn properties:write-project-properties
then store the properties to a file calle "app.properties".
We need this for https://github.com/metasfresh/metasfresh/issues/968
because among those properties there are some artifact versions that we want to document.
-->
<groupId>org.codehaus.mojo</groupId>
<artifactId>properties-maven-plugin</artifactId>
<version>1.0.0</version>
<configuration>
<outputFile>app.properties</outputFile>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>3.0.0-M1</version>
<dependencies>
<!-- needed for banDuplicateClasses -->
<dependency>
<groupId>org.codehaus.mojo</groupId>
<artifactId>extra-enforcer-rules</artifactId>
<version>1.0-beta-4</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.7.9</version>
</plugin>
<!--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>com.vaadin</groupId>
<artifactId>
vaadin-maven-plugin
</artifactId>
<versionRange>
[7.6.1,)
</versionRange>
<goals>
<goal>compile-theme</goal>
<goal>resources</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore></ignore>
</action>
</pluginExecution>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.codehaus.mojo</groupId>
<artifactId>properties-maven-plugin</artifactId>
<versionRange>[1.0.0,)</versionRange>
<goals>
<goal>set-system-properties</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore></ignore>
</action>
</pluginExecution>
<pluginExecution>
<pluginExecutionFilter>
<groupId>com.alexnederlof</groupId>
<artifactId>jasperreports-plugin</artifactId>
<versionRange>[2.0,)</versionRange>
<goals>
<goal>jasper</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore></ignore>
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
<profiles>
<profile>
<!--
The enforcer plugin can be a tremendous nuisance.
It fails because we use version ranges in our parent pom declarations with this outout:
[WARNING] Could not find org.jmockit:jmockit:jar:1.30:test at null
[WARNING] Rule 0: org.apache.maven.plugins.enforcer.RequirePluginVersions failed with message:
Failure to find de.metas:de.metas.parent:pom:(1.0.0,3) in (URL ...) was cached in the local repository, resolution will not be reattempted...
de.metas:de.metas.parent:pom:(1.0.0,3)
However, when running on jenkins, we resolve the parent version anyways (using the maven-versions-plugin)
and *then* we can benefit a lot from making sure that the plugin versions are not a moving target
-->
<id>enforcer-profile</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<configuration>
<rules>
<!-- task 08834: We shall not leave the decision about plugin-versions
to maven. Rationale: we had the case that a build stopped working at a *very*
critical moment, because maven picked a more recent version of the jaxb plugin.
That version didn't support the way, we configured it and failed with an
error message. This shall not happen again. -->
<requirePluginVersions>
<message>!! We need to have the plugin version under control to avoid build failures due to maven releasing a new plugin versionm !!</message>
<banLatest>true</banLatest>
<banRelease>true</banRelease>
<banSnapshots>true</banSnapshots>
<phases>clean,deploy,site</phases>
<additionalPlugins>
<additionalPlugin>org.apache.maven.plugins:maven-reactor-plugin</additionalPlugin>
</additionalPlugins>
<unCheckedPluginList>org.apache.maven.plugins:maven-enforcer-plugin,org.apache.maven.plugins:maven-eclipse-plugin</unCheckedPluginList>
</requirePluginVersions>
<!-- See http://maven.apache.org/enforcer/enforcer-rules/dependencyConvergence.html -->
<dependencyConvergence />
<!--
metas 10.x.x dependencies are only for local use (i.e. just in your local workspace).
We can't allow them to be build on jenkins, because then they would be deployed to the maven repos and shadow the "actual" builds with correct build numbers.
Also see http://maven.apache.org/enforcer/enforcer-rules/bannedDependencies.html
-->
<bannedDependencies>
<excludes>
<exclude>de.metas*:*:[10,)</exclude>
</excludes>
</bannedDependencies>
<banDuplicateClasses>
<ignoreClasses>
<!-- itext-2.1.7 has two different versions as dependences -->
<ignoreClass>org.bouncycastle.*</ignoreClass>
<!-- org.jboss.client:jbossall-client and partially geronimo specs -->
<ignoreClass>javax.annotation.*</ignoreClass>
<ignoreClass>javax.ejb.*</ignoreClass>
<ignoreClass>javax.jms.*</ignoreClass>
<ignoreClass>javax.management.j2ee.*</ignoreClass>
<ignoreClass>javax.xml.*</ignoreClass>
<ignoreClass>javax.transaction.*</ignoreClass>
<ignoreClass>org.apache.*</ignoreClass>
<ignoreClass>org.codehaus.*</ignoreClass>
<ignoreClass>hidden.org.codehaus.*</ignoreClass>
<ignoreClass>org.junit.*</ignoreClass>
<ignoreClass>org.w3c.*</ignoreClass>
<ignoreClass>org.xml.*</ignoreClass>
<!-- this class originates from org.zkoss.calendar:calendar:jar:1.0.0-RC -->
<ignoreClass>org.zkoss.calendar.render.CalendarsDefault</ignoreClass>
<!-- the following are camel/servicemix related dependencies -->
<!-- Found in, both are dependencies of mylin-smooks-all org.ow2.bundles:ow2-bundles-externals-opencsv:jar:1.0.23:compile
net.sf.opencsv:opencsv:jar:2.1:compile -->
<ignoreClass>au.com.bytecode.*</ignoreClass>
<ignoreClass>com.microsoft.schemas.*</ignoreClass>
<ignoreClass>org.etsi.uri.*</ignoreClass>
<ignoreClass>org.openxmlformats.schemas.*</ignoreClass>
<ignoreClass>org.w3.x2000.*</ignoreClass>
<!-- Found in: xmlpull:xmlpull:jar:1.1.3.1:compile xpp3:xpp3_min:jar:1.1.4c:compile -->
<ignoreClass>org.xmlpull.*</ignoreClass>
<!-- Found in: org.apache.xmlbeans:xmlbeans:jar:2.3.0:compile org.apache.servicemix.bundles:org.apache.servicemix.bundles.poi:jar:3.12_1:compile -->
<ignoreClass>schemaorg_apache_xmlbeans.system.*</ignoreClass>
<ignoreClass>repackage.Repackager</ignoreClass>
<ignoreClass>repackage.Repackage</ignoreClass>
<ignoreClass>repackage.EditBuildScript</ignoreClass>
<!-- Found in: org.apache.tomcat.embed:tomcat-embed-core:jar:8.0.30:compile
javax.servlet:javax.servlet-api:jar:3.1.0:provided -->
<ignoreClass>javax.servlet.*</ignoreClass>
</ignoreClasses>
<dependencies>
<!-- See https://groups.google.com/forum/#!topic/jmockit-users/nwNw-la_FAM
("JUnit classes in JMockit jar") for background info -->
<dependency>
<artifactId>jmockit</artifactId>
<ignoreClasses>
<ignoreClass>org.junit.runner.Runner</ignoreClass>
</ignoreClasses>
</dependency>
<!-- this is a dependency of spring-boot-starter-test 1.4.1 the error
message we are avoiding this was goes like this: ================= Duplicate
classes found: Found in: org.ow2.asm:asm:jar:5.0.3:test net.minidev:accessors-smart:jar:1.1:test
Duplicate classes: org/objectweb/asm/Type.class [...] ================= -->
<dependency>
<groupId>net.minidev</groupId>
<artifactId>accessors-smart</artifactId>
<ignoreClasses>
<ignoreClass>org.objectweb.asm.*</ignoreClass>
</ignoreClasses>
</dependency>
<!-- see also https://www.elastic.co/blog/to-shade-or-not-to-shade -->
<dependency>
<groupId>org.elasticsearch</groupId>
<artifactId>elasticsearch</artifactId>
<ignoreClasses>
<ignoreClass>org.joda.*</ignoreClass>
</ignoreClasses>
</dependency>
<!-- the embedded tomcat of spring-boot 1.5.3.RELEASE come with baked-in javax.persistance api classes.. -->
<dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-core</artifactId>
<ignoreClasses>
<ignoreClass>javax.persistence.*</ignoreClass>
</ignoreClasses>
</dependency>
</dependencies>
<findAllDuplicates>true</findAllDuplicates>
</banDuplicateClasses>
</rules>
<fail>true</fail>
</configuration>
<executions>
<execution>
<id>enforce</id>
<goals>
<goal>enforce</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<!-- If there is a configs directory, then this profile will activate and zip up the files in that directory -->
<id>configs</id>
<activation>
<file>
<exists>src/main/configs</exists>
</file>
</activation>
<build>
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<dependencies>
<dependency>
<groupId>de.metas</groupId>
<artifactId>metasfresh-assemblies</artifactId>
<version>[1.0.0,10.0.0]</version>
</dependency>
</dependencies>
<executions>
<execution>
<id>make-configs-assembly</id> <!-- this is used for inheritance merges -->
<phase>package</phase> <!-- bind to the packaging phase -->
<goals>
<goal>single</goal>
</goals>
<configuration>
<descriptorRefs>
<descriptorRef>configs</descriptorRef>
</descriptorRefs>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<!--
If the environment variable MF_VERSION is not set, it means that
we are not building on jenkins, so we substitute the value "LOCAL-NO-RELEASE" instead.
Without any value, the spring-boot release-info goal will probably fail since is usually tries to write this value into the build-info.properties file
See https://github.com/metasfresh/metasfresh/issues/2110 -->
<!-- Note that until now i don't see a reason to add a pendant for this to /de.metas.adempiere.adempiere.base/src/main/java-legacy/org/compiere/Adempiere.java ..so i don't.. -->
<profile>
<id>jenkins-BUILD_NUMBER-not-set</id>
<activation>
<property>
<name>!env.BUILD_NUMBER</name>
</property>
</activation>
<properties>
<!-- This property is set by jacoco and used in the surefire config fourther down
Set it to empty to avoid JVM startup error Could not find or load main class @{argLine} when run without jacoco
thx to
* https://github.com/metasfresh/metasfresh/issues/3073
* http://www.eclemma.org/jacoco/trunk/doc/prepare-agent-mojo.html -->
<argLine></argLine>
<env.MF_VERSION>LOCAL-NO-RELEASE</env.MF_VERSION>
<env.MF_RELEASE_VERSION>0.0</env.MF_RELEASE_VERSION> <!-- needs to be like this for the launch4j plugin's sake -->
<env.BUILD_TAG>LOCAL-NO-RELEASE</env.BUILD_TAG>
<env.BUILD_URL>LOCAL-NO-RELEASE</env.BUILD_URL>
<env.JOB_NAME>LOCAL-NO-RELEASE</env.JOB_NAME>
<env.BUILD_NUMBER>0</env.BUILD_NUMBER>
</properties>
</profile>
<!--
If the src/main/docker is present, then this profile defines a dedicated property project.build.directory
and copies its contents and also the contents of src/main/configs (if it exists) into that directory.
The actual build can then provide additional files to ${project.build.directory}.
Note that the actual docker building is (currently) done outside of maven.
-->
<profile>
<id>prepare-docker</id>
<activation>
<file>
<exists>src/main/docker</exists>
</file>
</activation>
<properties>
<!-- this value needs to be in sync with our createAndPublishDockerImage jenkins pipeline step -->
<docker.build.directory>target/docker</docker.build.directory>
</properties>
<build>
<plugins>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<id>copy-docker-folder-for-docker-build</id>
<phase>package</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${docker.build.directory}</outputDirectory>
<resources>
<resource>
<directory>src/main/docker</directory>
<filtering>true</filtering>
</resource>
</resources>
</configuration>
</execution>
<execution>
<id>copy-configs-folder-for-docker-build</id>
<phase>package</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${docker.build.directory}/configs</outputDirectory>
<resources>
<resource>
<directory>src/main/configs</directory>
<filtering>true</filtering>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<!--
Add code coverage metrics to our builds https://github.com/metasfresh/metasfresh/issues/2343
Also define an additional repository with placeholders. The jenkins build jobs will set the values from outside.
Jenkins by default defines a property BUILD_NUMBER which is used to enable the profile.
-->
<profile>
<id>jenkins-BUILD_NUMBER-set</id>
<activation>
<property>
<name>env.BUILD_NUMBER</name>
</property>
</activation>
<repositories>
<!-- this additional repo's parameters can be set from outside. It usually corresponds to a (task-)branch -->
<repository>
<id>${deploy-repo-id}</id>
<name>${deploy-repo-name}</name>
<url>${deploy-repo-url}</url>
</repository>
</repositories>
<build>
<plugins>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<executions>
<execution>
<id>jacoco-prepare-agent</id>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>jacoco-report</id>
<goals>
<goal>report</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<!-- If there is a jasper sources directory, this profile will activate
It will compile those jrxml files and then assemble the jasper files into
a jar. It will *NOT* add src/main/jasperreports as additional source folder,
(that's done by the "jasper-source-folder" profile) -->
<id>jasper-build</id>
<activation>
<file>
<exists>src/main/jasperreports</exists>
</file>
</activation>
<build>
<plugins>
<!-- outputDirectory is the same as jasperreports-maven-plugin's outputDirectory -->
<!-- jrxmls are compiled into jasper files, they don't need to be copied, so we exclude *.jrxml -->
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>2.6</version>
<executions>
<execution>
<id>copy-resources</id>
<phase>process-resources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/jasper</outputDirectory>
<resources>
<resource>
<directory>src/main/jasperreports</directory>
<excludes>
<exclude>**/*.jrxml</exclude>
</excludes>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.alexnederlof</groupId>
<artifactId>jasperreports-plugin</artifactId>
<version>2.0</version>
<configuration>
<!-- These are the default configurations: -->
<compiler>net.sf.jasperreports.engine.design.JRJdtCompiler</compiler>
<sourceDirectory>src/main/jasperreports</sourceDirectory>
<outputDirectory>${project.build.directory}/jasper</outputDirectory>
<outputFileExt>.jasper</outputFileExt>
<xmlValidation>true</xmlValidation>
<verbose>false</verbose>
<numberOfThreads>4</numberOfThreads>
<failOnMissingSourceDirectory>true</failOnMissingSourceDirectory>
<sourceScanner>org.codehaus.plexus.compiler.util.scan.StaleSourceScanner</sourceScanner>
</configuration>
<executions>
<execution>
<phase>process-sources</phase>
<goals>
<goal>jasper</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>net.sf.barcode4j</groupId>
<artifactId>barcode4j-fop-ext-complete</artifactId>
<version>2.0</version>
<type>jar</type>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<dependencies>
<dependency>
<groupId>de.metas</groupId>
<artifactId>metasfresh-assemblies</artifactId>
<!-- version>${metasfresh.assembly.descriptor.version}</version -->
<version>[1.0.0,10.0.0]</version>
</dependency>
</dependencies>
<executions>
<execution>
<id>make-jasper-assembly</id> <!-- this is used for inheritance merges -->
<phase>package</phase> <!-- bind to the packaging phase -->
<goals>
<goal>single</goal>
</goals>
<configuration>
<descriptorRefs>
<descriptorRef>jasper</descriptorRef>
</descriptorRefs>
</configuration>
</execution>
<execution>
<id>make-jasper-sources-assembly</id> <!-- this is used for inheritance merges -->
<phase>package</phase> <!-- bind to the packaging phase -->
<goals>
<goal>single</goal>
</goals>
<configuration>
<descriptorRefs>
<descriptorRef>jasper_sources</descriptorRef>
</descriptorRefs>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<!-- Adds src/main/jasperreports as additional source folder (if the directory is present)
this is only intended to be active when running in eclipse, and not for *any* actual maven build.
We don't want the jasper-stuff to end up in a "regular" artifact jar!
Particularly the properties files need to be overridden in certain situations,
so we can't afford to have an additional copy in the classpath via regular jars
Hint: in eclipse, you can activate this profile in the projects where you need it,
by opening the projects properties (=>maven).
But, then you can't build a proper artifact using eclipse-maven -->
<id>jasper-source-folder</id>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>add-resource</id>
<phase>generate-resources</phase>
<goals>
<goal>add-resource</goal>
</goals>
<configuration>
<resources>
<resource>
<directory>src/main/jasperreports</directory>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>