<!-- mvn source:jar javadoc:jar verify gpg:sign install deploy
 -Pdeploy does not work as not a full deploy
-->
<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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>org.darien-project.failure-a</groupId>
  <artifactId>failure-a</artifactId>
  <version>1.0.0</version>
  <name>${project.groupId}:${project.artifactId}</name>
  <description>
    The Darien Project for Java makes handling code failure easy, telling you on which line the failure happene.
    By focussing on the failure path you will build better, working code more quickly.
  </description>
  <url>https://darien-project.readthedocs.io/</url>
  <licenses>
    <license>
	  <name>The Apache License, Version 2.0</name>
	  <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
	</license>
  </licenses>
  <developers>
    <developer>
        <name>JH Evans</name>
        <email>jhuwevans@gmail.com</email>
        <organization>The Darien Project</organization>
        <organizationUrl>https://darien-project.readthedocs.io/</organizationUrl>
    </developer>
  </developers>
  <scm>
      <connection>scm:git:git@github.com:jh-evans/failure-a.git</connection>
      <url>https://github.com/jh-evans/failure-a</url>
  </scm>    
    <distributionManagement>
	    <snapshotRepository>
	        <id>ossrh</id>
	        <url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
	    </snapshotRepository>
	    <repository>
	        <id>ossrh</id>
	        <url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
	    </repository>
	</distributionManagement>
  <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

        <junit.jupiter.version>5.5.2</junit.jupiter.version>
        <junit.platform.version>1.5.2</junit.platform.version>
  </properties>
 <build>
    <plugins>
		<plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <version>3.5.0</version>
     	    <configuration>
	            <failOnError>false</failOnError>
				<executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
            	</executions>
				<additionalJOptions>
					--enable-preview --release 20
				</additionalJOptions>
				<excludePackageNames>org.darien.tools.codegen:org.darien.tools.codegen.tests:org.darien.types.impl.tests:org.darien.types.utils.tests</excludePackageNames>
	    </configuration>
        </plugin>	
	    <plugin>
	      <groupId>org.sonatype.plugins</groupId>
	      <artifactId>nexus-staging-maven-plugin</artifactId>
	      <version>1.6.13</version>
	      <extensions>true</extensions>
	      <configuration>
	        <serverId>ossrh</serverId>
	        <nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
	        <autoReleaseAfterClose>false</autoReleaseAfterClose>
	      </configuration>
	    </plugin>     	    
	    <plugin>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>3.1</version>
            <configuration>
	            <source>20</source>
	            <target>20</target>
	            <compilerArgs>
        			<arg>--enable-preview</arg>
    			</compilerArgs>
             </configuration>
        </plugin>
        <plugin>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.22.2</version>
                <configuration>
                <argLine>
					--enable-preview
				    --add-exports org.junit.platform.commons/org.junit.platform.commons.util=ALL-UNNAMED
				    --add-exports org.junit.platform.commons/org.junit.platform.commons.logging=ALL-UNNAMED
				</argLine>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-failsafe-plugin</artifactId>
                <version>2.22.2</version>    
                <configuration>
                <argLine>--enable-preview</argLine>
                </configuration>
        </plugin>
    </plugins>
</build>

<reporting>
	<plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <version>3.5.0</version>
            <configuration>
	            <failOnError>false</failOnError>
				<executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
            	</executions>
				<additionalJOptions>
					--enable-preview --release 20
				</additionalJOptions>
				<excludePackageNames>org.darien.tools.codegen:org.darien.tools.codegen.tests:org.darien.types.impl.tests:org.darien.types.utils.tests</excludePackageNames>
            </configuration>
        </plugin>
	</plugins>
</reporting>
    <dependencies>
		<dependency>
		    <groupId>org.apache.bcel</groupId>
		    <artifactId>bcel</artifactId>
		    <version>6.7.0</version>
		</dependency>

        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-api</artifactId>
            <version>${junit.jupiter.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-engine</artifactId>
            <version>${junit.jupiter.version}</version>
            <scope>test</scope>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.junit.platform/junit-platform-runner -->
        <dependency>
            <groupId>org.junit.platform</groupId>
            <artifactId>junit-platform-runner</artifactId>
            <version>${junit.platform.version}</version>
            <scope>test</scope>
        </dependency>
        <!-- https://mvnrepository.com/artifact/org.junit.platform/junit-platform-launcher -->
        <dependency>
            <groupId>org.junit.platform</groupId>
            <artifactId>junit-platform-launcher</artifactId>
            <version>${junit.platform.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
		    <groupId>org.apache.commons</groupId>
		    <artifactId>commons-lang3</artifactId>
		    <version>3.0</version>
		</dependency>
		<!-- https://mvnrepository.com/artifact/org.apache.httpcomponents.client5/httpclient5 -->
		<dependency>
		    <groupId>org.apache.httpcomponents.client5</groupId>
		    <artifactId>httpclient5</artifactId>
		    <version>5.2.1</version>
		</dependency><!-- https://mvnrepository.com/artifact/org.slf4j/slf4j-jdk14 -->
		<dependency>
		    <groupId>org.slf4j</groupId>
		    <artifactId>slf4j-jdk14</artifactId>
		    <version>1.7.36</version>
		    <scope>test</scope>
		</dependency>
    </dependencies>
    
    <profiles>
	    <profile>
	        <id>release</id>
	        <activation>
	            <property>
	                <name>performRelease</name>
	                <value>true</value>
	            </property>
	        </activation>
	        <build>
		            <plugins>
	                <plugin>
	                    <groupId>org.apache.maven.plugins</groupId>
	                    <artifactId>maven-gpg-plugin</artifactId>
	                    <version>1.6</version>
	                    <executions>
	                        <execution>
	                            <id>sign-artifacts</id>
	                            <phase>verify</phase>
	                            <goals>
	                                <goal>sign</goal>
	                            </goals>
	                        </execution>
	                    </executions>
	                </plugin>
	                <plugin>
	                    <groupId>org.apache.maven.plugins</groupId>
	                    <artifactId>maven-source-plugin</artifactId>
	                    <version>3.3.0</version>
	                    <executions>
	                        <execution>
	                            <id>attach-sources</id>
	                            <phase>verify</phase>
	                            <goals>
	                                <goal>jar-no-fork</goal>
	                            </goals>
	                        </execution>
	                    </executions>
	                   </plugin>
	            </plugins>
	        </build>
	    </profile>
	</profiles>
    
</project>
