<?xml version="1.0" encoding="utf-8"?>

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

  <!-- coordinates for model and artifact -->
  <modelVersion>4.0.0</modelVersion>


  <!-- The Basics -->
  <groupId>eu.simuline</groupId>
  <artifactId>SUtils</artifactId>
   <version>1.2-SNAPSHOT</version>
   <packaging>jar</packaging>

  <!-- information for generating a site -->
  <name>SUtils</name>
  <description>
    Utilities used in simuline.
  </description>

  <url>http://www.simuline.eu/SUtils/</url><!-- same as site-deploy -->
  <inceptionYear>2021</inceptionYear>
  <licenses>
    <license>
      <name>The MIT License</name>
      <url>https://opensource.org/licenses/MIT</url>
      <distribution>repo</distribution>
      <comments>The most admissive license I know</comments>
    </license>
  </licenses>

  <organization>
    <name>Simuline Organization (l2r)</name>
    <url>http://www.simuline.eu</url>
  </organization>

  <developers>
    <developer>
      <id>ereissner</id>
      <name>Ernst Reissner</name>
      <email>ernst.reissner at simuline dot eu</email>
      <organization>simuline</organization>
      <organizationUrl>https://www.simuline.eu</organizationUrl>
      <timezone>Europe/Berlin</timezone>
      <properties>
        <picUrl>http://www.simuline.eu/Gluck_0001.gif</picUrl>
      </properties>
    </developer>
  </developers>

  <!-- source repositories: at the moment not needed. -->
  <repositories>
    <repository>
      <id>publicRepoAtSimuline</id>
      <url>https://www.simuline.eu/RepositoryMaven</url>
    </repository>
  </repositories>

 <distributionManagement><!-- For authentication see ~/.m2/settings.xml -->
    <site>
      <id>publicSiteAtSimuline</id>
      <url>ftp://www.simuline.eu/public_html/SUtils</url>
    </site>

    <repository>
      <id>publicRepoAtSimuline</id>
      <name>repo at simuline</name>
      <url>ftp://www.simuline.eu/public_html/RepositoryMaven</url>
    </repository>
  </distributionManagement>


  <scm>
    <connection>
      scm:git:https://github.com/Reissner/SUtils.git
    </connection>
    <developerConnection>
      scm:git:https://github.com/Reissner/SUtils.git
    </developerConnection>
    <url>https://github.com/Reissner/SUtils</url>
    <tag>HEAD</tag>
  </scm>

 <mailingLists>
    <!--mailingList>
      <name>maven-latex-plugin Users</name>
      <archive>http://groups.google.com/group/maven-latex-plugin-users</archive>
      <post>maven-latex-plugin-users@googlegroups.com</post>
      <subscribe>maven-latex-plugin-users+subscribe@googlegroups.com</subscribe>
      <unsubscribe>maven-latex-plugin-users+unsubscribe@googlegroups.com</unsubscribe>
    </mailingList-->
  </mailingLists>

  <!--issueManagement>
    <system>Github Issues</system>
    <url>https://github.com/akquinet/maven-latex-plugin/issues</url>
  </issueManagement-->

  <properties>
    <!-- checked during validation -->
    <versionMvn>3.6.3</versionMvn>
    <!-- Using platform encoding to copy filtered resources; 
    without project.build.sourceEncoding the build is platform dependent! -->
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <versionPmd>6.50.0</versionPmd>
    <versionPmdMvnPlugin>3.19.0</versionPmdMvnPlugin>
  </properties>

  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.12</version>
      <scope>test</scope>
    </dependency>

     <!-- with this scope use goal test-javadoc instead of javadoc -->
     <dependency>
      <groupId>eu.simuline</groupId>
      <artifactId>TestHelpers</artifactId>
      <version>1.2-SNAPSHOT</version><!-- TBD: update -->
      <scope>test</scope>
    </dependency>

     <dependency>
      <groupId>net.sourceforge.findbugs</groupId>
      <artifactId>annotations</artifactId>
      <version>1.3.2</version>
      <!--scope>provided</scope-->
    </dependency>

  </dependencies>


  <build>

    <extensions>
      <extension>
        <groupId>org.apache.maven.wagon</groupId>
        <artifactId>wagon-ftp</artifactId>
        <version>3.3.2</version>
      </extension>
      <extension>
        <groupId>org.apache.maven.wagon</groupId>
        <artifactId>wagon-file</artifactId>
        <version>3.3.2</version>
      </extension>
      <extension>
        <groupId>org.apache.maven.wagon</groupId>
        <artifactId>wagon-http</artifactId>
        <version>3.3.2</version>
      </extension>
    </extensions>

    <pluginManagement>
      <plugins>
               <!-- pmd plugin -->
               <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-pmd-plugin</artifactId>
                <version>${versionPmdMvnPlugin}</version>
                <!-- if update then also config/myruleset.xml as described there -->
                <!--executions>
              <execution>
              <goals>
              <goal>check</goal>
              </goals>
              </execution>
              </executions-->

                <dependencies>
                  <dependency>
                    <groupId>net.sourceforge.pmd</groupId>
                    <artifactId>pmd-core</artifactId>
                    <version>${versionPmd}</version>
                  </dependency>
                  <dependency>
                    <groupId>net.sourceforge.pmd</groupId>
                    <artifactId>pmd-java</artifactId>
                    <version>${versionPmd}</version>
                  </dependency>
                  <dependency>
                    <groupId>eu.simuline</groupId>
                    <artifactId>qMngmnt</artifactId>
                    <version>0.0.4</version>
                  </dependency>
                </dependencies>

                <configuration>
                  <sourceEncoding>${project.build.sourceEncoding}</sourceEncoding>
                  <format>html</format>
                  <!--  in addition to "none", "csv", "xml", "txt"
           or the full class name of the PMD renderer to use. -->
                  <skip>false</skip>
                  <skipEmptyReport>false</skipEmptyReport>
                  <!--suppressMarker>NOPMD</suppressMarker-->
                  <includeTests>false</includeTests>
                  <minimumTokens>100</minimumTokens>            <!-- for cpd -->
                  <rulesets>
                    <!-- refers to the dependency qMngmnt -->
                    <ruleset>eu/simuline/qMngmnt/pmd/myPmdRuleset.xml</ruleset>
                  </rulesets>
                </configuration>
              </plugin>
      </plugins>
    </pluginManagement>

    <plugins>

      <!-- selects the correct java version. 
       In contrst, enforcer checks the correct version. -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-toolchains-plugin</artifactId>
        <version>3.2.0</version>
        <executions>
          <execution>
            <?m2e execute onConfiguration,onIncremental?>
            <goals>
              <goal>select-jdk-toolchain</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <toolchains>
            <jdk>
              <version>${versionJava}"</version>
            </jdk>
          </toolchains>
        </configuration>
      </plugin>

      <!-- at the moment just to enforce maven version
          use as mvn validate not as mvn enforcer:enforce
          TBD: add a lot of tests -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-enforcer-plugin</artifactId>
        <version>3.0.0-M3</version>
        <executions>
          <execution>
            <id>enforce-maven</id>
            <phase>validate</phase>
            <goals>
              <goal>enforce</goal>
            </goals>
            <configuration>
              <rules>
                <requireMavenVersion>
                  <version>${versionMvn}</version>
                  <message>
              Invalid Maven version. It should, at least, be ${versionMvn}
                  </message>
                </requireMavenVersion>
                <requireJavaVersion>
                  <version>11</version>
                </requireJavaVersion>
                <!--dependencyConvergence/-->          <!-- this fails because of plugin-api -->
              </rules>
            </configuration>
          </execution>
        </executions>
      </plugin>

			<!-- information about a project or the system -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-help-plugin</artifactId>
				<version>3.2.0</version>
			</plugin>

      <plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-resources-plugin</artifactId>
				<version>3.2.0</version>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-release-plugin</artifactId>
        <version>3.0.0-M5</version>
      </plugin>
      
      <!-- configuration for clean plugin -->
      <plugin>
        <artifactId>maven-clean-plugin</artifactId>
        <version>3.1.0</version>
      </plugin>

      <!-- This plugin will set properties values 
        using dependency information -->
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-dependency-plugin</artifactId>
          <version>3.1.2</version>
          <executions>
            <execution>
              <?m2e execute onConfiguration,onIncremental?>
              <id>props</id>
              <goals>
                <goal>properties</goal>
              </goals>
            </execution>
            <execution>
              <?m2e execute onConfiguration,onIncremental?>
              <goals>
                <!--goal>list</goal-->          <!-- TBD: clarify what is needed -->
                <goal>build-classpath</goal>
              </goals>
              <configuration>          <!-- TBD: maybe move to execution list, build-classpath -->
                <outputFile>${project.build.directory}/classpath.txt</outputFile>
              </configuration>
            </execution>
          </executions>
        </plugin>

     <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
	<version>3.8.1</version>
	<configuration>
 	  <compilerArgs>
	    <arg>-g</arg>
  	    <arg>-Xlint:unchecked</arg>
	  </compilerArgs>
          <source>15</source>
          <target>15</target>
        </configuration>
      </plugin>

      <plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jar-plugin</artifactId>
				<version>3.2.0</version>
        <configuration>
          <archive>
            <manifest>
              <addDefaultImplementationEntries/>
            </manifest>
          </archive>
        </configuration>
      </plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-install-plugin</artifactId>
				<version>3.0.0-M1</version>
			</plugin>


			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-deploy-plugin</artifactId>
				<version>3.0.0-M2</version>
			</plugin>


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



            <!-- javadoc plugin -->
      <plugin>
	<groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>3.2.0</version>
        <configuration>
	  <breakiterator>true</breakiterator>
	  <show>private</show>
	  <source>1.8</source>
	</configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>3.0.0</version>
        <configuration>
          <trimStackTrace>false</trimStackTrace>
          <systemPropertyVariables>
            <!--testResourcesDir>${project.testResources}</testResourcesDir-->
            <testResourcesDir>src/test/resources/</testResourcesDir>
            <buildDirectory>${project.build.directory}</buildDirectory>
          </systemPropertyVariables>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-site-plugin</artifactId>
        <version>3.9.1</version>
        <configuration>
          <locales>en</locales>
        </configuration>
      </plugin>

   </plugins>
    </build>



  <reporting>
    <plugins>
      <plugin>
	<groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-project-info-reports-plugin</artifactId>
        <version>3.2.2</version>
        <configuration>
          <dependencyLocationsEnabled>false</dependencyLocationsEnabled>
        </configuration>
      </plugin>


    

  <!-- offers also command line analysis:
      mvn versions:display-plugin-updates
      mvn versions:display-dependency-updates
      mvn versions:display-property-updates
      -->
  <plugin>
    <groupId>org.codehaus.mojo</groupId>
    <artifactId>versions-maven-plugin</artifactId>
    <!-- TBD: uniform version -->
    <version>2.9.0</version>
    <reportSets>
      <reportSet>
        <reports>
          <report>dependency-updates-report</report>
          <report>plugin-updates-report</report>
          <report>property-updates-report</report>
        </reports>
      </reportSet>
    </reportSets>
  </plugin>


    <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-report-plugin</artifactId>
        <version>3.0.0</version>
        <reportSets />
      </plugin>
      <!--plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>cobertura-maven-plugin</artifactId>
          <version>2.7</version>
          </plugin-->

      <!-- changes plugin: src/changes/changes.xml -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-changes-plugin</artifactId>
        <version>2.12.1</version>
        <reportSets>
          <reportSet>
            <reports>
              <report>changes-report</report>
            </reports>
          </reportSet>
        </reportSets>
       </plugin>


      
    </plugins>
  </reporting>

</project>
