<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/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>
	<groupId>com.github.skjolber</groupId>
	<artifactId>mockito-soap-cxf</artifactId>
	<version>1.2.0</version>
	<name>mockito-soap-cxf</name>
	<description>SOAP web-service mocking utility for CXF</description>
	<url>https://github.com/skjolber/mockito-soap-cxf</url>
	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

		<maven.compiler.source>1.8</maven.compiler.source>
		<maven.compiler.target>1.8</maven.compiler.target>

		<google-truth.version>1.0.1</google-truth.version>
		<junit.version>4.12</junit.version>
		<junit5.version>5.6.0</junit5.version>
		
		<mockito.version>3.1.0</mockito.version>
		<hamcrest.version>2.1</hamcrest.version>
		<commons-io.version>2.6</commons-io.version>

		<cxf.version>3.3.5</cxf.version>
		<spring.version>5.2.3.RELEASE</spring.version>
		<logback.version>1.2.3</logback.version>
		<slf4j.version>1.7.30</slf4j.version>
		
		<!-- plugins -->
		<build-helper-maven-plugin.version>3.0.0</build-helper-maven-plugin.version>
		<jacoco-maven-plugin.version>0.8.5</jacoco-maven-plugin.version>
		<nexus-staging-maven-plugin.version>1.6.8</nexus-staging-maven-plugin.version>
		<maven-surefire-plugin.version>2.22.2</maven-surefire-plugin.version>
		<maven-source-plugin.version>3.2.1</maven-source-plugin.version>
		<maven-javadoc-plugin.version>3.1.1</maven-javadoc-plugin.version>
		<maven-release-plugin.version>2.5.3</maven-release-plugin.version>
		<maven-gpg-plugin.version>1.6</maven-gpg-plugin.version>
		<maven-dependency-plugin.version>2.10</maven-dependency-plugin.version>
		<jacoco-maven-plugin.version>0.8.5</jacoco-maven-plugin.version>
		<maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>
		<maven-shade-plugin.version>3.1.1</maven-shade-plugin.version>
		<jqwik.version>1.2.3</jqwik.version>
		<assertj.version>3.15.0</assertj.version>
		<owasp-dependency-check.version>5.3.0</owasp-dependency-check.version>		
	</properties>

	<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>
		</license>
	</licenses>

	<developers>
		<developer>
			<name>Thomas Skjølberg</name>
			<email>thomas.skjolberg@gmail.com</email>
		</developer>
	</developers>

	<scm>
		<connection>scm:git:git@github.com:skjolber/mockito-soap-cxf.git</connection>
		<developerConnection>scm:git:git@github.com:skjolber/mockito-soap-cxf.git</developerConnection>
		<url>git@github.com:skjolber/mockito-soap-cxf.git</url>
		<tag>mockito-soap-cxf-1.2.0</tag>
	</scm>

	<issueManagement>
		<system>GitHub</system>
		<url>https://github.com/skjolber/mockito-soap-cxf/issues</url>
	</issueManagement>

	<prerequisites>
		<maven>3.6.1</maven>
	</prerequisites>

	<dependencies>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-api</artifactId>
            <version>${junit5.version}</version>
            <scope>compile</scope>
			<optional>true</optional>
        </dependency>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>${junit.version}</version>
			<scope>compile</scope>
			<optional>true</optional>
		</dependency>        
		<dependency>
			<groupId>org.mockito</groupId>
			<artifactId>mockito-core</artifactId>
			<version>${mockito.version}</version>
			<scope>compile</scope>
		</dependency>

		<!-- CXF -->
		<dependency>
			<groupId>org.apache.cxf</groupId>
			<artifactId>cxf-rt-bindings-soap</artifactId>
			<version>${cxf.version}</version>
		</dependency>
		<dependency>
			<groupId>org.apache.cxf</groupId>
			<artifactId>cxf-rt-frontend-jaxws</artifactId>
			<version>${cxf.version}</version>
		</dependency>
		<!-- note: breaks cxf version 2 -->
		<dependency>
			<groupId>org.apache.cxf</groupId>
			<artifactId>cxf-core</artifactId>
			<version>${cxf.version}</version>
		</dependency>
		<dependency>
			<groupId>org.apache.cxf</groupId>
			<artifactId>cxf-rt-transports-http</artifactId>
			<version>${cxf.version}</version>
		</dependency>
		<dependency>
			<groupId>org.apache.cxf</groupId>
			<artifactId>cxf-rt-transports-http-jetty</artifactId>
			<version>${cxf.version}</version>
		</dependency>
		<dependency>
			<groupId>org.apache.cxf</groupId>
			<artifactId>cxf-rt-transports-local</artifactId>
			<version>${cxf.version}</version>
		</dependency>
		<dependency>
			<groupId>org.apache.cxf</groupId>
			<artifactId>cxf-rt-rs-extension-providers</artifactId>
			<version>${cxf.version}</version>
		</dependency>
		<dependency>
			<groupId>org.apache.cxf</groupId>
			<artifactId>cxf-rt-features-logging</artifactId>
			<version>${cxf.version}</version>
			<scope>test</scope>
		</dependency>

		<!-- spring -->
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-context</artifactId>
			<version>${spring.version}</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-core</artifactId>
			<version>${spring.version}</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-beans</artifactId>
			<version>${spring.version}</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-test</artifactId>
			<version>${spring.version}</version>
			<scope>test</scope>
		</dependency>

		<!-- logging -->
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-api</artifactId>
			<version>${slf4j.version}</version>
		</dependency>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>jcl-over-slf4j</artifactId>
			<version>${slf4j.version}</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>ch.qos.logback</groupId>
			<artifactId>logback-classic</artifactId>
			<version>${logback.version}</version>
			<scope>test</scope>
		</dependency>

        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-engine</artifactId>
            <scope>runtime</scope>
            <version>${junit5.version}</version>
        </dependency>
		<dependency>
		    <groupId>org.junit.vintage</groupId>
		    <artifactId>junit-vintage-engine</artifactId>
            <scope>runtime</scope>
            <version>${junit5.version}</version>
		</dependency>

		<!-- other -->
		<dependency>
			<groupId>org.hamcrest</groupId>
			<artifactId>hamcrest-core</artifactId>
			<version>${hamcrest.version}</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>commons-io</groupId>
			<artifactId>commons-io</artifactId>
			<version>${commons-io.version}</version>
		</dependency>
	</dependencies>

	<build>
		<defaultGoal>clean test</defaultGoal>

		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>3.7.0</version>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jar-plugin</artifactId>
				<version>3.1.2</version>
				<configuration>
					<archive>
						<manifestEntries>
						    <Automatic-Module-Name>com.github.skjolber.mockito.soap</Automatic-Module-Name>
						</manifestEntries>
					</archive>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.cxf</groupId>
				<artifactId>cxf-codegen-plugin</artifactId>
				<version>${cxf.version}</version>
				<executions>
					<execution>
						<id>generate-test-sources</id>
						<phase>generate-test-sources</phase>
						<configuration>
							<sourceRoot>${project.build.directory}/generated/cxf</sourceRoot>
							<wsdlOptions>
								<wsdlOption>
									<wsdl>${basedir}/src/test/resources/wsdl/BankCustomerService.wsdl</wsdl>
									<wsdlLocation>classpath:wsdl/BankCustomerService.wsdl</wsdlLocation>
									<bindingFiles>
										<bindingFile>${basedir}/src/test/resources/bindings.xml</bindingFile>
									</bindingFiles>
									<extraargs>
										<extraarg>-exsh</extraarg>
										<extraarg>true</extraarg>
									</extraargs>
								</wsdlOption>
								<wsdlOption>
									<wsdl>${basedir}/src/test/resources/wsdl/ShopCustomerService.wsdl</wsdl>
									<wsdlLocation>classpath:wsdl/ShopCustomerService.wsdl</wsdlLocation>
									<bindingFiles>
										<bindingFile>${basedir}/src/test/resources/bindings.xml</bindingFile>
									</bindingFiles>
									<extraargs>
										<extraarg>-exsh</extraarg>
										<extraarg>true</extraarg>
									</extraargs>
								</wsdlOption>
							</wsdlOptions>
						</configuration>
						<goals>
							<goal>wsdl2java</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>build-helper-maven-plugin</artifactId>
				<version>${build-helper-maven-plugin.version}</version>
				<executions>
					<execution>
						<id>add-test-sources</id>
						<phase>generate-test-sources</phase>
						<goals>
							<goal>add-test-source</goal>
						</goals>
						<configuration>
							<sources>
								<source>${project.build.directory}/generated/cxf</source>
							</sources>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.jacoco</groupId>
				<artifactId>jacoco-maven-plugin</artifactId>
				<version>${jacoco-maven-plugin.version}</version>
				<configuration>
					<excludes>
						<exclude>com/skjolberg/example/spring/soap/v1/*.class</exclude>
					</excludes>
				</configuration>
				<executions>
					<execution>
						<id>default-prepare-agent</id>
						<goals>
							<goal>prepare-agent</goal>
						</goals>
					</execution>
					<execution>
						<id>default-report</id>
						<phase>prepare-package</phase>
						<goals>
							<goal>report</goal>
						</goals>
					</execution>
					<execution>
						<id>default-check</id>
						<goals>
							<goal>check</goal>
						</goals>
						<configuration>
							<rules>
								<rule>
									<element>BUNDLE</element>
									<limits>
										<limit>
											<counter>INSTRUCTION</counter>
											<value>COVEREDRATIO</value>
											<minimum>0.75</minimum>
										</limit>
									</limits>
								</rule>
							</rules>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.sonatype.plugins</groupId>
				<artifactId>nexus-staging-maven-plugin</artifactId>
				<version>${nexus-staging-maven-plugin.version}</version>
				<extensions>true</extensions>
				<executions>
					<execution>
						<id>default-deploy</id>
						<phase>deploy</phase>
						<goals>
							<goal>deploy</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<serverId>ossrh</serverId>
					<nexusUrl>https://oss.sonatype.org/</nexusUrl>
					<autoReleaseAfterClose>false</autoReleaseAfterClose>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-source-plugin</artifactId>
				<version>${maven-source-plugin.version}</version>
				<configuration>
					<excludes>
						<exclude>com/skjolberg/example/**</exclude>
					</excludes>
				</configuration>
				<executions>
					<execution>
						<id>attach-sources</id>
						<goals>
							<goal>jar-no-fork</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
				<version>${maven-javadoc-plugin.version}</version>
				<configuration>
					<excludePackageNames>*example*</excludePackageNames>
				</configuration>
				<executions>
					<execution>
						<id>attach-javadocs</id>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-release-plugin</artifactId>
				<configuration>
					<autoVersionSubmodules>true</autoVersionSubmodules>
					<useReleaseProfile>false</useReleaseProfile>
					<releaseProfiles>release</releaseProfiles>
					<goals>deploy</goals>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.owasp</groupId>
				<artifactId>dependency-check-maven</artifactId>
				<version>${owasp-dependency-check.version}</version>
			</plugin>
		</plugins>
	</build>

	<profiles>
		<profile>
			<!-- mvn -P release release:perform -->
			<id>release</id>
			<properties>
				<!-- this is useful when the desired key is not the default (first)
					 export GPG_KEY_NAME=ABCDEF01
				-->
				<gpg.executable>gpg2</gpg.executable>
				<gpg.keyname>${env.GPG_KEY_NAME}</gpg.keyname>
			</properties>
			<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>
				</plugins>
			</build>
		</profile>
	</profiles>

	<distributionManagement>
		<snapshotRepository>
			<id>ossrh</id>
			<url>https://oss.sonatype.org/content/repositories/snapshots</url>
		</snapshotRepository>
		<repository>
			<id>ossrh</id>
			<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
		</repository>
	</distributionManagement>

</project>
