<?xml version="1.0" encoding="UTF-8"?>

<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>net.codesup.util</groupId>
	<artifactId>jaxb-plugin-parent</artifactId>
	<version>1.0.6</version>

	<name>Parent POM for CodeSup JAXB XJC plugin projects</name>
	<packaging>pom</packaging>

	<description>
		Provides base settings and dependencies for other jaxb-plugin projects.
	</description>
	<url>https://github.com/mklemm/jaxb-plugin-parent</url>
	<licenses>
		<license>
			<name>MIT License</name>
			<url>http://opensource.org/licenses/MIT</url>
		</license>
	</licenses>

	<developers>
		<developer>
			<name>Mirko Klemm</name>
			<email>mirko@cm-klemm.de</email>
		</developer>
	</developers>

	<properties>
		<github.global.server>github</github.global.server>
	</properties>

	<scm>
		<connection>scm:git:https://github.com/mklemm/jaxb-plugin-parent.git</connection>
		<developerConnection>scm:git:https://github.com/mklemm/jaxb-plugin-parent.git</developerConnection>
		<url>https://github.com/mklemm/jaxb-plugin-parent.git</url>
		<tag>jaxb-plugin-parent-1.0.6</tag>
	</scm>

	<dependencies>
		<dependency>
			<groupId>org.glassfish.jaxb</groupId>
			<artifactId>jaxb-xjc</artifactId>
			<version>2.2.11</version>
			<optional>true</optional>
		</dependency>
		<dependency>
			<groupId>org.glassfish.jaxb</groupId>
			<artifactId>jaxb-runtime</artifactId>
			<version>2.2.11</version>
			<optional>true</optional>
		</dependency>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>4.11</version>
			<scope>test</scope>
		</dependency>
	</dependencies>

	<build>
		<plugins>
			<plugin>
				<artifactId>maven-resources-plugin</artifactId>
				<version>2.6</version>
				<executions>
					<execution>
						<id>copy-resources</id>
						<phase>generate-resources</phase>
						<goals>
							<goal>copy-resources</goal>
						</goals>
						<configuration>
							<outputDirectory>${project.build.outputDirectory}</outputDirectory>
							<resources>
								<resource>
									<directory>src/main/java</directory>
									<includes>
										<include>com/kscs/util/jaxb/*</include>
									</includes>
									<filtering>true</filtering>
								</resource>
							</resources>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.jvnet.jaxb2.maven2</groupId>
				<artifactId>maven-jaxb2-plugin</artifactId>
				<version>0.11.0</version>
				<executions>
					<execution>
						<id>xsd-generate-2.2</id>
						<phase>generate-sources</phase>
						<goals>
							<goal>generate</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<schemaIncludes>
						<schemaInclude>**/*.xsd</schemaInclude>
					</schemaIncludes>
					<strict>true</strict>
					<verbose>true</verbose>
					<extension>true</extension>
					<removeOldOutput>true</removeOldOutput>
					<specVersion>2.2</specVersion>
				</configuration>
				<dependencies>
					<dependency>
						<groupId>org.glassfish.jaxb</groupId>
						<artifactId>jaxb-runtime</artifactId>
						<version>2.2.11</version>
					</dependency>
					<dependency>
						<groupId>org.glassfish.jaxb</groupId>
						<artifactId>jaxb-core</artifactId>
						<version>2.2.11</version>
					</dependency>
					<dependency>
						<groupId>org.glassfish.jaxb</groupId>
						<artifactId>jaxb-xjc</artifactId>
						<version>2.2.11</version>
					</dependency>
				</dependencies>
			</plugin>
			<plugin>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>2.5.1</version>
				<inherited>true</inherited>
				<configuration>
					<source>1.7</source>
					<target>1.7</target>
				</configuration>
			</plugin>
			<plugin>
				<artifactId>maven-release-plugin</artifactId>
				<version>2.5.2</version>
				<configuration>
					<autoVersionSubmodules>true</autoVersionSubmodules>
					<useReleaseProfile>false</useReleaseProfile>
					<releaseProfiles>release</releaseProfiles>
					<goals>deploy</goals>
				</configuration>
				<dependencies>
					<dependency>
						<groupId>org.apache.maven.scm</groupId>
						<artifactId>maven-scm-provider-gitexe</artifactId>
						<version>1.9.2</version>
					</dependency>
				</dependencies>
			</plugin>
			<plugin>
				<artifactId>maven-site-plugin</artifactId>
				<dependencies>
					<dependency>
						<groupId>org.apache.maven.doxia</groupId>
						<artifactId>doxia-module-markdown</artifactId>
						<version>1.6</version>
					</dependency>
				</dependencies>
			</plugin>

		</plugins>
		<pluginManagement>
			<plugins>
				<plugin>
					<groupId>com.github.github</groupId>
					<artifactId>site-maven-plugin</artifactId>
					<version>0.11</version>
					<configuration>
						<server>github</server>
						<message>Creating site for ${project.version}</message>
					</configuration>
					<executions>
						<execution>
							<goals>
								<goal>site</goal>
							</goals>
							<phase>site</phase>
						</execution>
					</executions>
				</plugin>
			</plugins>
		</pluginManagement>
	</build>


	<profiles>
		<profile>
			<id>release</id>
			<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>
			<build>
				<plugins>
					<plugin>
						<artifactId>maven-release-plugin</artifactId>
						<version>2.5.2</version>
						<configuration>
							<autoVersionSubmodules>true</autoVersionSubmodules>
							<useReleaseProfile>false</useReleaseProfile>
							<releaseProfiles>release</releaseProfiles>
							<goals>deploy</goals>
						</configuration>
						<dependencies>
							<dependency>
								<groupId>org.apache.maven.scm</groupId>
								<artifactId>maven-scm-provider-gitexe</artifactId>
								<version>1.9.2</version>
							</dependency>
						</dependencies>
					</plugin>
					<plugin>
						<groupId>org.sonatype.plugins</groupId>
						<artifactId>nexus-staging-maven-plugin</artifactId>
						<version>1.6.5</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>2.4</version>
						<executions>
							<execution>
								<id>attach-sources</id>
								<phase>package</phase>
								<goals>
									<goal>jar-no-fork</goal>
									<goal>test-jar-no-fork</goal>
								</goals>
								<configuration>
									<includePom>true</includePom>
								</configuration>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-javadoc-plugin</artifactId>
						<version>2.10.1</version>
						<executions>
							<execution>
								<id>javadoc</id>
								<phase>package</phase>
								<goals>
									<goal>jar</goal>
								</goals>
							</execution>
						</executions>
						<configuration>
							<maxmemory>512m</maxmemory>
						</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>
							</execution>
						</executions>
						<configuration>
							<keyname>mirko@cm-klemm.de</keyname>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>

	<distributionManagement>
		<snapshotRepository>
			<id>default-server</id>
			<name>snapshots-repo</name>
			<url>${default.snapshots}</url>
		</snapshotRepository>
		<repository>
			<id>default-server</id>
			<name>releases-repo</name>
			<url>${default.releases}</url>
		</repository>
	</distributionManagement>

</project>
