<?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>TestHelpers</artifactId>
  <version>1.2-SNAPSHOT</version>
  <packaging>jar</packaging>

  <!-- information for generating a site -->
  <name>TestHelpers</name>
  <description>
    A collection of elementary classes which proved useful 
    for tests of software made at simuline (www.simuline.eu). 

    In fact, the functionality is quite inhomogeneous 
    all in one package eu.simuline.testhelpers. 
    As a documentation we refer the reader to the api-docs. 
  </description>


  <url>http://www.simuline.eu/TestHelpers/</url><!-- same as site-deploy -->
  <inceptionYear>2012</inceptionYear>
  <licenses>
    <license>
      <name>The Apache Software License, Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
      <distribution>repo</distribution>
      <comments>A business-friendly OSS license</comments>
    </license>
  </licenses>

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

  <developers>
    <developer>
      <id>ER</id>
      <name>Ernst Reissner</name>
      <email>Ernst.Reissner at simuline dot eu</email>
      <organization>simuline</organization>
      <timezone>Europe/Berlin</timezone>
      <properties>
        <picUrl>http://www.simuline.eu/Gluck_0001.gif</picUrl>
      </properties>
    </developer>
  </developers>
  <!-- mailingLists></mailingLists-->


  <!-- source repositories. -->
  <repositories>
    <!-- TBD: source repositories: at the moment not needed. -->
    <!--repository>
      <id>privateRepositoryAtLocal</id>
      <url>file:///home/ernst/Artifacts/RepositoryPrivate/maven2/</url>
    </repository-->
   <repository>
      <id>publicRepoAtSimuline</id>
      <name>repo at simuline</name>
      <url>https://www.simuline.eu/RepositoryMaven</url>
    </repository>
  </repositories>

  <scm>
    <connection>
      scm:git:https://github.com/Reissner/TestHelpers.git
    </connection>
    <developerConnection>
      scm:git:https://github.com/Reissner/TestHelpers.git
    </developerConnection> <!-- the default -->
    <url>https://github.com/Reissner/TestHelpers</url><!-- publicly browseable -->
    <tag>HEAD</tag>
  </scm>


  <!-- target repository. This will change. 
  In the long run it shall be something in maven central -->
  <distributionManagement>
    <site>
      <id>publicSiteAtSimuline</id>
      <name>TestHelpers site at simuline</name>
      <url>ftp://www.simuline.eu/public_html/TestHelpers</url>
    </site>

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


  <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>
    <!-- to keep dependencies up to date: 
	 mvn versions:display-plugin-updates
	 mvn versions:display-dependency-updates -->
    <versionMvn>3.6.3</versionMvn>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

    <versionPmd>6.49.0</versionPmd>
    <versionPmdMvnPlugin>3.19.0</versionPmdMvnPlugin>
    <versionCheckstyle>10.1</versionCheckstyle>

    <versionJUnit>4.13.1</versionJUnit>
    <!--versionHamcrestCore>1.3</versionHamcrestCore-->

    <versionQmngMnt>0.0.4</versionQmngMnt>

  </properties>



  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>${versionJUnit}</version>
      <!--scope>test</scope--> 
      <!-- remove to make javadoc run import org.junit -->
    </dependency>


    <dependency>
      <groupId>eu.simuline</groupId>
      <artifactId>icons</artifactId>
      <version>0.3</version>
    </dependency>


    <dependency>
      <groupId>eu.simuline</groupId>
      <artifactId>SUtils</artifactId>
      <version>1.1</version>
    </dependency>


    <!--dependency>
      <groupId>net.sourceforge.cobertura</groupId>
      <artifactId>cobertura</artifactId>
      <version>2.1.1</version>
      <scope>test</scope>
    </dependency-->

    <!-- this one is outdated and replaced by 
	 com.google.code.findbugs/annotations 
	 which cannot be downloaded although in repo. -->
    <dependency>
      <groupId>net.sourceforge.findbugs</groupId>
      <artifactId>annotations</artifactId>
      <version>1.3.2</version>
      <!--scope>provided</scope-->
    </dependency>
  </dependencies>

  <!-- Build Settings -->
  <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>
     <!-- Deploy via git -->
      <!--extension>
        <groupId>org.jvnet.wagon-git</groupId>
        <artifactId>wagon-git</artifactId>
        <version>1.9</version>
      </extension-->
    </extensions>

    <pluginManagement>
      <plugins>
	<!-- all plugins used for build and for reporting -->
	<!-- checkstyle plugin-->
	<plugin>
	  <groupId>org.apache.maven.plugins</groupId>
	  <artifactId>maven-checkstyle-plugin</artifactId>
	  <version>3.1.2</version>

	  <dependencies>

	    <dependency>
	      <groupId>com.puppycrawl.tools</groupId>
	      <artifactId>checkstyle</artifactId>
	      <version>${versionCheckstyle}</version>
	    </dependency>
            <dependency>
	      <groupId>eu.simuline</groupId>
	      <artifactId>qMngmnt</artifactId>
	      <version>${versionQmngMnt}</version>
            </dependency>
	    
	  </dependencies>

	  <configuration>
	    <headerLocation>
	      <!-- (Default: LICENSE.txt)
	      User property: checkstyle.header.file
	      Specifies the location of the License file 
	      (a.k.a. the header file) that can be used by Checkstyle 
	      to verify that source code has the correct license header. -->
	    </headerLocation>
 	    <violationIgnore>
	      <!-- User property: checkstyle.violation.ignore
		   Violations to ignore. 
		   This is a comma-separated list, 
		   each value being either a rule name, 
		   a rule category or a java package name of rule class. -->
	    </violationIgnore>
	    <configLocation>
	      <!-- refers to the dependency qMngmnt -->
	      eu/simuline/qMngmnt/checkstyle/myChkStyleRuleset.xml
	      <!-- eu/simuline/qMngmnt/checkstyle/google_checks.xml -->
	      <!-- eu/simuline/qMngmnt/checkstyle/sun_checks.xml -->
	    </configLocation>
	    <encoding>UTF-8</encoding>
	  </configuration>
	</plugin>


	<!-- findbugs plugin TBD: replace -->
	<!--plugin>
	  <groupId>org.codehaus.mojo</groupId>
	  <artifactId>findbugs-maven-plugin</artifactId>
	  <version>3.0.5</version>
	  <configuration>
	    <xmlOutput>true</xmlOutput>
	  </configuration>
	</plugin-->

      <!-- pmd plugin **** reporting or build? -->
      <plugin>
	<groupId>org.apache.maven.plugins</groupId>
	<artifactId>maven-pmd-plugin</artifactId>
	<version>${versionPmdMvnPlugin}</version>

        <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>${versionQmngMnt}</version>
          </dependency>
        </dependencies>

        <configuration>
          <sourceEncoding>${project.build.sourceEncoding}</sourceEncoding>
          <format>html</format>
          <skip>false</skip>
          <skipEmptyReport>false</skipEmptyReport>
          <includeTests>false</includeTests>
          <!--linkXref>true</linkXref--><!-- default -->
          <minimumTokens>100</minimumTokens><!-- for cpd -->
          <rulesets>
	    <!-- refers to the dependency qMngmnt -->
	    <ruleset>eu/simuline/qMngmnt/pmd/myPmdRuleset.xml</ruleset>
 	    <!--ruleset>${maven.pmd.rulesetfiles}</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 
          **** seems to be buggy and to make also update of plugins unsafe -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-enforcer-plugin</artifactId>
        <version>3.0.0-M3</version>
        <executions>
          <execution>
            <id>enforce-maven</id>
            <goals>
              <goal>enforce</goal>
            </goals>
            <configuration>
              <rules>
                <!--version>${versionMvn}</version-->
                <requireMavenVersion>
                  <version>${versionMvn}</version>
                </requireMavenVersion>
                  <!--requireJavaVersion>
                    <version>11</version>
                  </requireJavaVersion-->
              </rules>
              <!--alwaysFail>true</alwaysFail-->
              <!--fail>true</fail-->
              <!--ignoreCache>true</ignoreCache-->
            </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>

      <!-- Configure tag name for mvn release:prepare -->
      <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>
        <configuration>
          <verbose>true</verbose>
        </configuration>
      </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>


      <!-- compiler plugin: Use Java 6 -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.8.1</version>
        <configuration>
          <source>15</source>
          <target>15</target>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <version>3.2.2</version>
        <configuration>
          <archive>
            <manifest>
              <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
              <!--addDefaultSpecificationEntries>true</addDefaultSpecificationEntries-->
            </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-M1</version>
      </plugin>

 
            <!-- javadoc plugin -->
      <!-- synchronize with reporting -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>3.3.1</version>
        <!--executions>
          <execution>
            <id>attach-javadocs</id>
            <goals>
              <goal>jar</goal>
            </goals-->
        <configuration>
          <!--sourcepath>
            ${project.basedir}/src/main/java:${project.basedir}/src/test/java
          </sourcepath-->
          <tags>
            <tag>
              <name>To.Do</name>
              <placement>a</placement>
              <head>what is to be done in the present code fragment. </head>
            </tag>
          </tags>
          <breakiterator>true</breakiterator>
      
          <!-- TBD: link shall be generic -->
          <!--links>
            <link>http://junit.sourceforge.net/javadoc</link>
          </links-->
          <show>private</show>
          <additionalOptions>
            <additionalOption>-Xdoclint:all -Xdoclint:-missing</additionalOption>
            <additionalOption>--allow-script-in-comments</additionalOption>
          </additionalOptions>
          <header>
            <![CDATA[
            <script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML,https://www.simuline.eu/MathJax/config/myDefault.js"> </script>
            ]]>
          </header>
            </configuration>
          <!--/execution>
        </executions-->
            </plugin>

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

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

      <!-- Deploy sources.jar files -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <version>3.2.1</version>
        <executions>
          <execution>
            <id>attach-sources</id>
            <phase>verify</phase>
            <goals>
              <goal>jar-no-fork</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

 

     </plugins>

  </build>


  <reporting>
    <plugins>

      <!-- creates a representation of the source code 
	   with line numbers and cross references. 
	   Forms the base for pmd, findbgs and checkstyle 
	   e.g. providing line numbers -->
      <plugin>
	<groupId>org.apache.maven.plugins</groupId>
	<artifactId>maven-jxr-plugin</artifactId>
	<version>3.1.1</version>
      </plugin>


      <!-- configures the aspects of the reporting, 
	   i.e. the kinds of reports generated. -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-project-info-reports-plugin</artifactId>
        <version>3.2.2</version>
        <configuration>
          <dependencyLocationsEnabled>false</dependencyLocationsEnabled>
        </configuration>
	<reportSets>
	  <reportSet>
	    <id>gen-report</id>
	    <reports>
	      <report>index</report>
	      <report>summary</report>
	      <report>licenses</report>
	      <report>team</report>

	      <report>ci-management</report>
	      <!--report>dependencies</report-->
	      <report>dependency-convergence</report>
	      <report>dependency-info</report>
	      <report>dependency-management</report>
	      <report>distribution-management</report>
	      <!--report>help</report-->
	      <report>issue-management</report>
	      <report>mailing-lists</report>
	      <report>modules</report>
	      <report>plugin-management</report>
	      <report>plugins</report>
	      <!--report>scm</report-->
	    </reports>
	  </reportSet>
	</reportSets>
      </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>


      <!-- Creates surefire test reports -->
      <plugin>
 	<groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-report-plugin</artifactId>
        <version>3.0.0</version>
	<configuration>
	  <!-- to show failed tests only -->
	  <showSuccess>false</showSuccess>
	</configuration>
      </plugin>

       <!-- pmd plugin **** reporting or build? -->
      <!--plugin>
	<groupId>org.apache.maven.plugins</groupId>
	<artifactId>maven-pmd-plugin</artifactId>
	<version>${versionPmdMvnPlugin}</version>
       <configuration>
          <sourceEncoding>${project.build.sourceEncoding}</sourceEncoding>
          <minimumTokens>100</minimumTokens>
	  <format>xml</format>

	  <skip>false</skip>
	  <skipEmptyReport>false</skipEmptyReport>
	  <includeTests>false</includeTests>
          <rulesets>
	    <ruleset>${maven.pmd.rulesetfiles}</ruleset>
          </rulesets>
          <excludes>
            <exclude>eu/simuline/relana/parser/*Lexer.java</exclude>
            <exclude>eu/simuline/relana/parser/SClassParser.java</exclude>
            <exclude>eu/simuline/relana/parser/*Parser.java</exclude>
	    <include>eu/simuline/relana/parser/*Listener.java</include>
	    <include>eu/simuline/relana/parser/*Visitor.java</include>
          </excludes>
	  <outputDirectory>${project.basedir}/target/site/</outputDirectory>
        </configuration>
      </plugin-->

 
      <!-- findbugs -->
      <!--plugin>
 	<groupId>org.codehaus.mojo</groupId>
        <artifactId>findbugs-maven-plugin</artifactId>
	<configuration>
	  <xmlOutput>true</xmlOutput>
	  <onlyAnalyze>
	    eu.simuline.relana.expressions.*, 
	    eu.simuline.relana.model.*, 
	    eu.simuline.relana.sys.*, 
	    eu.simuline.testhelpers.*, 
	    eu.simuline.util.*, 
	  </onlyAnalyze>
        </configuration>
      </plugin-->

      <!-- pmd plugin **** reporting or build? -->
      <!--plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-pmd-plugin</artifactId>
        <version>${versionPmdMvnPlugin}</version>
        

        <configuration>
	  <format>xml</format>
	  <skip>false</skip>
	  <skipEmptyReport>false</skipEmptyReport>
	  <includeTests>false</includeTests>
          <rulesets>
	    <ruleset>${maven.pmd.rulesetfiles}</ruleset>
          </rulesets>
	  <outputDirectory>${project.basedir}/target/site/</outputDirectory>
        </configuration>
      </plugin-->

      <!-- determines code coverage of tests 
	   **** ignores and excludes are .... ignored **** -->
      <!--plugin>
	<groupId>org.codehaus.mojo</groupId>
        <artifactId>cobertura-maven-plugin</artifactId>
        <version>2.7</version>
	<configuration>
          <instrumentation>
            <ignores>
              <ignore>org.*</ignore>
            </ignores>
	    <excludes>
	      <exclude>org/**/*.class</exclude>
	    </excludes>

	  </instrumentation>
	  <quiet>true</quiet>
	  <formats>
	    <format>xml</format>
	    <format>html</format>
	  </formats>
	</configuration>
	</plugin-->

      <plugin>
	<groupId>org.jacoco</groupId>
	<artifactId>jacoco-maven-plugin</artifactId>
	<version>0.8.8</version>
      </plugin>

      <!-- javadoc plugin -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>3.0.0-M1</version>
        <configuration>
	  <!--phase>generate-sources</phase--> <!-- this is the default -->
	  <sourcepath>
	    ${project.basedir}/src/main/java:${project.basedir}/src/test/java
	  </sourcepath>
	  <tags>
	    <tag>
	      <name>To.Do</name>
	      <!-- todo tag for all places -->
	      <placement>a</placement>
	      <head>what is to be done in the present code fragment. </head>
	    </tag>
	  </tags>
	  <excludePackageNames>
	    eu.simuline.junit
	  </excludePackageNames>
	  <breakiterator>true</breakiterator>
	  <!-- does not work with current plugin version: bug already filed 
	  -->
	  <links>
	    <link>http://www.antlr.org/api/JavaTool/</link>
	    <link>http://www.antlr.org/api/Java/</link>
	    <link>http://www.stringtemplate.org/api/</link>
	    <link>https://jna.java.net/javadoc/</link>
	    <link>http://junit.sourceforge.net/javadoc</link>
	  </links>
          <show>private</show>
	  <!-- **** myDefault should be linked to ${basedir}/config/MathJax.. -->
	  <additionalparam>-Xdoclint:html -Xdoclint:reference --allow-script-in-comments</additionalparam>
	  <header>Relana
<!--&lt;script type="text/javascript" \
	  src="file:///${basedir}/jars/MathJax/latest/MathJax.js?config=myDefault"&gt; &lt;/script&gt;-->
	  </header>
	</configuration>
      </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>
