<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>com.axonivy.ivy.ci</groupId>
	<artifactId>project-build-plugin</artifactId>
	<packaging>maven-plugin</packaging>
	<version>7.0.4</version>

	<name>Axon.ivy Project Build Plugin</name>
	<description>Maven plugin for the automated building of Axon.ivy projects. Referenced from the pom.xml of Axon.ivy projects.</description>
	<url>https://github.com/axonivy/project-build-plugin</url>
	<prerequisites>
		<maven>3.1</maven>
	</prerequisites>
	<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>Axon.ivy Project Build Authors</name>
			<email>support@ivyteam.ch</email>
      <organization>AXON Ivy AG</organization>
			<organizationUrl>https://www.axonivy.com</organizationUrl>
		</developer>
	</developers>
	<scm>
		<connection>scm:git:git@github.com:axonivy/project-build-plugin.git</connection>
		<developerConnection>scm:git:git@github.com:axonivy/project-build-plugin.git</developerConnection>
		<url>git@github.com:axonivy/project-build-plugin.git</url>
		<tag>v7.0.4</tag>
	</scm>

	<organization>
    <name>AXON Ivy AG</name>
		<url>https://developer.axonivy.com</url>
	</organization>

	<properties>
		<java.version>1.8</java.version>
		<maven.version>3.2.3</maven.version>
		<!-- version should match ivy Engine sfl4j version! And version in EngineClassLoaderFactory.SLF4J_VERSION -->
		<slf4j.version>1.7.7</slf4j.version>
		<site.path>snapshot</site.path>
		<other.site.name>Stable</other.site.name>
		<other.site.path>release</other.site.path>
        <autoRelease>true</autoRelease>
	</properties>

	<profiles>
		<profile>
            <id>zugpronexus.snapshots</id>
			<distributionManagement>
				<snapshotRepository>
			      <id>zugpronexus.snapshots</id>
			      <name>Internal Plugin Snapshot Repository</name>
			      <url>http://zugpronexus:8081/nexus/content/repositories/build-plugin-snapshots/</url>
			    </snapshotRepository>
			</distributionManagement>
		</profile>
		<profile>
            <id>sonatype.snapshots</id>
			<distributionManagement>
				<snapshotRepository>
					<id>sonatype.snapshots</id>
					<name>Maven Central Snapshots Repo</name>
					<url>https://oss.sonatype.org/content/repositories/snapshots</url>
				</snapshotRepository>
			</distributionManagement>
		</profile>
	    <profile>
      <id>maven.central.release</id>
          <distributionManagement>
              <repository>
                  <id>sonatype.releases</id>
                  <name>Sonatype Releases Repo</name>
                  <url>https://oss.sonatype.org/content/repositories/releases/</url>
              </repository>
          </distributionManagement>
	        <properties>
	            <site.path>release</site.path>
	            <other.site.name>Snapshot</other.site.name>
				<other.site.path>snapshot</other.site.path>
				<run.public.download.test>true</run.public.download.test>
	        </properties>
	        <build>
	        	<plugins>
	        		<plugin>
			        <groupId>org.apache.maven.plugins</groupId>
			        <artifactId>maven-release-plugin</artifactId>
			        <version>2.5.3</version>
			        <configuration>
						<tagNameFormat>v@{project.version}</tagNameFormat>
						<releaseProfiles>release</releaseProfiles>
						<goals>deploy site-deploy</goals>
			        </configuration>
			      </plugin>
	        	</plugins>
	        </build>
	    </profile>
	</profiles>

	<dependencies>
		<dependency>
			<groupId>org.apache.maven</groupId>
			<artifactId>maven-plugin-api</artifactId>
			<version>${maven.version}</version>
		</dependency>
		<dependency>
			<groupId>org.apache.maven</groupId>
			<artifactId>maven-core</artifactId>
			<version>${maven.version}</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.apache.maven.plugin-tools</groupId>
			<artifactId>maven-plugin-annotations</artifactId>
			<version>3.3</version>
			<scope>provided</scope>
		</dependency>

		<dependency>
			<groupId>org.apache.commons</groupId>
			<artifactId>commons-lang3</artifactId>
			<version>3.3.2</version>
		</dependency>
		<dependency>
			<groupId>commons-io</groupId>
			<artifactId>commons-io</artifactId>
			<version>2.4</version>
		</dependency>
		<dependency>
			<groupId>org.apache.commons</groupId>
			<artifactId>commons-exec</artifactId>
			<version>1.3</version>
		</dependency>
		<dependency>
			<groupId>net.lingala.zip4j</groupId>
			<artifactId>zip4j</artifactId>
			<version>1.2.3</version>
		</dependency>
		<dependency>
            <groupId>org.codehaus.plexus</groupId>
            <artifactId>plexus-archiver</artifactId>
            <version>2.4.4</version>
            <type>jar</type>
        </dependency>

        <!-- Logging environment: Required for engine classLoader (but not for the plugin runtime itself) -->
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-api</artifactId>
			<version>${slf4j.version}</version>
		</dependency>
       <dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>log4j-over-slf4j</artifactId>
			<version>${slf4j.version}</version>
		</dependency>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-simple</artifactId>
			<version>${slf4j.version}</version>
		</dependency>

		<!-- TEST scoped -->
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>4.11</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.assertj</groupId>
			<artifactId>assertj-core</artifactId>
			<version>3.4.1</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.apache.maven.plugin-testing</groupId>
			<artifactId>maven-plugin-testing-harness</artifactId>
			<version>3.2.0</version>
			<scope>test</scope>
		</dependency>
		<dependency>
		    <groupId>org.apache.maven</groupId>
		    <artifactId>maven-compat</artifactId>
		    <version>${maven.version}</version>
		    <scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.jmockit</groupId>
			<artifactId>jmockit</artifactId>
			<version>1.11</version>
			<scope>test</scope>
		</dependency>
		<dependency>
	        <groupId>org.apache.wink</groupId>
	        <artifactId>wink-component-test-support</artifactId>
	        <version>1.3.0</version>
	        <scope>test</scope>
	    </dependency>

	</dependencies>

	<build>
		<plugins>
			<plugin>
	            <artifactId>maven-compiler-plugin</artifactId>
	            <version>2.3.2</version>
	            <configuration>
	                <source>${java.version}</source>
	                <target>${java.version}</target>
	            </configuration>
	        </plugin>
	        <plugin>
				<!-- Makes MOJO declaration trough Annotation possible. -->
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-plugin-plugin</artifactId>
				<version>3.3</version>
				<configuration>
					<!-- see http://jira.codehaus.org/browse/MNG-5346 -->
					<skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
				</configuration>
				<executions>
					<execution>
						<id>mojo-descriptor</id>
						<goals><goal>descriptor</goal></goals>
					</execution>
					<execution>
						<id>help-goal</id>
						<goals><goal>helpmojo</goal></goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<artifactId>maven-surefire-plugin</artifactId>
				<version>2.10</version>
				<configuration>
					<excludes>
						<exclude>base/**/*</exclude>
					</excludes>
					<argLine>-Dskip.public.download.test=${skip.public.download.test}</argLine>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-gpg-plugin</artifactId>
				<version>1.5</version>
				<executions>
					<execution>
						<id>sign-artifacts</id>
						<phase>verify</phase>
						<goals>
							<goal>sign</goal>
						</goals>
						<configuration>
							<!-- Axon.ivy Project Build Publisher -->
                            <passphrase>${gpg.project-build.password}</passphrase>
							<keyname>72B12346</keyname>
							<gpgArguments>
							    <arg>--pinentry-mode</arg>
							    <arg>loopback</arg>
							</gpgArguments>
						</configuration>
					</execution>
				</executions>
    		</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-source-plugin</artifactId>
				<version>2.4</version>
				<executions>
					<execution>
						<id>attach-sources</id>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
				<version>2.10.3</version>
				<executions>
					<execution>
						<id>attach-javadocs</id>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>build-helper-maven-plugin</artifactId>
				<version>1.10</version>
				<executions>
					<execution>
						<id>parse.version.property</id>
						<goals><goal>parse-version</goal></goals>
						<phase>pre-site</phase>
						<configuration>
							<propertyPrefix>pluginVersion</propertyPrefix>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<artifactId>maven-antrun-plugin</artifactId>
				<version>1.8</version>
				<executions>
					<execution>
						<phase>site</phase>
						<goals><goal>run</goal></goals>
						<id>gh-pages.redirect.page</id>
						<configuration>
							<target>
								<copy file="src/site/gh/pages/index.html" tofile="${project.build.directory}/site-redirect/index.html">
									<filterset id="replaceProductAndVersion">
										<filter token="version" value="${pluginVersion.majorVersion}.${pluginVersion.minorVersion}" />
									</filterset>
								</copy>
							</target>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.sonatype.plugins</groupId>
				<artifactId>nexus-staging-maven-plugin</artifactId>
				<version>1.6.6</version>
				<extensions>true</extensions>
				<configuration>
					<serverId>sonatype.snapshots</serverId>
					<nexusUrl>https://oss.sonatype.org/</nexusUrl>
                    <autoReleaseAfterClose>${autoRelease}</autoReleaseAfterClose>
				</configuration>
			</plugin>
			<plugin>
			    <groupId>com.github.github</groupId>
			    <artifactId>site-maven-plugin</artifactId>
			    <version>0.12</version>
			    <executions>
			        <execution>
			        	<id>deploy.mojo.description.to.github</id>
			            <goals><goal>site</goal></goals>
			            <phase>site-deploy</phase>
			            <configuration>
			                <message>update maven plugin mojo description</message>
			                <path>${site.path}/${pluginVersion.majorVersion}.${pluginVersion.minorVersion}</path>
			            </configuration>
			        </execution>
			        <execution>
			        	<id>deploy.site.redirect.to.github</id>
			            <goals><goal>site</goal></goals>
			            <phase>site-deploy</phase>
			            <configuration>
			                <message>update maven plugin mojo redirect</message>
			                <path>${site.path}</path>
			                <outputDirectory>${project.build.directory}/site-redirect</outputDirectory>
			            </configuration>
			        </execution>
			    </executions>
			    <configuration>
                    <server>github.ivy-team</server>
					<merge>true</merge>
			    </configuration>
			</plugin>
		</plugins>
		
		<pluginManagement>
			<plugins>
				<!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
				<plugin>
					<groupId>org.eclipse.m2e</groupId>
					<artifactId>lifecycle-mapping</artifactId>
					<version>1.0.0</version>
					<configuration>
						<lifecycleMappingMetadata>
							<pluginExecutions>
								<pluginExecution>
									<pluginExecutionFilter>
										<groupId>org.apache.maven.plugins</groupId>
										<artifactId>maven-plugin-plugin</artifactId>
										<versionRange>[3.2,)</versionRange>
										<goals>
											<goal>descriptor</goal>
											<goal>helpmojo</goal>
										</goals>
									</pluginExecutionFilter>
									<action><ignore /></action>
								</pluginExecution>
								<pluginExecution>
									<pluginExecutionFilter>
										<groupId>org.codehaus.mojo</groupId>
										<artifactId>build-helper-maven-plugin</artifactId>
										<versionRange>[1.10,)</versionRange>
										<goals>
											<goal>parse-version</goal>
										</goals>
									</pluginExecutionFilter>
									<action><ignore /></action>
								</pluginExecution>
							</pluginExecutions>
						</lifecycleMappingMetadata>
					</configuration>
				</plugin>
				<plugin>
					<artifactId>maven-site-plugin</artifactId>
					<executions>
						<execution>
							<id>default-deploy</id><!-- use github pages instead! -->
							<configuration><skipDeploy>true</skipDeploy></configuration>
						</execution>
					</executions>
				</plugin>
			</plugins>
		</pluginManagement>
	</build>

	<reporting>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-plugin-plugin</artifactId>
				<version>3.3</version>
				<configuration>
					<requirements>
					  <others>
					    <property>
					      <name>ivy engine</name>
					      <value>6.1</value>
					    </property>
					  </others>
					</requirements>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-project-info-reports-plugin</artifactId>
				<version>2.8.1</version>
				<configuration><skip>true</skip></configuration>
			</plugin>
	    </plugins>
	</reporting>

</project>
