<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!--
   Licensed to the Apache Software Foundation (ASF) under one or more
   contributor license agreements.  See the NOTICE file distributed with
   this work for additional information regarding copyright ownership.
   The ASF licenses this file to You under the Apache License, Version 2.0
   (the "License"); you may not use this file except in compliance with
   the License.  You may obtain a copy of the License at

        http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
--><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.orienteer.jnpm</groupId>
	<artifactId>jnpm-parent</artifactId>
	<packaging>pom</packaging>
	<version>1.4</version>
        <name>JNPM Parent POM</name>
	<description>Java Implementation of Node Package Manager (NPM)</description>
	<url>https://github.com/OrienteerBAP/JNPM</url>
	<scm>
	    <url>https://github.com/OrienteerBAP/JNPM</url>
	    <connection>scm:git:ssh://git@github.com/OrienteerBAP/JNPM.git</connection>
	    <developerConnection>scm:git:ssh://git@github.com/OrienteerBAP/JNPM.git</developerConnection>
	    <tag>v1.4</tag>
	</scm>

	<issueManagement>
	    <system>github</system>
	    <url>https://github.com/OrienteerBAP/JNPM/issues</url>
	</issueManagement>

	<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>

	<developers>
	    <developer>
            <id>owner</id>
            <name>Ilia Naryzhny</name>
            <email>phantom@ydn.ru</email>
	    </developer>
	</developers>

	<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>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <maven.compiler.source>1.8</maven.compiler.source>
    <maven.compiler.target>1.8</maven.compiler.target>
    <retrofit2.version>2.9.0</retrofit2.version>
    <okhttp.version>4.9.0</okhttp.version>
    <maven.version>3.6.0</maven.version>
    <jetty.version>9.4.12.v20180830</jetty.version>
  </properties>

     <repositories>
		 <repository>
			 <id>snapshots-repo</id>
			 <url>https://oss.sonatype.org/content/repositories/snapshots</url>
             <releases>
                 <enabled>false</enabled>
             </releases>
             <snapshots>
                 <enabled>true</enabled>
             </snapshots>
         </repository>
     </repositories>

	<!-- IMPORTANT: to support quick docker builds: modules were moved to default profile below -->
	<dependencyManagement>
	    <dependencies>
  	<dependency>
	  <groupId>com.squareup.retrofit2</groupId>
	  <artifactId>retrofit</artifactId>
	  <version>${retrofit2.version}</version>
	</dependency>
	<dependency>
		<groupId>com.squareup.okhttp3</groupId>
		<artifactId>okhttp</artifactId>
	    <version>${okhttp.version}</version>
	</dependency>
	<dependency>
		<groupId>com.squareup.okhttp3</groupId>
		<artifactId>logging-interceptor</artifactId>
	    <version>${okhttp.version}</version>
	</dependency>
	<dependency>
	  <groupId>com.squareup.retrofit2</groupId>
	  <artifactId>converter-jackson</artifactId>
	  <version>${retrofit2.version}</version>
	</dependency>
	<dependency>
	  <groupId>com.squareup.retrofit2</groupId>
	  <artifactId>adapter-rxjava2</artifactId>
	  <version>${retrofit2.version}</version>
	</dependency>
	<dependency>
	    <groupId>io.reactivex.rxjava2</groupId>
	    <artifactId>rxjava</artifactId>
	    <version>2.2.19</version>
	</dependency>
	<dependency>
       		<groupId>org.apache.commons</groupId>
       		<artifactId>commons-compress</artifactId>
       		<version>1.21</version>
    	</dependency>
    	<dependency>
		<groupId>com.vdurmont</groupId>
		<artifactId>semver4j</artifactId>
		<version>3.1.0</version>
	</dependency>
	<dependency>
	    <groupId>info.picocli</groupId>
	    <artifactId>picocli</artifactId>
	    <version>4.3.2</version>
	</dependency>
	<dependency>
	    <groupId>javax.servlet</groupId>
    	<artifactId>javax.servlet-api</artifactId>
	    <version>[3.0,)</version>
	    <scope>provided</scope>
	</dependency>
	<dependency>
	    <groupId>org.apache.wicket</groupId>
	    <artifactId>wicket-core</artifactId>
	    <version>[8.0.0,9.0.0-M1)</version>
	    <scope>provided</scope>
	</dependency>
    	<dependency>
		<groupId>org.projectlombok</groupId>
		<artifactId>lombok</artifactId>
		<version>1.18.12</version>
		<scope>provided</scope>
	</dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.13.1</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-core</artifactId>
      <version>3.3.3</version>
      <scope>test</scope>
    </dependency>
	</dependencies>
	</dependencyManagement>
	<modules>
		<module>jnpm</module>
	  <module>maven</module>
  </modules>
  <build>
    <pluginManagement>
      <!-- lock down plugins versions to avoid using Maven defaults (may be moved to parent pom) -->
      <plugins>
        <!-- clean lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#clean_Lifecycle -->
        <plugin>
          <artifactId>maven-clean-plugin</artifactId>
          <version>3.1.0</version>
        </plugin>
        <!-- default lifecycle, jar packaging: see https://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_jar_packaging -->
        <plugin>
          <artifactId>maven-resources-plugin</artifactId>
          <version>3.0.2</version>
        </plugin>
        <plugin>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>3.8.0</version>
        </plugin>
        <plugin>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>2.22.1</version>
		  <configuration>
			<forkCount>3</forkCount>
			<reuseForks>true</reuseForks>
			<argLine>-Xmx512m -XX:MaxPermSize=256m</argLine>
		  </configuration>
        </plugin>
        <plugin>
          <artifactId>maven-jar-plugin</artifactId>
          <version>3.0.2</version>
        </plugin>
        <plugin>
          <artifactId>maven-install-plugin</artifactId>
          <version>2.5.2</version>
        </plugin>
        <plugin>
          <artifactId>maven-deploy-plugin</artifactId>
          <version>2.8.2</version>
        </plugin>
        <!-- site lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#site_Lifecycle -->
        <plugin>
          <artifactId>maven-site-plugin</artifactId>
          <version>3.7.1</version>
        </plugin>
        <plugin>
          <artifactId>maven-project-info-reports-plugin</artifactId>
          <version>3.0.0</version>
        </plugin>
      </plugins>
    </pluginManagement>
    <plugins>
      <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-checkstyle-plugin</artifactId>
          <version>3.0.0</version>
          <configuration>
              <configLocation>check_style.xml</configLocation>
              <failOnViolation>true</failOnViolation>
              <linkXRef>false</linkXRef>
              <sourceDirectories>
              	<sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
              </sourceDirectories>
          </configuration>
          <executions>
              <execution>
                  <id>checkstyle</id>
                  <phase>verify</phase>
                  <goals>
                      <goal>check</goal>
                  </goals>
              </execution>
          </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <version>3.0.1</version>
        <executions>
          <execution>
            <id>attach-sources</id>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
		<plugin>
			<groupId>org.apache.maven.plugins</groupId>
			<artifactId>maven-release-plugin</artifactId>
			<version>2.5.3</version>
			<configuration>
			    <autoVersionSubmodules>true</autoVersionSubmodules>
			    <releaseProfiles>release</releaseProfiles>
			    <goals>deploy</goals>
			    <tagNameFormat>v@{project.version}</tagNameFormat>
			    <arguments>-Pskip-integration-tests</arguments>
			</configuration>
		</plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>2.10.4</version>
        <configuration>
          <encoding>UTF-8</encoding>
        </configuration>
        <executions>
          <execution>
            <id>attach-javadoc</id>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>


	<profiles>
	    <profile> 
		<id>release</id>
		<build>
		    <plugins>
			<plugin>
			    <groupId>org.sonatype.plugins</groupId>
			    <artifactId>nexus-staging-maven-plugin</artifactId>
			    <version>1.6.7</version>
			    <extensions>true</extensions>
			    <configuration>
				<serverId>ossrh</serverId>
				<nexusUrl>https://oss.sonatype.org/</nexusUrl>
				<autoReleaseAfterClose>true</autoReleaseAfterClose>
			    </configuration>
			</plugin>
			<plugin>
			    <groupId>org.apache.maven.plugins</groupId>
			    <artifactId>maven-source-plugin</artifactId>
			    <version>3.0.0</version>
			    <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>2.10.3</version>
			    <executions>
				<execution>
				    <id>attach-javadocs</id>
				    <goals>
					<goal>jar</goal>
				    </goals>
				</execution>
			    </executions>
			</plugin>
			<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>
</project>
