<?xml version="1.0" encoding="UTF-8"?>
  <!--
   Wurbelizer Parent
  -->
<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>

  <groupId>org.wurbelizer</groupId>
  <artifactId>wurbelizer-parent</artifactId>
  <version>21.6.4.0</version>
  <packaging>pom</packaging>

  <name>Wurbelizer Parent</name>
  <description>Parent Project for the Wurbelizer Modules</description>
  <url>https://wurbelizer.org</url>
  <organization>
    <name>Krake Softwaretechnik</name>
    <url>https://krake.de</url>
  </organization>

  <licenses>
    <license>
      <name>GNU LESSER GENERAL PUBLIC LICENSE, Version 2.1, February 1999</name>
			<url>http://www.gnu.org/licenses/lgpl-2.1.txt</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <developers>
    <developer>
      <email>harald@krake.de</email>
      <name>Harald Krake</name>
      <url>https://krake.de</url>
      <id>hkr</id>
    </developer>
  </developers>

  <modules>
    <module>wurbelizer</module>
    <module>wurbelizer-maven-plugin</module>
    <module>ant-wurbelizer</module>
    <module>console-wurbelizer</module>
  </modules>

  <properties>
    <rootBasedir>${project.basedir}</rootBasedir>
    <maven.build.timestamp.format>yyyy-MM-dd HH:mm</maven.build.timestamp.format>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.build.resourceEncoding>UTF-8</project.build.resourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    <dependency.locations.enabled>false</dependency.locations.enabled>
    <javac.version>21</javac.version>
    <javac.lint>all,-processing</javac.lint>

    <maven.version>3.9.0</maven.version>

    <maven.clean.plugin.version>3.5.0</maven.clean.plugin.version>
    <maven.compiler.plugin.version>3.14.0</maven.compiler.plugin.version>
    <maven.dependency.plugin.version>3.8.1</maven.dependency.plugin.version>
    <maven.deploy.plugin.version>3.1.3</maven.deploy.plugin.version>
    <maven.enforcer.plugin.version>3.5.0</maven.enforcer.plugin.version>
    <maven.gpg.plugin.version>3.2.7</maven.gpg.plugin.version>
    <maven.help.plugin.version>3.5.1</maven.help.plugin.version>
    <maven.install.plugin.version>3.1.3</maven.install.plugin.version>
    <maven.jar.plugin.version>3.4.2</maven.jar.plugin.version>
    <maven.javadoc.plugin.version>3.11.2</maven.javadoc.plugin.version>
    <maven.jxr.plugin.version>3.6.0</maven.jxr.plugin.version>
    <maven.owasp.plugin.version>12.1.3</maven.owasp.plugin.version>
    <maven.plugin.plugin.version>3.15.0</maven.plugin.plugin.version>
    <maven.plugin.report.plugin.version>3.15.1</maven.plugin.report.plugin.version>
    <maven.project.info.reports.plugin.version>3.6.2</maven.project.info.reports.plugin.version>
    <maven.resources.plugin.version>3.3.1</maven.resources.plugin.version>
    <maven.site.plugin.version>3.12.1</maven.site.plugin.version>
    <maven.source.plugin.version>3.3.1</maven.source.plugin.version>
    <maven.surefire.plugin.version>3.5.3</maven.surefire.plugin.version>
    <maven.versions.plugin.version>2.17.1</maven.versions.plugin.version>

    <ant.version>1.10.15</ant.version>
    <asm.version>9.8</asm.version>
    <maven.file.management.version>3.2.0</maven.file.management.version>
    <maven.plugin.annotations.version>3.14.0</maven.plugin.annotations.version>
    <mavengem.wagon.version>1.0.3</mavengem.wagon.version>
    <plexus.component.metadata.version>2.2.0</plexus.component.metadata.version>
    <slf4j.version>1.7.36</slf4j.version>   <!-- see below -->
    <testng.version>7.10.2</testng.version>
    <wagon.ssh.version>3.5.3</wagon.ssh.version>

  </properties>

  <scm>
    <connection>scm:git:https://bitbucket.org/krake-oss/wurbelizer.git</connection>
    <developerConnection>scm:git:ssh://git@bitbucket.org/krake-oss/wurbelizer.git</developerConnection>
    <url>https://bitbucket.org/krake-oss/wurbelizer/</url>
  </scm>

  <issueManagement>
    <system>Bitbucket</system>
    <url>https://bitbucket.org/krake-oss/wurbelizer/</url>
  </issueManagement>

  <distributionManagement>
    <site>
      <id>${site.id}</id>
      <url>scp:${site.url}/wurbelizer/${project.version}/</url>
    </site>
    <repository>
      <id>${repo.id}</id>
      <name>Release Repository</name>
      <url>${repo.releases.url}</url>
    </repository>
    <snapshotRepository>
      <id>${repo.id}</id>
      <name>Snapshot Repository</name>
      <url>${repo.snapshots.url}</url>
      <uniqueVersion>false</uniqueVersion>
    </snapshotRepository>
  </distributionManagement>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.testng</groupId>
        <artifactId>testng</artifactId>
        <version>${testng.version}</version>
      </dependency>
      <dependency>
        <!-- logger binder for testng only! -->
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-simple</artifactId>
        <version>${slf4j.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.ant</groupId>
        <artifactId>ant</artifactId>
        <version>${ant.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.maven</groupId>
        <artifactId>maven-core</artifactId>
        <version>${maven.version}</version>
        <scope>provided</scope>   <!-- newer versions provided by maven installation -->
      </dependency>
      <dependency>
        <groupId>org.apache.maven.shared</groupId>
        <artifactId>file-management</artifactId>
        <version>${maven.file.management.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.maven.plugin-tools</groupId>
        <artifactId>maven-plugin-annotations</artifactId>
        <version>${maven.plugin.annotations.version}</version>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <dependencies>
    <dependency>
      <groupId>org.testng</groupId>
      <artifactId>testng</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-simple</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>

    <extensions>
      <extension>
        <!-- this allows us to download gems (for the maven-project-info-reports-plugin) -->
        <groupId>org.torquebox.mojo</groupId>
        <artifactId>mavengem-wagon</artifactId>
        <version>${mavengem.wagon.version}</version>
      </extension>
    </extensions>

    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-plugin-plugin</artifactId>
          <version>${maven.plugin.plugin.version}</version>
          <configuration>
            <requiredMavenVersion>${maven.version}</requiredMavenVersion>
            <requiredJavaVersion>${javac.version}</requiredJavaVersion>
          </configuration>
          <dependencies>
            <dependency>
              <groupId>org.ow2.asm</groupId>
              <artifactId>asm</artifactId>
              <version>${asm.version}</version>
            </dependency>
          </dependencies>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-plugin-report-plugin</artifactId>
          <version>${maven.plugin.report.plugin.version}</version>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-javadoc-plugin</artifactId>
          <version>${maven.javadoc.plugin.version}</version>
          <configuration>
            <doclint>all,-missing</doclint>
          </configuration>
          <dependencies>
            <dependency>
              <groupId>org.ow2.asm</groupId>
              <artifactId>asm</artifactId>
              <version>${asm.version}</version>
            </dependency>
          </dependencies>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-help-plugin</artifactId>
          <version>${maven.help.plugin.version}</version>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-clean-plugin</artifactId>
          <version>${maven.clean.plugin.version}</version>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-install-plugin</artifactId>
          <version>${maven.install.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-compiler-plugin</artifactId>
          <version>${maven.compiler.plugin.version}</version>
          <configuration>
            <encoding>${project.build.sourceEncoding}</encoding>
            <release>${javac.version}</release>
            <showWarnings>true</showWarnings>
            <showDeprecation>true</showDeprecation>
            <compilerArgs>
              <arg>-Xlint:${javac.lint}</arg>
              <arg>-proc:full</arg>
            </compilerArgs>
          </configuration>
          <dependencies>
            <dependency>
              <groupId>org.ow2.asm</groupId>
              <artifactId>asm</artifactId>
              <version>${asm.version}</version>
            </dependency>
          </dependencies>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-resources-plugin</artifactId>
          <version>${maven.resources.plugin.version}</version>
          <configuration>
            <encoding>${project.build.resourceEncoding}</encoding>
            <propertiesEncoding>${project.build.resourceEncoding}</propertiesEncoding>
            <escapeString>\</escapeString>
          </configuration>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>${maven.surefire.plugin.version}</version>
          <dependencies>
            <dependency>
              <groupId>org.ow2.asm</groupId>
              <artifactId>asm</artifactId>
              <version>${asm.version}</version>
            </dependency>
          </dependencies>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-source-plugin</artifactId>
          <version>${maven.source.plugin.version}</version>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-jar-plugin</artifactId>
          <version>${maven.jar.plugin.version}</version>
          <configuration>
            <archive>
              <manifest>
                <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
              </manifest>
              <manifestEntries>
                <Implementation-Build-Date>${maven.build.timestamp}</Implementation-Build-Date>
              </manifestEntries>
            </archive>
          </configuration>
        </plugin>

        <plugin>
          <groupId>org.codehaus.plexus</groupId>
          <artifactId>plexus-component-metadata</artifactId>
          <version>${plexus.component.metadata.version}</version>
          <dependencies>
            <dependency>
              <groupId>org.ow2.asm</groupId>
              <artifactId>asm</artifactId>
              <version>${asm.version}</version>
            </dependency>
          </dependencies>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-site-plugin</artifactId>
          <version>${maven.site.plugin.version}</version>
          <configuration>
            <siteDirectory>${rootBasedir}/src/site</siteDirectory>
          </configuration>
          <dependencies>
            <dependency>
              <groupId>org.apache.maven.wagon</groupId>
              <artifactId>wagon-ssh</artifactId>
              <version>${wagon.ssh.version}</version>
            </dependency>
            <dependency>
              <groupId>org.ow2.asm</groupId>
              <artifactId>asm</artifactId>
              <version>${asm.version}</version>
            </dependency>
          </dependencies>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-dependency-plugin</artifactId>
          <version>${maven.dependency.plugin.version}</version>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-jxr-plugin</artifactId>
          <version>${maven.jxr.plugin.version}</version>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-project-info-reports-plugin</artifactId>
          <version>${maven.project.info.reports.plugin.version}</version>
        </plugin>

        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>versions-maven-plugin</artifactId>
          <version>${maven.versions.plugin.version}</version>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-gpg-plugin</artifactId>
          <version>${maven.gpg.plugin.version}</version>
        </plugin>

        <plugin>
          <groupId>org.owasp</groupId>
          <artifactId>dependency-check-maven</artifactId>
          <version>${maven.owasp.plugin.version}</version>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-enforcer-plugin</artifactId>
          <version>${maven.enforcer.plugin.version}</version>
        </plugin>
      </plugins>
    </pluginManagement>

    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-enforcer-plugin</artifactId>
        <executions>
          <execution>
            <id>enforce-property</id>
            <goals>
              <goal>enforce</goal>
            </goals>
            <configuration>
              <rules>
                <requireJavaVersion>
                  <version>[${javac.version},)</version>
                  <message>[ERROR] The currently supported version of Java is ${javac.version} or higher</message>
                </requireJavaVersion>
                <requireMavenVersion>
                  <version>[${maven.version},)</version>
                  <message>[ERROR] The currently supported version of Maven is ${maven.version} or higher</message>
                </requireMavenVersion>
                <requirePluginVersions>
                  <banLatest>true</banLatest>
                  <banRelease>true</banRelease>
                  <banSnapshots>false</banSnapshots>
                  <phases>clean,deploy,site</phases>
                  <message>[ERROR] All maven plugin versions must be specified.</message>
                </requirePluginVersions>
              </rules>
              <fail>true</fail>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>

  </build>

  <reporting>
    <plugins>
      <plugin>
        <!-- generate plugin docs as well -->
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-plugin-report-plugin</artifactId>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <configuration>
          <doclint>none</doclint>
          <failOnError>false</failOnError>
          <bottom><![CDATA[<a href="${project.url}">Wurbelizer</a> - Agility in Code Generation]]></bottom>
        </configuration>
        <reportSets>
          <reportSet>
            <id>default</id>
            <reports>
              <report>javadoc</report>
            </reports>
          </reportSet>
          <reportSet>
            <id>aggregate</id>
            <reports>
              <report>aggregate</report>
            </reports>
          </reportSet>
        </reportSets>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jxr-plugin</artifactId>
        <configuration>
          <bottom><![CDATA[<a href="${project.url}">Wurbelizer</a> - Agility in Code Generation]]></bottom>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-project-info-reports-plugin</artifactId>
      </plugin>

      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>versions-maven-plugin</artifactId>
        <reportSets>
          <reportSet>
            <id>versions</id>
            <reports>
              <report>dependency-updates-report</report>
              <report>plugin-updates-report</report>
              <report>property-updates-report</report>
            </reports>
          </reportSet>
        </reportSets>
      </plugin>
    </plugins>
  </reporting>

  <profiles>
    <profile>
      <id>release</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <executions>
              <execution>
                <id>attach-sources</id>
                <phase>package</phase>
                <goals>
                  <goal>jar-no-fork</goal>
                </goals>
                <configuration>
                  <archive>
                    <manifest>
                      <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                      <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
                    </manifest>
                    <manifestEntries>
                      <Implementation-Build-Date>${maven.build.timestamp}</Implementation-Build-Date>
                    </manifestEntries>
                  </archive>
                </configuration>
              </execution>
            </executions>
          </plugin>

          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <executions>
              <execution>
                <id>attach-javadocs</id>
                <goals>
                  <goal>jar</goal>
                </goals>
                <configuration>
                  <quiet>true</quiet>
                  <doclint>none</doclint>
                  <bottom><![CDATA[<a href="${project.url}">Wurbelizer</a> - Agility in Code Generation]]></bottom>
                  <archive>
                    <manifest>
                      <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                      <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
                    </manifest>
                    <manifestEntries>
                      <Implementation-Build-Date>${maven.build.timestamp}</Implementation-Build-Date>
                    </manifestEntries>
                  </archive>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>

    <profile>
      <id>sign</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>

    <profile>
      <id>publish</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.sonatype.central</groupId>
            <artifactId>central-publishing-maven-plugin</artifactId>
            <version>0.7.0</version>
            <extensions>true</extensions>
            <configuration>
              <publishingServerId>central</publishingServerId>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

</project>
