<?xml version="1.0" encoding="UTF-8"?>
<!--
/*
 * 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/xsd/maven-4.0.0.xsd ">
	<modelVersion>4.0.0</modelVersion>

	<groupId>com.github.junahan</groupId>
	<artifactId>struts2-protobuf-plugin-parent</artifactId>
	<version>1.0.0</version>
	<packaging>pom</packaging>
	
	<name>${project.artifactId}</name>
	<description>Struts2 protobuf plugin parent</description>
	<url>https://github.com/junahan/struts2-protobuf-plugin</url>
	
    <licenses>
        <license>
            <name>Apache License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
        </license>
    </licenses>
    
    <developers>
        <developer>
            <name>Junahan</name>
            <email>junahan@outlook.com</email>
        </developer>
    </developers>
    
    <scm>
       <url>https://github.com/junahan/struts2-protobuf-plugin</url>
       <connection>scm:git:https://github.com/junahan/struts2-protobuf-plugin.git</connection>
       <developerConnection>scm:git:git@github.com:junahan/struts2-protobuf-plugin.git</developerConnection>
      <tag>struts2-protobuf-plugin-parent-1.0.0</tag>
  </scm>
    
	<properties>
		<bnd.version.policy>[$(version;==;$(@)),$(version;+;$(@)))</bnd.version.policy>
		<protobuf.source.dir>src/main/proto</protobuf.source.dir>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<log4j.version>2.10.0</log4j.version>
		<struts2.version>2.5.16</struts2.version>
		<protobuf.version>3.5.1</protobuf.version>
		<beanutils.version>1.9.3</beanutils.version>
		<jsp.api.version>2.1</jsp.api.version>
		<servlet.api.version>3.1.0</servlet.api.version>
		<junit.version>4.9</junit.version>
		<spring.version>4.3.13.RELEASE</spring.version>
        <httpclient.version>4.5.5</httpclient.version>
        <httpcore.version>4.4.9</httpcore.version>
		<easymock.version>3.6</easymock.version>
		<java.source.version>1.8</java.source.version>
        <java.target.version>1.8</java.target.version>
        <file.encoding>UTF-8</file.encoding>
        <!-- Maven plugins -->
        <skip.maven.deploy>false</skip.maven.deploy>
        <maven.jar.version>3.1.0</maven.jar.version>
        <maven.dependency.version>3.1.1</maven.dependency.version>
        <maven.surefire.version>2.21.1</maven.surefire.version>
        <maven.deploy.version>2.8.2</maven.deploy.version>
        <maven.release.version>2.5.3</maven.release.version>
        <maven.compiler.version>3.7.0</maven.compiler.version>
        <maven.source.version>3.0.1</maven.source.version>
        <maven.javadoc.version>3.0.1</maven.javadoc.version>
        <maven.gpg.version>1.6</maven.gpg.version>
		<maven.protobuf.plugin.version>0.5.1</maven.protobuf.plugin.version>
		<maven.felix.plugin.version>3.5.0</maven.felix.plugin.version>
		<maven.jetty.version>9.4.9.v20180320</maven.jetty.version>
	</properties>

    <modules>
      <module>plugin</module>
      <module>plugin-demo</module>
    </modules>
    
    <dependencies>
	    <dependency>
	      <groupId>junit</groupId>
	      <artifactId>junit</artifactId>
	      <version>${junit.version}</version>
	      <scope>test</scope>
	    </dependency>
	    
	    <dependency>
	      <groupId>org.easymock</groupId>
	      <artifactId>easymock</artifactId>
	      <version>${easymock.version}</version>
	      <scope>test</scope>
	    </dependency>	
	</dependencies>

	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>${maven.compiler.version}</version>
				<configuration>
					<source>${java.source.version}</source>
					<target>${java.target.version}</target>
				</configuration>
			</plugin>

			<plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-deploy-plugin</artifactId>
                <version>${maven.deploy.version}</version>
                <configuration>
                    <skip>${skip.maven.deploy}</skip>
                </configuration>
            </plugin>
			<plugin>
			  <groupId>org.apache.maven.plugins</groupId>
			  <artifactId>maven-release-plugin</artifactId>
			  <version>${maven.release.version}</version>
			  <configuration>
			    <autoVersionSubmodules>true</autoVersionSubmodules>
			    <useReleaseProfile>false</useReleaseProfile>
			    <releaseProfiles>release</releaseProfiles>
			    <goals>deploy</goals>
			  </configuration>
			</plugin>
		</plugins>
	</build>
    
	<profiles>
	    <profile>
            <id>release</id>
            <build>
                <plugins>
		            <plugin>
		                <groupId>org.apache.maven.plugins</groupId>
		                <artifactId>maven-source-plugin</artifactId>
		                <version>${maven.source.version}</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>${maven.javadoc.version}</version>
                        <executions>
                            <execution>
                                <id>attach-javadoc</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                                <configuration>
                                    <doclint>none</doclint>
                                </configuration>
                            </execution>
                        </executions>
                        <configuration>
                            <show>public</show>
                            <charset>UTF-8</charset>
                            <encoding>UTF-8</encoding>
                            <docencoding>UTF-8</docencoding>
                            <links>
                                <link>http://docs.oracle.com/javase/8/docs/api</link>
                            </links>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>${maven.gpg.version}</version>
                        <executions>
                            <execution>
                                <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>
