masterpom
Used in:
components
- OverviewOverview
- VersionsVersions
- DependentsDependents
- DependenciesDependencies
<dependency>
<groupId>com.sta-soft</groupId>
<artifactId>masterpom</artifactId>
<version>1.14</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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.sta-soft</groupId>
<artifactId>masterpom</artifactId>
<version>1.14</version>
<packaging>pom</packaging>
<name>MasterPom</name>
<description>The parent pom of all M-Projects. It defines versions of plugins and dependencies used in these projects.</description>
<url>http://www.sta-soft.com</url>
<organization>
<name>>StA-Soft<</name>
<url>http://www.sta-soft.com</url>
</organization>
<inceptionYear>2018-2025</inceptionYear>
<developers>
<developer>
<name>Steffen Albrecht</name>
<email>steffen.albrecht.ef@sta-soft.com</email>
<organization>>StA-Soft<</organization>
<organizationUrl>http://www.sta-soft.com</organizationUrl>
</developer>
</developers>
<licenses>
<license>
<name>The Apache License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
</license>
</licenses>
<scm>
<!-- scm:svn:http://[username[:password]@]server_name[:port]/path_to_repository -->
<!-- scm:svn:https://[username[:password]@]server_name[:port]/path_to_repository -->
<connection>scm:svn:http://ubuntu2/svn/myrepo/MasterPom/trunk</connection>
<developerConnection>scm:svn:http://ubuntu2/svn/myrepo/MasterPom/trunk</developerConnection>
<url>http://ubuntu2/svn/myrepo/MasterPom/trunk/</url>
</scm>
<!--
<distributionManagement>
<repository>
<id>release</id>
<name>release</name>
<url>http://ubuntu4:7080/archiva/repository/release</url>
</repository>
<snapshotRepository>
<uniqueVersion>true</uniqueVersion>
<id>snapshots</id>
<name>snapshots</name>
<url>http://ubuntu4:7080/archiva/repository/snapshots</url>
</snapshotRepository>
</distributionManagement>
-->
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target> <!-- alt / Java 1.8: "1.8" -->
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<checkstyle.version>8.11</checkstyle.version>
<checkstyle.converter3.version>3.122</checkstyle.converter3.version>
<maven-checkstyle-plugin.version>3.0.0</maven-checkstyle-plugin.version>
<maven-jar-plugin.version>3.1.0</maven-jar-plugin.version>
<maven-war-plugin.version>3.2.3</maven-war-plugin.version> <!-- neu -->
<maven-source-plugin.version>3.0.1</maven-source-plugin.version>
<maven-javadoc-plugin.version>3.0.1</maven-javadoc-plugin.version> <!-- neu: 3.11.2 (braucht aber eine neuere Maven-Version) -->
<maven-surefire-plugin.version>2.17</maven-surefire-plugin.version>
<maven-surefire-plugin.argline>-Djdk.net.URLClassPath.disableClassPathURLCheck=true</maven-surefire-plugin.argline>
<maven-shade-plugin.version>1.4</maven-shade-plugin.version>
<maven-resources-plugin.version>3.1.0</maven-resources-plugin.version>
<build-helper-maven-plugin.version>3.0.0</build-helper-maven-plugin.version>
<exec-maven-plugin.version>1.6.0</exec-maven-plugin.version>
<maven-dependency-plugin.version>3.1.1</maven-dependency-plugin.version>
<maven-deploy-plugin.version>3.0.0-M1</maven-deploy-plugin.version>
<maven-release-plugin.version>2.5.3</maven-release-plugin.version>
<jacoco-maven-plugin.version>0.8.13</jacoco-maven-plugin.version> <!-- alt / Java 1.8: 0.8.2 -->
<properties-maven-plugin.version>1.0.0</properties-maven-plugin.version>
<maven-antrun-plugin.version>1.7</maven-antrun-plugin.version>
<junit.version>4.12</junit.version>
</properties>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>${maven-jar-plugin.version}</version>
<configuration>
<archive>
<manifest>
<!-- Sets the Entries: Implementation-Title, Implementation-Version, Implementation-Vendor-Id, Implementation-Vendor -->
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
<!-- Sets the Entries: Specification-Title, Specification-Vendor, Specification-Version -->
<addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
</manifest>
</archive>
</configuration>
<executions>
<execution>
<id>default-jar</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
<execution>
<id>test-jar</id>
<goals>
<goal>test-jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>${maven-source-plugin.version}</version>
<configuration>
<archive>
<manifest>
<!-- Sets the Entries: Implementation-Title, Implementation-Version, Implementation-Vendor-Id, Implementation-Vendor -->
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
<!-- Sets the Entries: Specification-Title, Specification-Vendor, Specification-Version -->
<addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
</manifest>
</archive>
</configuration>
<executions>
<execution>
<id>default-sources-jar</id>
<goals>
<!-- jar-no-fork is similar to jar but does not fork the build lifecycle -->
<goal>jar-no-fork</goal>
</goals>
</execution>
<execution>
<id>test-sources-jar</id>
<goals>
<!--test-jar-no-fork is similar to test-jar but does not fork the build lifecycle -->
<goal>test-jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>${maven-javadoc-plugin.version}</version>
<configuration>
<archive>
<manifest>
<!-- Sets the Entries: Implementation-Title, Implementation-Version, Implementation-Vendor-Id, Implementation-Vendor -->
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
<!-- Sets the Entries: Specification-Title, Specification-Vendor, Specification-Version -->
<addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
</manifest>
</archive>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
<configuration>
<!--
<includeDependencySources>true</includeDependencySources>
<dependencySourceIncludes>
<dependencySourceInclude>com.googlecode.jaitools:*</dependencySourceInclude>
</dependencySourceIncludes>
<excludePackageNames>jaitools.demo.*</excludePackageNames>
-->
<encoding>UTF-8</encoding>
<quiet>true</quiet>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${maven-surefire-plugin.version}</version>
<configuration>
<skip>true</skip>
<!-- see: https://stackoverflow.com/questions/53010200/maven-surefire-could-not-find-forkedbooter-class -->
<!--argLine>-Xmx1024m -Xms1024m -XX:MaxPermSize=512m -Djdk.net.URLClassPath.disableClassPathURLCheck=true</argLine-->
<argLine>${maven-surefire-plugin.argline}</argLine>
<!--
<includes>
<include>**/*Test.java</include>
</includes>
-->
</configuration>
</plugin>
<plugin>
<!-- http://www.eclemma.org/jacoco/trunk/doc/maven.html -->
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>${jacoco-maven-plugin.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>${maven-shade-plugin.version}</version>
<configuration>
<createDependencyReducedPom>true</createDependencyReducedPom>
<createSourcesJar>true</createSourcesJar>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"/>
</transformers>
</configuration>
<executions>
<execution>
<id>default-shade</id>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<!--
<configuration>
<finalName>XXX-shade</finalName>
</configuration>
<configuration>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
< ! - - mainClass>my.main.class</mainClass- - >
</transformer>
</transformers>
</configuration>
-->
</execution>
</executions>
</plugin>
<plugin>
<!-- https://maven.apache.org/plugins/maven-checkstyle-plugin/ -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>${maven-checkstyle-plugin.version}</version>
<dependencies>
<dependency>
<groupId>com.puppycrawl.tools</groupId>
<artifactId>checkstyle</artifactId>
<version>${checkstyle.version}</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>${exec-maven-plugin.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>${maven-deploy-plugin.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>${maven-release-plugin.version}</version>
<!--
<configuration>
<tagBase>http://ubuntu2/svn/myrepo/MasterPom/tags</tagBase>
</configuration>
-->
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>${build-helper-maven-plugin.version}</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>properties-maven-plugin</artifactId>
<version>${properties-maven-plugin.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>${maven-antrun-plugin.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>${maven-resources-plugin.version}</version>
</plugin>
</plugins>
</pluginManagement>
</build>
<dependencyManagement>
<dependencies>
<!-- Test -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
</dependencyManagement>
<profiles>
<profile>
<id>source</id>
<activation>
<!-- activate automatically when built on Jenkins build server -->
<property>
<name>env.JENKINS_URL</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>test</id>
<activation>
<!-- activate automatically when built on Jenkins build server -->
<property>
<name>env.JENKINS_URL</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skip>false</skip>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<!-- skip checkstype, pmd, spotbugs and cpd if no ${basedir}/src/main/java directory existing -->
<!--
<profile>
<id>skipAnalyze</id>
<activation>
<activeByDefault>false</activeByDefault>
<file>
<missing>${basedir}/src/main/java</missing>
</file>
</activation>
<properties>
<checkstyle.skip>true</checkstyle.skip>
<pmd.skip>true</pmd.skip>
<cpd.skip>true</cpd.skip>
<spotbugs.skip>true</spotbugs.skip>
</properties>
</profile>
-->
<!-- **************************************************************************************************** -->
<!-- * Profile javadoc * -->
<!-- **************************************************************************************************** -->
<profile>
<id>javadoc</id>
<activation>
<!-- activate automatically when built on Jenkins build server -->
<property>
<name>env.JENKINS_URL</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<failOnError>false</failOnError>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<!-- **************************************************************************************************** -->
<!-- * Profile analyze * -->
<!-- **************************************************************************************************** -->
<profile>
<id>analyze</id>
<activation>
<!-- activate automatically when built on Jenkins build server -->
<property>
<name>env.JENKINS_URL</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<configuration>
<!--
<configLocation>checkstyle_checks.xml</configLocation>
-->
<configLocation>checkstyle/checkstyle_gen_checks.xml</configLocation>
<failOnViolation>false</failOnViolation>
<!--
<suppressionsLocation>checkstyle_suppressions.xml</suppressionsLocation>
-->
<includeTestSourceDirectory>true</includeTestSourceDirectory>
<linkXRef>false</linkXRef>
</configuration>
<executions>
<execution>
<goals>
<!--goal>check</goal-->
<goal>checkstyle</goal>
</goals>
<phase>verify</phase>
</execution>
</executions>
<!-- unklar, warum hier angegeben: -->
<dependencies>
<dependency>
<groupId>com.sta-soft</groupId>
<artifactId>converter3</artifactId>
<version>${checkstyle.converter3.version}</version>
<classifier>full</classifier>
</dependency>
</dependencies>
</plugin>
<!--
Dependency-Plugin: Das gibt Konflikte bei anderen Verwendungen des Dependency-Plugins, daher hier nicht verwenden!
Das Kopieren erfolgt im CheckStyleRunner.
-->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<!--
Mit java-Goal funktioniert es nicht, weil das java-Goal nur 1x ausgeführt wird.
Mit dem exec-Goal ist auch eine Mehrfachausführung möglich.
-->
<!-- Endlösung (dabei wird das Kopieren der Ressourcen mit im CheckStyleRunner realisiert): -->
<execution>
<id>checkstyle_frm</id>
<goals>
<goal>exec</goal>
</goals>
<phase>install</phase>
<configuration>
<executable>java</executable>
<arguments>
<argument>-classpath</argument>
<argument>${settings.localRepository}/com/sta-soft/converter3/${checkstyle.converter3.version}/converter3-${checkstyle.converter3.version}-full.jar</argument>
<argument>com.sta.cts.CheckStyleRunner</argument>
<argument>target/checkstyle-result.xml</argument>
<argument>target/checkstyle</argument>
<argument>${project.name}</argument>
</arguments>
</configuration>
</execution>
</executions>
<!-- unklar, warum hier NICHT angegeben: -->
<!-- (Hintergrund: Dependency muss ggf. heruntergeladen werden, damit obiges funktioniert!) -->
<!--
<dependencies>
<dependency>
<groupId>com.sta-soft</groupId>
<artifactId>converter3</artifactId>
<version>${checkstyle.converter3.version}</version>
<classifier>full</classifier>
</dependency>
</dependencies>
-->
</plugin>
</plugins>
</build>
</profile>
<!-- **************************************************************************************************** -->
<!-- * Profile coverage * -->
<!-- **************************************************************************************************** -->
<profile>
<id>coverage</id>
<activation>
<!-- activate automatically when built on Jenkins build server -->
<property>
<name>env.JENKINS_URL</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<!-- see: https://stackoverflow.com/questions/53010200/maven-surefire-could-not-find-forkedbooter-class -->
<!--argLine>-Xmx1024m -Xms1024m -XX:MaxPermSize=512m -Djdk.net.URLClassPath.disableClassPathURLCheck=true</argLine-->
<argLine>${maven-surefire-plugin.argline} ${jacoco.argline}</argLine>
<!--
<includes>
<include>**/*Test.java</include>
</includes>
-->
</configuration>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<configuration>
<excludes>
<!-- exclude javassist classes (leads to runtime exception in coverage) -->
<!-- see http://docs.sonarqube.org/display/PLUG/JaCoCo+Plugin for more information -->
<exclude>*_javassist_*</exclude>
<exclude>org.springframework.*</exclude>
</excludes>
</configuration>
<executions>
<!-- Unit tests -->
<execution>
<id>pre-unit-test</id>
<goals>
<goal>prepare-agent</goal>
</goals>
<phase>initialize</phase>
<configuration>
<!--
<destFile>${sonar.jacoco.reportPath}</destFile>
-->
<!-- JaCoCo runtime agent for surefire-plugin -->
<propertyName>jacoco.argline</propertyName>
<append>true</append>
</configuration>
</execution>
<execution>
<id>post-unit-test</id>
<goals>
<goal>report</goal>
</goals>
<phase>test</phase>
<configuration>
<!--
<dataFile>${sonar.jacoco.reportPath}</dataFile>
-->
<outputDirectory>${project.reporting.outputDirectory}/jacoco</outputDirectory>
</configuration>
</execution>
<!-- Integration tests -->
<!--
<execution>
<id>pre-integration-test</id>
<goals>
<goal>prepare-agent-integration</goal>
</goals>
<phase>pre-integration-test</phase>
<configuration>
<destFile>${sonar.jacoco.itReportPath}</destFile>
< ! - - JaCoCo runtime agent for failsafe-plugin - - >
<propertyName>jacoco.agent.itArgLine</propertyName>
<append>true</append>
</configuration>
</execution>
<execution>
<id>post-integration-test</id>
<goals>
<goal>report-integration</goal>
</goals>
<phase>post-integration-test</phase>
<configuration>
<dataFile>${sonar.jacoco.itReportPath}</dataFile>
<outputDirectory>${project.reporting.outputDirectory}/jacoco-it</outputDirectory>
</configuration>
</execution>
-->
</executions>
</plugin>
</plugins>
</build>
</profile>
<!-- **************************************************************************************************** -->
<!-- * Profile deploy2central * -->
<!-- **************************************************************************************************** -->
<profile>
<id>deploy2central</id>
<!--
<distributionManagement>
<snapshotRepository>
<id>ossrh</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
<repository>
<id>ossrh</id>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>
-->
<!-- Da in der settings.xml ggf. die folgenden Properties gesetzt sind, und diese die distributionManagement-Vorgaben -->
<!-- überschreiben würden, müssen hier die Properties verwendet werden (und nicht distributionManagement)! -->
<properties>
<altReleaseDeploymentRepository>ossrh::https://oss.sonatype.org/service/local/staging/deploy/maven2</altReleaseDeploymentRepository>
<altSnapshotDeploymentRepository>ossrh::https://oss.sonatype.org/content/repositories/snapshots</altSnapshotDeploymentRepository>
</properties>
<!-- -->
<build>
<plugins>
<!-- Plugin wird nur hier benötigt und darf nur hier verwendet werden, daher nicht unter PluginManagement!!! -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.5</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
<configuration>
<gpgArguments>
<arg>--pinentry-mode</arg>
<arg>loopback</arg>
</gpgArguments>
</configuration>
</execution>
</executions>
</plugin>
<!-- Plugin wird nur hier benötigt und darf nur hier verwendet werden, daher nicht unter PluginManagement!!! -->
<!--
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.7</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
<stagingProgressTimeoutMinutes>120</stagingProgressTimeoutMinutes>
<keepStagingRepositoryOnCloseRuleFailure>true</keepStagingRepositoryOnCloseRuleFailure>
<keepStagingRepositoryOnFailure>true</keepStagingRepositoryOnFailure>
</configuration>
</plugin>
-->
<plugin>
<groupId>org.sonatype.central</groupId>
<artifactId>central-publishing-maven-plugin</artifactId>
<version>0.8.0</version>
<extensions>true</extensions>
<configuration>
<publishingServerId>central</publishingServerId>
<autoPublish>true</autoPublish>
<!--
<waitUntil>published</waitUntil>
-->
</configuration>
</plugin>
</plugins>
</build>
<!-- -->
</profile>
<!-- **************************************************************************************************** -->
<!-- * Profile filter-java-templates * -->
<!-- **************************************************************************************************** -->
<profile>
<!-- Filter Java source files in scr/main/java-templates and add the output folder as source folder. -->
<!-- Useful for generating a Java class containing version information or other properties from the POM. -->
<id>filter-java-templates</id>
<activation>
<activeByDefault>false</activeByDefault>
<file>
<exists>${basedir}/src/main/java-templates</exists>
<!-- using a variable here does not work -->
</file>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<id>copy-java-templates</id>
<goals>
<goal>copy-resources</goal>
</goals>
<phase>generate-sources</phase>
<configuration>
<resources>
<resource>
<directory>${basedir}/src/main/java-templates</directory>
<filtering>true</filtering>
</resource>
</resources>
<outputDirectory>${project.build.directory}/generated-sources/java-templates</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>parse-version</id>
<goals>
<goal>parse-version</goal>
</goals>
</execution>
<execution>
<id>add-generated-java-templates</id>
<goals>
<goal>add-source</goal>
</goals>
<phase>generate-sources</phase>
<configuration>
<sources>
<source>${project.build.directory}/generated-sources/java-templates</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<!-- **************************************************************************************************** -->
<!-- * Profile create-version-java-file * -->
<!-- **************************************************************************************************** -->
<profile>
<id>create-version-java-file</id>
<activation>
<!--
<property>
<name>create-version-java-file</name>
</property>
-->
<!--
<file>
<exists>${basedir}/src/main/java/com/sta/m*</exists>
</file>
-->
<file>
<exists>${basedir}/versionhelper.properties</exists>
</file>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>properties-maven-plugin</artifactId>
<executions>
<execution>
<id>read-versionhelper-properties</id>
<phase>initialize</phase>
<goals>
<goal>read-project-properties</goal>
</goals>
<configuration>
<files>
<file>${project.basedir}/versionhelper.properties</file>
</files>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<!-- Parse a version string and set properties containing the component parts of the version. -->
<execution>
<id>parse-version-2</id>
<goals>
<goal>parse-version</goal>
</goals>
</execution>
<execution>
<id>add-generated-java-templates-2</id>
<goals>
<goal>add-source</goal>
</goals>
<phase>generate-sources</phase>
<configuration>
<sources>
<source>${project.build.directory}/generated-sources/java-templates-2</source>
</sources>
</configuration>
</execution>
<execution>
<id>add-generated-test-java-templates-2</id>
<goals>
<goal>add-test-source</goal>
</goals>
<phase>generate-test-sources</phase>
<configuration>
<sources>
<source>${project.build.directory}/generated-test-sources/java-templates-2</source>
</sources>
</configuration>
</execution>
<execution>
<id>regex-property</id>
<phase>generate-sources</phase>
<goals>
<goal>regex-property</goal>
</goals>
<configuration>
<name>VersionHelperRelPath</name>
<value>${VersionHelperPackage}</value>
<regex>\.</regex>
<replacement>/</replacement>
</configuration>
</execution>
<execution>
<id>build-timestamp-property</id>
<goals>
<goal>timestamp-property</goal>
</goals>
<configuration>
<name>build-timestamp</name>
<pattern>dd.MM.yyyy HH:mm:ss</pattern>
<locale>de_DE</locale>
<timeZone>Europe/Berlin</timeZone>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>generate-version-file</id>
<phase>generate-sources</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<echo>VersionHelperPackage: ${VersionHelperPackage}</echo>
<echo>VersionHelperRelPath: ${VersionHelperRelPath}</echo>
<echo>project.name: ${project.name}</echo>
<echo>project.parent.name: ${project.parent.name}</echo>
<echo>project.inceptionYear: ${project.inceptionYear}</echo>
<echo file="${project.build.directory}/generated-sources/java-templates-2/${VersionHelperRelPath}/${project.name}VersionHelper.java" append="false">${line.separator}package ${VersionHelperPackage};
/**
* <p>Name: ${project.name}VersionHelper</p>
* <p>Description: Provide versions and other variables from maven.
* </p>
* <p>Comment: ...
* </p>
* <p>Copyright: Copyright (c) 2019-2025</p>
* <p>Company: &gt;StA-Soft&lt;</p>
* @author StA
* @version 1.0
*/
public final class ${project.name}VersionHelper
{
/**
* Project-Name.
*/
public static final String PROJECT_NAME = "${project.name}";
/**
* Version.
*/
public static final String VERSION = "${project.version}";
/**
* Major-Version.
*/
public static final String MAJOR_VERSION = "${parsedVersion.majorVersion}";
/**
* Minor-Version.
*/
public static final String MINORVERSION_VERSION = "${parsedVersion.minorVersion}";
/**
* Incremental-Version.
*/
public static final String INCREMENTALVERSION_VERSION = "${parsedVersion.incrementalVersion}";
/**
* Qualifiert-Version.
*/
public static final String QUALIFIER_VERSION = "${parsedVersion.qualifier}";
/**
* Build-Number-Version.
*/
public static final String BUILDNUMBER_VERSION = "${parsedVersion.buildNumber}";
/**
* Copyright.
*/
public static final String COPYRIGHT = "${project.inceptionYear}";
/**
* Company.
*/
public static final String COMPANY = "${project.organization.name}";
/**
* SCM-Tag.
*/
public static final String SCM_TAG = "${project.scm.tag}";
/**
* Build-Time.
*/
public static final String BUILD_TIME = "${build-timestamp}"; // TimeZone: MESZ Europe/Berlin
/**
* Welcome-Message.
*/
public static final String WELCOME_MESSAGE = PROJECT_NAME + " Version " + VERSION + " Copyright (c) " + COPYRIGHT + " " + COMPANY;
//===========================================================================
/**
* Version ermitteln.
* @return Version
*/
public static String getVersion()
{
return VERSION;
}
/**
* Copyright ermitteln.
* @return Copyright
*/
public static String getCopyright()
{
return COPYRIGHT;
}
/**
* Company ermitteln.
* @return Company
*/
public static String getCompany()
{
return COMPANY;
}
/**
* Zeitpunkt des Generierens bzw. des Builds ermitteln.
* @return Zeitpunkt des Generierens bzw. des Builds als String in der Form
* "TT.MM.JJJJ HH:MM:SS"
*/
public static String getBuildTime()
{
return BUILD_TIME;
}
//===========================================================================
/**
* Dummy-Constructor.
*/
private ${project.name}VersionHelper()
{
}
}${line.separator}
</echo>
<fixcrlf file="${project.build.directory}/generated-sources/java-templates-2/${VersionHelperRelPath}/${project.name}VersionHelper.java"/>
</target>
</configuration>
</execution>
<execution>
<id>generate-test-version-file</id>
<phase>generate-test-sources</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<echo>VersionHelperPackage: ${VersionHelperPackage}</echo>
<echo>VersionHelperRelPath: ${VersionHelperRelPath}</echo>
<echo>project.name: ${project.name}</echo>
<echo>project.parent.name: ${project.parent.name}</echo>
<echo file="${project.build.directory}/generated-test-sources/java-templates-2/${VersionHelperRelPath}/${project.name}VersionHelperTest.java" append="false">${line.separator}package ${VersionHelperPackage};
import org.junit.Assert;
import org.junit.Test;
/**
* <p>Name: ${project.name}VersionHelperTest</p>
* <p>Description: Test for ${project.name}VersionHelper.
* </p>
* <p>Comment: ...
* </p>
* <p>Copyright: Copyright (c) 2019-2025</p>
* <p>Company: &gt;StA-Soft&lt;</p>
* @author StA
* @version 1.0
*/
public class ${project.name}VersionHelperTest
{
/**
* Simple not-null test.
*/
@Test
public void test${project.name}VersionHelper()
{
Assert.assertNotNull(${project.name}VersionHelper.getVersion());
Assert.assertNotNull(${project.name}VersionHelper.getCopyright());
Assert.assertNotNull(${project.name}VersionHelper.getCompany());
Assert.assertNotNull(${project.name}VersionHelper.getBuildTime());
}
}${line.separator}
</echo>
<fixcrlf file="${project.build.directory}/generated-test-sources/java-templates-2/${VersionHelperRelPath}/${project.name}VersionHelperTest.java"/>
</target>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>ant-contrib</groupId>
<artifactId>ant-contrib</artifactId>
<version>1.0b3</version>
<exclusions>
<exclusion>
<groupId>ant</groupId>
<artifactId>ant</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</profile>
<!-- **************************************************************************************************** -->
<!-- * Profiles - end * -->
<!-- **************************************************************************************************** -->
</profiles>
</project>