<?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>com.github.sabomichal</groupId>
	<artifactId>immutable-xjc-plugin</artifactId>
	<version>1.0.5</version>
	<packaging>jar</packaging>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<maven.test.skip>true</maven.test.skip>
	</properties>

	<dependencies>
		<dependency>
			<groupId>com.sun.codemodel</groupId>
			<artifactId>codemodel</artifactId>
			<version>2.6</version>
		</dependency>
		<dependency>
			<groupId>javax.xml.bind</groupId>
			<artifactId>jaxb-api</artifactId>
			<version>2.0</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>com.sun.xml.bind</groupId>
			<artifactId>jaxb-impl</artifactId>
			<version>2.0.5</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>com.sun.xml.bind</groupId>
			<artifactId>jaxb-xjc</artifactId>
			<version>2.2.6</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>4.11</version>
			<scope>test</scope>
		</dependency>
	</dependencies>

	<build>
		<resources>
			<resource>
				<directory>src/main/resources</directory>
				<filtering>true</filtering>
			</resource>
		</resources>
		<pluginManagement>
			<plugins>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-compiler-plugin</artifactId>
					<version>2.3.2</version>
					<configuration>
						<source>1.5</source>
						<target>1.5</target>
						<debug>true</debug>
						<optimize>true</optimize>
						<showDeprecation>true</showDeprecation>
						<showWarnings>true</showWarnings>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-resources-plugin</artifactId>
					<version>2.5</version>
					<configuration>
						<delimiters>
							<delimiter>${*}</delimiter>
						</delimiters>
						<useDefaultDelimiters>false</useDefaultDelimiters>
						<escapeWindowsPaths>true</escapeWindowsPaths>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-jar-plugin</artifactId>
					<version>2.4</version>
					<configuration>
						<archive>
							<index>true</index>
							<addMavenDescriptor>false</addMavenDescriptor>
							<compress>true</compress>
							<manifestEntries>
								<Build-Date>${buildNumber}</Build-Date>
								<Maven-Version>${maven.version}</Maven-Version>
							</manifestEntries>
						</archive>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-source-plugin</artifactId>
					<version>2.1.2</version>
					<configuration>
						<archive>
							<index>true</index>
							<addMavenDescriptor>false</addMavenDescriptor>
							<compress>true</compress>
							<manifestEntries>
								<Build-Date>${buildNumber}</Build-Date>
								<Maven-Version>${maven.version}</Maven-Version>
							</manifestEntries>
						</archive>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.codehaus.mojo</groupId>
					<artifactId>build-helper-maven-plugin</artifactId>
					<version>1.7</version>
					<executions>
						<execution>
							<id>default-maven-version</id>
							<phase>initialize</phase>
							<goals>
								<goal>maven-version</goal>
							</goals>
						</execution>
						<execution>
							<id>default-timestamp-property</id>
							<phase>initialize</phase>
							<goals>
								<goal>timestamp-property</goal>
							</goals>
							<configuration>
								<name>buildNumber</name>
								<locale>en</locale>
								<pattern>yyyy-MM-dd'T'HH:mm:ssZ</pattern>
							</configuration>
						</execution>
						<execution>
							<id>default-attach-artifact</id>
							<inherited>false</inherited>
							<phase>prepare-package</phase>
							<goals>
								<goal>attach-artifact</goal>
							</goals>
							<configuration>
								<artifacts>
									<artifact>
										<file>${basedir}/LICENSE.txt</file>
										<classifier>license</classifier>
										<type>txt</type>
									</artifact>
								</artifacts>
							</configuration>
						</execution>
					</executions>
				</plugin>
			</plugins>
		</pluginManagement>
		<plugins>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>build-helper-maven-plugin</artifactId>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-release-plugin</artifactId>
				<version>2.2.2</version>
				<configuration>
					<arguments>-Dgpg.passphrase=${gpg.passphrase}</arguments>
				</configuration>
			</plugin>
		</plugins>
	</build>

	<profiles>
		<profile>
			<id>release-sign-artifacts</id>
			<activation>
				<property>
					<name>performRelease</name>
					<value>true</value>
				</property>
			</activation>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<version>1.4</version>
						<configuration>
							<passphrase>${gpg.passphrase}</passphrase>
						</configuration>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
		<profile>
			<id>selftest</id>
			<properties>
				<maven.test.skip>false</maven.test.skip>
			</properties>
			<build>
				<plugins>
					<plugin>
						<groupId>org.codehaus.mojo</groupId>
						<artifactId>jaxb2-maven-plugin</artifactId>
						<version>1.5</version>
						<dependencies>
							<dependency>
								<groupId>${project.groupId}</groupId>
								<artifactId>${project.artifactId}</artifactId>
								<version>${project.version}</version>
								<optional>true</optional>
							</dependency>
						</dependencies>
						<executions>
							<execution>
								<phase>generate-test-sources</phase>
								<goals>
									<goal>testXjc</goal>
								</goals>
								<configuration>
									<packageName>${project.groupId}.immutablexjc.test</packageName>
									<arguments>-immutable -imm-builder</arguments>
								</configuration>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.jvnet.jax-ws-commons</groupId>
						<artifactId>jaxws-maven-plugin</artifactId>
						<version>2.3</version>
						<dependencies>
							<dependency>
								<groupId>${project.groupId}</groupId>
								<artifactId>${project.artifactId}</artifactId>
								<version>${project.version}</version>
								<optional>true</optional>
							</dependency>
						</dependencies>
						<executions>
							<execution>
								<phase>generate-sources</phase>
								<goals>
									<goal>wsimport-test</goal>
								</goals>
								<configuration>
									<wsdlDirectory>${project.basedir}/src/test/wsdl</wsdlDirectory>
									<wsdlFiles>
										<wsdlFile>test.wsdl</wsdlFile>
									</wsdlFiles>
									<args>
										<arg>-B-immutable -B-imm-builder</arg>
									</args>
								</configuration>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>

	<name>IMMUTABLE-XJC</name>
	<description>JAXB 2.0 Schema to Java compiler plugin for making schema derived classes immutable.</description>
	<url>https://github.com/sabomichal/immutable-xjc</url>
	<inceptionYear>2012</inceptionYear>

	<issueManagement>
		<system>GitHub</system>
		<url>https://github.com/sabomichal/immutable-xjc/issues</url>
	</issueManagement>

	<licenses>
		<license>
			<name>The MIT License (MIT)</name>
			<url>http://opensource.org/licenses/MIT</url>
			<distribution>repo</distribution>
		</license>
	</licenses>

	<developers>
		<developer>
			<id>sabo</id>
			<name>Michal Sabo</name>
			<email>sabo.michal@gmail.com</email>
		</developer>
	</developers>

	<scm>
		<connection>scm:git:https://github.com/sabomichal/immutable-xjc.git</connection>
		<developerConnection>scm:git:git@github.com:sabomichal/immutable-xjc.git</developerConnection>
		<url>https://github.com/sabomichal/immutable-xjc</url>
	</scm>

	<distributionManagement>
		<snapshotRepository>
			<id>sonatype-nexus-snapshots</id>
			<name>Sonatype Nexus snapshot repository</name>
			<url>https://oss.sonatype.org/content/repositories/snapshots</url>
		</snapshotRepository>
		<repository>
			<id>sonatype-nexus-staging</id>
			<name>Sonatype Nexus release repository</name>
			<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
		</repository>
	</distributionManagement>
</project>