<?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"
>
   <modelVersion>4.0.0</modelVersion>
   <groupId>org.javastro</groupId>
   <artifactId>javastro-mavenbase</artifactId>
   <version>0.6.4</version>
   <packaging>pom</packaging>
   <name>mavenbase</name>
   <description>Base POM for a collection of JVM based astronomical software</description>
   <url>https://javastro.github.io</url>
   <inceptionYear>2010</inceptionYear>
   <properties>
   <!-- these have to be repeated from the bom unfortunately - perhaps resolve in bom -->
      <hibernate.version>6.2.7.Final</hibernate.version>
      <eclipselink.version>2.7.7</eclipselink.version>
      <jackson.version>2.15.1</jackson.version>
      <jaxb-ri.version>4.0.2</jaxb-ri.version>
      <jaxb-api.version>4.0.0</jaxb-api.version>
      
   </properties>
   <dependencyManagement>
     <dependencies>
         <dependency>
            <groupId>org.javastro</groupId>
            <artifactId>bom</artifactId>
            <version>0.6.4</version>
            <type>pom</type>
            <scope>import</scope>
         </dependency>
      </dependencies>
   </dependencyManagement>
   <licenses>
      <license>
         <url>https://www.gnu.org/licenses/agpl-3.0.html</url>
         <name>AGPL-3.0</name>
      </license>
   </licenses>
   <organization>
      <name>JBCA, University of Manchester</name>
      <url>http://www.jb.man.ac.uk/</url>
   </organization>
   <scm>
      <url>https://github.com/Javastro/${project.name}</url>
      <connection>scm:git:git://github.com/Javastro/${project.name}.git</connection>
      <developerConnection>scm:git:git@github.com:Javastro/${project.name}.git</developerConnection>
   </scm>
   <issueManagement>
      <url>https://github.com/Javastro/${project.name}/issues</url>
   </issueManagement>
   
   <developers>
      <developer>
         <id>pahjbo</id>
         <name>Paul Harrison</name>
         <email>paul.harrison@manchester.ac.uk</email>
         <organization>Manchester University, JBCA</organization>
         <organizationUrl>http://www.jb.man.ac.uk/</organizationUrl>
         <roles>
            <role>Developer</role>
            <role>Admin</role>
         </roles>
      </developer>
   </developers>
   <build>
      <pluginManagement>
         <plugins>
            <plugin>
               <groupId>org.apache.maven.plugins</groupId>
               <artifactId>maven-compiler-plugin</artifactId>
               <version>3.11.0</version>
            </plugin>
            <plugin>
               <groupId>org.apache.maven.plugins</groupId>
               <artifactId>maven-jar-plugin</artifactId>
               <version>3.3.0</version>
            </plugin>
            <plugin>
               <groupId>org.apache.maven.plugins</groupId>
               <artifactId>maven-clean-plugin</artifactId>
               <version>3.2.0</version>
            </plugin>
            <plugin>
               <groupId>org.apache.maven.plugins</groupId>
               <artifactId>maven-source-plugin</artifactId>
               <version>3.3.0</version>
            </plugin>
            <plugin>
               <groupId>org.apache.maven.plugins</groupId>
               <artifactId>maven-deploy-plugin</artifactId>
               <version>3.1.1</version>
            </plugin>
            <plugin>
               <groupId>org.apache.maven.plugins</groupId>
               <artifactId>maven-shade-plugin</artifactId>
               <version>3.4.1</version>
               <configuration>
                  <createDependencyReducedPom>false</createDependencyReducedPom>
               </configuration>
            </plugin>
            <plugin>
               <groupId>org.apache.maven.plugins</groupId>
               <artifactId>maven-site-plugin</artifactId>
               <version>3.9.1</version>
            </plugin>
            <plugin>
               <groupId>org.apache.maven.plugins</groupId>
               <artifactId>maven-dependency-plugin</artifactId>
               <version>3.6.0</version>
            </plugin>
            <plugin>
               <groupId>org.jvnet.jaxb</groupId>
               <artifactId>jaxb-maven-plugin</artifactId>
               <version>4.0.3</version>
               <configuration>
                  <plugins>
                      <plugin> <!-- basics plugin -->
                        <groupId>org.jvnet.jaxb</groupId>
                        <artifactId>jaxb-plugins</artifactId>
                        <version>4.0.3</version>
                     </plugin>
<!--                     <plugin>
                        <groupId>org.jvnet.jaxb2_commons</groupId>
                        <artifactId>jaxb2-fluent-api</artifactId>
                        <version>3.0</version>
                     </plugin>
                      --> 
                   
                     <plugin>
                        <groupId>com.github.jaxb-xew-plugin</groupId>
                        <artifactId>jaxb-xew-plugin</artifactId>
                        <version>1.11</version>
                     </plugin>
<!-- use below for visitor instead                  <plugin>
                        <groupId>com.massfords</groupId>
                        <artifactId>jaxb-visitor</artifactId>
                        <version>2.7</version>
                     </plugin>-->    
                     <plugin>
                            <groupId>net.codesup.util</groupId>
                            <artifactId>jaxb2-rich-contract-plugin</artifactId>
                            <version>2.1.0</version>
                     </plugin>
                     
