<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>

	<properties>
		<!--
			This may get better support in Maven 3, see:
			http://docs.codehaus.org/display/MAVENUSER/POM+Element+for+Source+File+Encoding
		-->
		<project.build.encoding>UTF-8</project.build.encoding>
		<project.build.sourceEncoding>${project.build.encoding}</project.build.sourceEncoding>
		<project.build.resourceEncoding>${project.build.encoding}</project.build.resourceEncoding>
		<java.old.version>6</java.old.version>
		<java.old.home>${env.JAVA6_HOME}</java.old.home>
		<!-- NOTE This works for reactor/aggregation & child module builds. -->
		<root.basedir>${project.basedir}/../parent</root.basedir>
	</properties>

	<groupId>com.illposed.osc</groupId>
	<artifactId>javaosc-parent</artifactId>
	<version>0.4</version>

	<packaging>pom</packaging>

	<organization>
		<name>Illposed</name>
		<url>http://illposed.com</url>
	</organization>
	<name>JavaOSC - Parent</name>
	<description>An OSC library implementation in Java - Parent</description>
	<url>http://sourceforge.net/projects/javaosc/</url>
	<prerequisites>
		<maven>2.2.1</maven>
	</prerequisites>
	<inceptionYear>2001</inceptionYear>

	<!--
		Without this, Maven uses the parents SCM;
		in our case, the Sonatype SVM repository.
		Among possibly other issue, this makes `mvn site` fail.
	-->
	<scm>
		<connection>scm:git:git://github.com/hoijui/JavaOSC</connection>
		<developerConnection>scm:git:git@github.com:hoijui/JavaOSC.git</developerConnection>
		<url>http://github.com/hoijui/JavaOSC</url>
		<tag>javaosc-0.4</tag>
	</scm>

	<licenses>
		<license>
			<name>BSD</name>
			<url>http://www.opensource.org/licenses/BSD-3-Clause</url>
			<distribution>repo</distribution>
		</license>
	</licenses>

	<issueManagement>
		<system>GitHub</system>
		<url>https://github.com/hoijui/JavaOSC/issues/</url>
	</issueManagement>

	<developers>
		<developer>
			<name>Chandrasekhar Ramakrishnan</name>
			<email>cr_web@illposed.com</email>
			<roles>
				<role>main developer</role>
			</roles>
		</developer>
		<developer>
			<name>Robin Vobruba</name>
			<email>hoijui.quaero@gmail.com</email>
			<roles>
				<role>co-dev</role>
			</roles>
		</developer>
	</developers>

	<reporting>
		<plugins>
			<!-- NOTE Use the profile "Extensive-Reports" for an extended list of reports. -->

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-checkstyle-plugin</artifactId>
				<version>2.15</version> <!-- NOTE 2.15 is the latest version still compiled with Java 1.6 -->
				<configuration>
					<sourceEncoding>${project.build.sourceEncoding}</sourceEncoding>
					<linkXref>true</linkXref>
					<configLocation>src/main/resources/checkstyle.xml</configLocation>
				</configuration>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-pmd-plugin</artifactId>
				<version>3.6</version> <!-- NOTE 3.6 is the latest version still compiled with Java 1.6 -->
				<configuration>
					<aggregate>true</aggregate>
					<linkXref>true</linkXref>
					<sourceEncoding>${project.build.sourceEncoding}</sourceEncoding>
					<targetJdk>1.${java.old.version}</targetJdk>
					<rulesets>
						<ruleset>${root.basedir}/src/main/resources/pmd.xml</ruleset>
					</rulesets>
				</configuration>
			</plugin>

			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>findbugs-maven-plugin</artifactId>
				<version>2.5.5</version> <!-- NOTE 2.5.5 is the latest version still compiled with Java 1.6 -->
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-report-plugin</artifactId>
				<version>2.19.1</version>
			</plugin>

			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>jdepend-maven-plugin</artifactId>
				<version>2.0</version>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-project-info-reports-plugin</artifactId>
				<version>2.9</version>
			</plugin>
		</plugins>
	</reporting>

	<build>
		<pluginManagement>
			<plugins>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-compiler-plugin</artifactId>
					<version>3.6.1</version>
					<configuration>
						<source>1.${java.old.version}</source>
						<target>1.${java.old.version}</target>
						<encoding>${project.build.sourceEncoding}</encoding>
						<showDeprecation>true</showDeprecation>
						<compilerArgument>-Xlint:unchecked</compilerArgument>
					</configuration>
				</plugin>

				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-resources-plugin</artifactId>
					<version>3.0.2</version>
					<configuration>
						<encoding>${project.build.resourceEncoding}</encoding>
					</configuration>
				</plugin>

				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-javadoc-plugin</artifactId>
					<version>2.10.4</version>
					<configuration>
						<charset>${project.build.sourceEncoding}</charset>
						<encoding>${project.build.sourceEncoding}</encoding>
					</configuration>
				</plugin>

				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-deploy-plugin</artifactId>
					<version>2.8.2</version>
				</plugin>

				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-source-plugin</artifactId>
					<version>3.0.1</version>
				</plugin>

				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-site-plugin</artifactId>
					<version>3.6</version> <!-- NOTE 2.4 is the latest version still compiled with Java 1.6 -->
				</plugin>

				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-release-plugin</artifactId>
					<version>2.5.3</version>
					<configuration>
						<autoVersionSubmodules>true</autoVersionSubmodules>
						<useReleaseProfile>false</useReleaseProfile>
						<releaseProfiles>release</releaseProfiles>
						<goals>deploy</goals>
						<!--
							Workaround to prevent the gpg plugin from hanging, see:
							http://jira.codehaus.org/browse/MGPG-9
						-->
						<mavenExecutorId>forked-path</mavenExecutorId>
					</configuration>
				</plugin>

				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-jar-plugin</artifactId>
					<version>3.0.2</version>
					<configuration>
						<archive>
							<manifestEntries>
								<!-- prevent the local user-name from entering the JAR manifest -->
								<Built-By />
							</manifestEntries>
						</archive>
					</configuration>
				</plugin>

				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-assembly-plugin</artifactId>
					<version>3.0.0</version>
				</plugin>

				<plugin>
					<groupId>org.codehaus.mojo</groupId>
					<artifactId>exec-maven-plugin</artifactId>
					<version>1.5.0</version>
					<executions>
						<execution>
							<goals>
								<goal>java</goal>
							</goals>
						</execution>
					</executions>
					<configuration>
						<mainClass>${project.mainClass}</mainClass>
					</configuration>
				</plugin>

				<plugin>
					<groupId>org.apache.felix</groupId>
					<artifactId>maven-bundle-plugin</artifactId>
					<version>2.5.3</version> <!-- NOTE 2.5.3 is the latest version still compiled with Java 1.6 -->
				</plugin>

				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-checkstyle-plugin</artifactId>
					<version>2.15</version> <!-- NOTE 2.15 is the latest version still compiled with Java 1.6 -->
					<configuration>
						<sourceEncoding>${project.build.sourceEncoding}</sourceEncoding>
						<linkXref>true</linkXref>
						<configLocation>src/main/resources/checkstyle.xml</configLocation>
						<propertyExpansion>java.header.regex.template.file=${root.basedir}/src/main/resources/java_header_regex_template.txt</propertyExpansion>
					</configuration>
				</plugin>

				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-pmd-plugin</artifactId>
					<version>3.6</version> <!-- NOTE 3.6 is the latest version still compiled with Java 1.6 -->
					<configuration>
						<aggregate>true</aggregate>
						<linkXref>true</linkXref>
						<sourceEncoding>${project.build.sourceEncoding}</sourceEncoding>
						<targetJdk>1.${java.old.version}</targetJdk>
						<rulesets>
							<ruleset>${root.basedir}/src/main/resources/pmd.xml</ruleset>
						</rulesets>
						<excludes>
							<exclude>com/illposed/osc/utility/OSCByteArrayToJavaConverter.java</exclude>
							<exclude>com/illposed/osc/utility/OSCJavaToByteArrayConverter.java</exclude>
							<exclude>com/illposed/osc/utility/OSCPatternAddressSelector.java</exclude>
						</excludes>
					</configuration>
				</plugin>

				<plugin>
					<groupId>org.codehaus.mojo</groupId>
					<artifactId>findbugs-maven-plugin</artifactId>
					<version>2.5.5</version> <!-- NOTE 2.5.5 is the latest version still compiled with Java 1.6 -->
				</plugin>
			</plugins>
		</pluginManagement>
	</build>

	<dependencyManagement>
		<dependencies>
			<dependency>
				<groupId>junit</groupId>
				<artifactId>junit</artifactId>
				<version>4.12</version>
				<scope>test</scope>
			</dependency>
		</dependencies>
	</dependencyManagement>

	<profiles>
		<profile>
			<id>Extensive-Reports</id>
			<!--
				This profile adds additional reports to the site phase.
				The reports in here create a lot of output (in MB).
				Thus we do not want to use them to generate the default site,
				which is uploaded on the web (for potentially many versions).
			-->
			<reporting>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-jxr-plugin</artifactId>
						<version>2.5</version>
						<configuration>
							<sourceEncoding>${project.build.sourceEncoding}</sourceEncoding>
						</configuration>
					</plugin>

					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-javadoc-plugin</artifactId>
						<version>2.10.4</version>
						<configuration>
							<charset>${project.build.sourceEncoding}</charset>
							<encoding>${project.build.sourceEncoding}</encoding>
						</configuration>
					</plugin>

					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-changelog-plugin</artifactId>
						<version>2.3</version>
					</plugin>

					<plugin>
						<groupId>org.codehaus.mojo</groupId>
						<artifactId>cobertura-maven-plugin</artifactId>
						<version>2.7</version>
					</plugin>

					<!--<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-linkcheck-plugin</artifactId>
						<version>1.2</version>
					</plugin>-->

					<plugin>
						<groupId>org.codehaus.mojo</groupId>
						<artifactId>javancss-maven-plugin</artifactId>
						<version>2.1</version>
					</plugin>

					<plugin>
						<groupId>org.codehaus.mojo</groupId>
						<artifactId>sonar-maven-plugin</artifactId>
						<version>3.2</version>
					</plugin>

					<plugin>
						<groupId>org.codehaus.mojo</groupId>
						<artifactId>emma-maven-plugin</artifactId>
						<version>1.0-alpha-3</version>
						<configuration>
							<outputDirectory>${project.build.directory}</outputDirectory>
						</configuration>
					</plugin>
				</plugins>
			</reporting>
		</profile>

		<profile>
			<id>release</id>
			<!--
				This profile is auto-enabled by the maven-release-plugin.
				It contains stuff that allows us to sync to Maven central.
			-->
			<build>
				<plugins>
					<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>
								<configuration>
									<!--
										The `gpg.keyname` property is defined in settings.xml,
										and needs to match the `uid` as displayed by `gpg2 \-\-list-keys`.
										Example:
											Firstname Lastname (Comment) &lt;user@email.org&gt;
									-->
									<keyname>${gpg.keyname}</keyname>
									<passphraseServerId>${gpg.keyname}</passphraseServerId>
								</configuration>
							</execution>
						</executions>
					</plugin>

					<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-javadoc-plugin</artifactId>
						<configuration>
							<failOnError>false</failOnError>
							<charset>${project.build.sourceEncoding}</charset>
							<encoding>${project.build.sourceEncoding}</encoding>
						</configuration>
						<executions>
							<execution>
								<id>attach-javadocs</id>
								<goals>
									<goal>jar</goal>
								</goals>
							</execution>
						</executions>
					</plugin>

					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-source-plugin</artifactId>
						<executions>
							<execution>
								<id>attach-sources</id>
								<goals>
									<goal>jar-no-fork</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>

		<profile>
			<id>compileWithOldJava</id>
			<!--
				NOTE
				Make sure to set the environment variable JAVA${VERSION}_HOME
				to your old JDK HOME when using this profile.
				For example: JAVA6_HOME=.../jdk1.6.0_00
				Also set the Maven properties:
				* 'java.old.version' (for example: '6')
				* 'java.old.home' (for example: '${env.JAVA6_HOME}')
			-->
			<properties>
				<java.old.libs>${java.old.home}/jre/lib</java.old.libs>
				<java.old.bootclasspath>${java.old.libs}/rt.jar${path.separator}${java.old.libs}/jce.jar</java.old.bootclasspath>
			</properties>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-compiler-plugin</artifactId>
						<configuration>
							<source>1.${java.old.version}</source>
							<target>1.${java.old.version}</target>
							<encoding>${project.build.sourceEncoding}</encoding>
							<showDeprecation>true</showDeprecation>
							<compilerArgument>-Xlint:unchecked</compilerArgument>
							<compilerArguments>
								<bootclasspath>${java.old.bootclasspath}</bootclasspath>
							</compilerArguments>
						</configuration>
					</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>
