<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>proxy</groupId>
	<artifactId>http_proxy</artifactId>
	<packaging>war</packaging>
	<version>1.6-SNAPSHOT</version>
	<name>http_proxy</name>
	<url>https://maven.apache.org</url>

	<!-- The SCM -->
	<scm>
		<connection>scm:git:[fetch=]git@github.com:geosolutions-it/http-proxy.git[push=]git@github.com:geosolutions-it/http-proxy.git</connection>
		<tag>master</tag>
		<url>https://github.com/geosolutions-it/http-proxy</url>
	</scm>

	<distributionManagement>
    <!--      GeoSolutions Repository     -->
      <repository>
        <uniqueVersion>false</uniqueVersion>
        <id>geosolutions</id>
        <url>sftp://maven.geo-solutions.it</url>
      </repository>
    </distributionManagement>

	<build>
		<plugins>
			<plugin>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>3.5.1</version>
				<configuration>
					<source>8</source>
					<target>8</target>
				</configuration>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<version>2.19.1</version>
				<configuration>
					<skip>false</skip>
				</configuration>
			</plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>2.6</version>
                <executions>
                    <execution>
                        <id>make-a-jar</id>
                        <phase>compile</phase>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-install-plugin</artifactId>
                <version>2.5.2</version>
                <executions>
                    <execution>
                        <phase>install</phase>
                        <goals>
                            <goal>install-file</goal>
                        </goals>
                        <configuration>
                            <packaging>jar</packaging>
                            <artifactId>${project.artifactId}</artifactId>
                            <groupId>${project.groupId}</groupId>
                            <version>${project.version}</version>
                            <file>${project.build.directory}/${project.artifactId}-${project.version}.jar</file>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-deploy-plugin</artifactId>
				<version>2.8.2</version>
				<executions>
					<execution>
						<phase>deploy</phase>
						<goals>
							<goal>deploy-file</goal>
						</goals>
						<configuration>
							<packaging>jar</packaging>
							<generatePom>true</generatePom>
                                                        <pomFile>${basedir}/pom.xml</pomFile>
							<repositoryId>geosolutions</repositoryId>
							<url>${project.distributionManagement.repository.url}</url>
							<artifactId>${project.artifactId}</artifactId>
							<groupId>${project.groupId}</groupId>
							<version>${project.version}</version>
							<file>${project.build.directory}/${project.artifactId}-${project.version}.jar</file>
						</configuration>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-war-plugin</artifactId>
				<version>2.6</version>
				<configuration>
					<webXml>
						${basedir}/src/main/webapp/WEB-INF/web.xml
					</webXml>
					<warName>http_proxy</warName>
				</configuration>
			</plugin>

			<plugin>
				<groupId>org.mortbay.jetty</groupId>
				<artifactId>maven-jetty-plugin</artifactId>
				<version>6.1.19</version>
				<configuration>
					<contextPath>http_proxy</contextPath>
					<connectors>
						<connector implementation="org.mortbay.jetty.nio.SelectChannelConnector">
							<port>8080</port>
							<maxIdleTime>10000</maxIdleTime>
						</connector>
					</connectors>
					<contextPath>http_proxy</contextPath>
					<webAppSourceDirectory>${project.build.directory}/${project.artifactId}-${project.version}</webAppSourceDirectory>
				</configuration>
			</plugin>

			<!-- versioning -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-release-plugin</artifactId>
				<version>2.2.2</version>
				<configuration>
				  <tagNameFormat>v@{project.version}</tagNameFormat>
				</configuration>
			</plugin>

		</plugins>
		<extensions>
			<extension>
				<groupId>org.apache.maven.wagon</groupId>
				<artifactId>wagon-ssh</artifactId>
				<version>3.5.3</version>
			</extension>
		</extensions>
	</build>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<log4j-version>2.19.0</log4j-version>
		<http-client-version>4.5.13</http-client-version>
	</properties>

	<dependencyManagement>
		<dependencies>
			<dependency>
				<groupId>org.apache.logging.log4j</groupId>
				<artifactId>log4j-core</artifactId>
				<version>${log4j-version}</version>
			</dependency>
			<dependency>
				<groupId>org.apache.logging.log4j</groupId>
				<artifactId>log4j-api</artifactId>
				<version>${log4j-version}</version>
			</dependency>
			<dependency>
				<groupId>org.apache.logging.log4j</groupId>
				<artifactId>log4j-slf4j-impl</artifactId>
				<version>${log4j-version}</version>
			</dependency>
			<dependency>
				<groupId>junit</groupId>
				<artifactId>junit</artifactId>
				<version>4.12</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>commons-fileupload</groupId>
				<artifactId>commons-fileupload</artifactId>
				<version>1.5</version>
			</dependency>

			<dependency>
				<groupId>org.apache.httpcomponents</groupId>
				<artifactId>httpclient</artifactId>
				<version>${http-client-version}</version>
			</dependency>

			<dependency>
				<groupId>org.apache.httpcomponents</groupId>
				<artifactId>httpmime</artifactId>
				<version>${http-client-version}</version>
			</dependency>

			<dependency>
				<groupId>commons-io</groupId>
				<artifactId>commons-io</artifactId>
				<version>2.1</version>
			</dependency>

			<dependency>
				<groupId>commons-codec</groupId>
				<artifactId>commons-codec</artifactId>
				<version>1.4</version>
			</dependency>

			<dependency>
				<groupId>org.mortbay.jetty</groupId>
				<artifactId>servlet-api-2.5</artifactId>
				<version>6.1.14</version>
			</dependency>

			<!-- Mortbay dependencies -->
			<dependency>
				<groupId>org.mortbay.jetty</groupId>
				<artifactId>jetty</artifactId>
				<version>6.1.23</version>
				<scope>test</scope>
			</dependency>

			<dependency>
				<groupId>org.mortbay.jetty</groupId>
				<artifactId>jetty-servlet-tester</artifactId>
				<version>6.1.5</version>
				<scope>test</scope>
			</dependency>

			<dependency>
				<groupId>org.mockito</groupId>
				<artifactId>mockito-all</artifactId>
				<version>1.9.5</version>
				<scope>test</scope>
			</dependency>


			<dependency>
				<groupId>com.github.tomakehurst</groupId>
				<artifactId>wiremock-jre8-standalone</artifactId>
				<version>2.32.0</version>
				<scope>test</scope>
			</dependency>
		</dependencies>
	</dependencyManagement>

	<dependencies>
		<!-- JUnit dependencies -->
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<scope>test</scope>
		</dependency>

		<!-- Log4j2 dependencies -->
		<dependency>
			<groupId>org.apache.logging.log4j</groupId>
			<artifactId>log4j-core</artifactId>
		</dependency>
		<dependency>
			<groupId>org.apache.logging.log4j</groupId>
			<artifactId>log4j-api</artifactId>
		</dependency>
		<dependency>
			<groupId>org.apache.logging.log4j</groupId>
			<artifactId>log4j-slf4j-impl</artifactId>
		</dependency>

		<!-- Commons -->
		<dependency>
			<groupId>commons-fileupload</groupId>
			<artifactId>commons-fileupload</artifactId>
		</dependency>

		<dependency>
			<groupId>org.apache.httpcomponents</groupId>
			<artifactId>httpclient</artifactId>
		</dependency>

		<dependency>
			<groupId>org.apache.httpcomponents</groupId>
			<artifactId>httpmime</artifactId>
		</dependency>

		<dependency>
			<groupId>commons-io</groupId>
			<artifactId>commons-io</artifactId>
		</dependency>

        <dependency>
			<groupId>commons-codec</groupId>
			<artifactId>commons-codec</artifactId>
		</dependency>

		<dependency>
			<groupId>org.mortbay.jetty</groupId>
			<artifactId>servlet-api-2.5</artifactId>
		</dependency>

		<!-- Mortbay dependencies -->
		<dependency>
			<groupId>org.mortbay.jetty</groupId>
			<artifactId>jetty</artifactId>
			<scope>test</scope>
		</dependency>

        <dependency>
        	<groupId>org.mortbay.jetty</groupId>
        	<artifactId>jetty-servlet-tester</artifactId>
        	<scope>test</scope>
        </dependency>

		<dependency>
			<groupId>org.mockito</groupId>
			<artifactId>mockito-all</artifactId>
			<scope>test</scope>
		</dependency>


		<dependency>
			<groupId>com.github.tomakehurst</groupId>
			<artifactId>wiremock-jre8-standalone</artifactId>
			<scope>test</scope>
		</dependency>

	</dependencies>

	<repositories>

        <!-- central is assumed -->

		<repository>
			<releases>
				<enabled>true</enabled>
			</releases>
			<snapshots>
				<enabled>false</enabled>
			</snapshots>
			<id>osgeo</id>
			<name>OSGeo Nexus Release Repository</name>
			<url>https://repo.osgeo.org/repository/release/</url>
		</repository>

	</repositories>

</project>