<!-- this would need work before being useful
                     <plugin>
                        <groupId>net.sourceforge.jpaxjc</groupId>
                        <artifactId>jpa-xjc-plugin</artifactId>
                        <version>1.0.2</version>
                     </plugin>
-->
<!-- https://github.com/dschulten/jaxb2-tolerant-reader-plugin might also be useful -->
                  </plugins>
               </configuration>
            </plugin>
            <plugin>
               <groupId>org.apache.maven.plugins</groupId>
               <artifactId>maven-resources-plugin</artifactId>
               <version>3.3.1</version>
            </plugin>
            <plugin>
               <groupId>org.apache.maven.plugins</groupId>
               <artifactId>maven-surefire-plugin</artifactId>
               <version>3.1.0</version>
            </plugin>
            <plugin>
               <groupId>org.apache.maven.plugins</groupId>
               <artifactId>maven-assembly-plugin</artifactId>
               <version>3.6.0</version>
            </plugin>
            <plugin>
               <groupId>org.apache.maven.plugins</groupId>
               <artifactId>maven-surefire-report-plugin</artifactId>
               <version>3.1.0</version>
            </plugin>
            <plugin>
               <groupId>org.apache.maven.plugins</groupId>
               <artifactId>maven-jxr-plugin</artifactId>
               <version>2.5</version>
            </plugin>
            <plugin>
             <groupId> org.codehaus.mojo</groupId>
             <artifactId>taglist-maven-plugin</artifactId>
             <version>2.4</version>
            </plugin>
 
            <plugin>
               <groupId>org.apache.maven.plugins</groupId>
               <artifactId>maven-javadoc-plugin</artifactId>
               <version>3.3.0</version>
 <!--  not distributed?            <dependencies>
                  <dependency>
                     <groupId>com.yworks.umldoclet</groupId>
                     <artifactId>ydoc</artifactId>
                     <version>3.0</version>
                     <scope>compile</scope>
                  </dependency>
               </dependencies> -->
            </plugin>
            <plugin>
               <groupId>org.jacoco</groupId>
               <artifactId>jacoco-maven-plugin</artifactId>
               <version>0.6.3.201306030806</version>
            </plugin>
            <plugin>
               <groupId>org.apache.maven.plugins</groupId>
               <artifactId>maven-project-info-reports-plugin</artifactId>
               <version>2.9</version>
            </plugin>
            <plugin>
               <groupId>org.codehaus.mojo</groupId>
               <artifactId>cobertura-maven-plugin</artifactId>
               <version>2.7</version>
            </plugin>
            <plugin>
               <groupId>org.apache.maven.wagon</groupId>
               <artifactId>wagon-ssh-external</artifactId>
               <version>2.8</version>
            </plugin>
            <plugin>
               <groupId>net.alchim31.maven</groupId>
               <artifactId>scala-maven-plugin</artifactId>
               <version>3.4.2</version>
            </plugin>
            
         </plugins>
      </pluginManagement>
      <plugins>
         
      
         <plugin>
            <artifactId>maven-site-plugin</artifactId>
            <configuration>
            </configuration>
         </plugin>
         <plugin>
            <artifactId>maven-compiler-plugin</artifactId>
            <configuration>
               <showDeprecation>true</showDeprecation>
               <release>11</release>
               <verbose>false</verbose>
            </configuration>
         </plugin>
         <plugin>
            <artifactId>maven-surefire-plugin</artifactId>
            <configuration>
               <argLine>-ea -noverify</argLine> <!-- the noverify is a hack to get rid of java.lang.VerifyError: Expecting 
                  a stackmap frame at branch target errors - possibly introduced by the cobertura -->
               <testFailureIgnore>false</testFailureIgnore>
               <includes>
                  <include>**/*Test.java</include>
               </includes>
            </configuration>
         </plugin>
         <plugin>
            <!-- make sure that the source jar is created - late in build 
               at verify.. -->
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <executions>
               <execution>
                  <id>attach-sources</id>
                  <phase>verify</phase>
                  <goals>
                     <goal>jar-no-fork</goal>
                  </goals>
               </execution>
            </executions>
         </plugin>
 <!--dont do by default        <plugin>
            <groupId>net.alchim31.maven</groupId>
            <artifactId>scala-maven-plugin</artifactId>
            <executions>
               <execution>
                  <id>scala-compile-first</id>
                  <phase>process-resources</phase>
                  <goals>
                     <goal>add-source</goal>
                     <goal>compile</goal>
                  </goals>
               </execution>
               <execution>
                  <id>scala-test-compile</id>
                  <phase>process-test-resources</phase>
                  <goals>
                     <goal>testCompile</goal>
                  </goals>
               </execution>
            </executions>
            <configuration>
              <scalaVersion>2.12.6</scalaVersion>
            </configuration>
         </plugin>
          --> 
      </plugins>
      <extensions>
         <!-- Enabling the use of external ssh for deployment - alternative 
            is to put jars in $MAVEN_HOME/lib/ext -->
         <extension>
            <groupId>org.apache.maven.wagon</groupId>
            <artifactId>wagon-ssh-external</artifactId>
            <version>2.4</version>
         </extension>
      </extensions>
   </build>
   
   <dependencies>
      <dependency>
         <groupId>org.slf4j</groupId>
         <artifactId>slf4j-api</artifactId>
      </dependency>
      <dependency>
         <groupId>ch.qos.logback</groupId>
         <artifactId>logback-classic</artifactId>
         <scope>test</scope>
      </dependency>
      <dependency>
          <groupId>org.junit.vintage</groupId>
          <artifactId>junit-vintage-engine</artifactId>
          <scope>test</scope>
      </dependency>
       <dependency>
          <groupId>org.junit.jupiter</groupId>
          <artifactId>junit-jupiter</artifactId>
          <scope>test</scope>
       </dependency>
   </dependencies>
   <reporting>
      <plugins>
         <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-project-info-reports-plugin</artifactId>
            <reportSets>
               <reportSet>
                  <reports>
                     <report>index</report>
                     <report>issue-tracking</report>
                     <report>scm</report>
                     <report>dependencies</report>
                     <report>project-team</report>
                     <!-- <report>mailing-list</report> <report>cim</report> -->
                     <report>license</report>
                     <report>summary</report>
                  </reports>
               </reportSet>
            </reportSets>
         </plugin>
         <plugin>
            <artifactId>maven-surefire-report-plugin</artifactId>
            <configuration>
               <testFailureIgnore>false</testFailureIgnore>
            </configuration>
         </plugin>
         <plugin>
            <artifactId>maven-javadoc-plugin</artifactId>
            <configuration>
               <additionalparam>-Xdoclint:none</additionalparam><!-- Javadoc 
                  8 became much more strict by default - switch this off -->
            </configuration>
         </plugin>
         <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-jxr-plugin</artifactId>
            <configuration>
               <linkJavadoc>true</linkJavadoc>
            </configuration>
            <reportSets>
               <reportSet>
                  <reports>
                     <report>jxr</report>
                     <report>test-jxr</report>
                  </reports>
               </reportSet>
            </reportSets>
         </plugin>
         <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>taglist-maven-plugin</artifactId>
            <configuration>
               <tags>
                  <tag>FIXME</tag>
                  <tag>TODO</tag>
                  <tag>@todo</tag>
                  <tag>IMPL</tag>
                  <tag>@deprecated</tag>
               </tags>
            </configuration>
         </plugin>
         <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>cobertura-maven-plugin</artifactId>
            <version>2.5.1</version>
         </plugin>
      </plugins>
   </reporting>
   <distributionManagement>
      <snapshotRepository>
         <id>ossrh</id>
         <url>https://oss.sonatype.org/content/repositories/snapshots</url>
      </snapshotRepository>
   </distributionManagement>
      <profiles>
      <profile>
         <id>release</id>
         <build>
            <plugins>
               <plugin>
                  <groupId>org.apache.maven.plugins</groupId>
                  <artifactId>maven-javadoc-plugin</artifactId>
                  <executions>
                     <execution>
                        <id>attach-javadocs</id>
                        <goals>
                           <goal>jar</goal>
                        </goals>
                        <configuration>
                           <additionalparam>-Xdoclint:none</additionalparam>
                           <failOnError>false</failOnError>
                           <!-- 
                              Javadoc 8 became much more strict by default - switch this off -->
                        </configuration>
                     </execution>
                  </executions>
               </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>deploy</phase>
                        <goals>
                           <goal>sign</goal>
                        </goals>
                     </execution>
                  </executions>
               </plugin>
               <plugin>
                  <groupId>org.apache.maven.plugins</groupId>
                  <artifactId>maven-source-plugin</artifactId>
                  <executions>
                     <execution>
                        <phase>verify</phase>
                        <id>attach-sources</id>
                        <goals>
                           <goal>jar-no-fork</goal>
                        </goals>
                     </execution>
                  </executions>
               </plugin>
               <plugin>
                  <groupId>org.sonatype.plugins</groupId>
                  <artifactId>nexus-staging-maven-plugin</artifactId>
                  <version>1.7.0</version>
                  <extensions>true</extensions>
                  <configuration>
                     <serverId>ossrh</serverId>
                     <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                     <autoReleaseAfterClose>false</autoReleaseAfterClose>
                  </configuration>
               </plugin>
<!-- not yet
               <plugin>
                  <groupId>com.github.github</groupId>
                  <artifactId>site-maven-plugin</artifactId>
                  <version>0.12</version>
                  <configuration>
                     <message>Building site for ${project.version}</message>
                  </configuration>
                  <executions>
                     <execution>
                        <goals>
                           <goal>site</goal>
                        </goals>
                        <phase>site-deploy</phase>
                        <configuration>
                           <merge>true</merge>
                        </configuration>
                     </execution>
                  </executions>
               </plugin>
 -->
            </plugins>
         </build>
      </profile>
   </profiles>
   
</project>