Skip to content

Commit

Permalink
Updated Maven build scripts to comply with OSSRH requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
mikepthomas committed Oct 1, 2016
1 parent ecd6c9b commit 78fa810
Show file tree
Hide file tree
Showing 5 changed files with 325 additions and 175 deletions.
3 changes: 3 additions & 0 deletions util/java/libtiled-java/README
Expand Up @@ -30,3 +30,6 @@ $ mvn clean install

To run all unit-tests, run the following command:
$ mvn test

To generate reports and documentation, run:
$ mvn site
317 changes: 149 additions & 168 deletions util/java/libtiled-java/pom.xml
Expand Up @@ -2,55 +2,20 @@
<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>

<parent>
<groupId>org.mapeditor</groupId>
<artifactId>tiled</artifactId>
<version>0.17-SNAPSHOT</version>
</parent>

<groupId>org.mapeditor</groupId>
<artifactId>libtiled</artifactId>
<version>0.17-SNAPSHOT</version>
<packaging>jar</packaging>

<name>libtiled</name>
<description>
A small Java library to load Tiled maps.
</description>
<url>http://www.mapeditor.org/</url>
<inceptionYear>2004</inceptionYear>
<organization>
<name>Thorbjørn Lindeijer &lt;thorbjorn@lindeijer.nl&gt;</name>
<url>${project.url}</url>
</organization>
<licenses>
<license>
<name>New BSD License</name>
<url>https://raw.githubusercontent.com/bjorn/tiled/master/LICENSE.BSD</url>
</license>
</licenses>

<developers>
<developer>
<id>bjorn</id>
<name>Thorbjørn Lindeijer</name>
<email>thorbjorn@lindeijer.nl</email>
</developer>
<developer>
<id>adamturk</id>
<name>Adam Turk</name>
<email>aturk@biggeruniverse.com</email>
</developer>
<developer>
<id>mikepthomas</id>
<name>Mike Thomas</name>
<email>mikepthomas@outlook.com</email>
</developer>
</developers>

<scm>
<url>https://github.com/mikepthomas/tiled</url>
<connection>scm:git:git://github.com/bjorn/tiled.git</connection>
<developerConnection>scm:git:git@github.com:bjorn/tiled.git</developerConnection>
</scm>
<issueManagement>
<url>https://github.com/bjorn/tiled/issues</url>
<system>GitHub Issues</system>
</issueManagement>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand All @@ -66,106 +31,9 @@
<scope>test</scope>
</dependency>
</dependencies>

<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.8</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.6</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
<version>3.0.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.5.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.10</version>
</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-install-plugin</artifactId>
<version>2.5.2</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.0.2</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.10.4</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.5.3</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.0.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>3.5.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.19.1</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>license-maven-plugin</artifactId>
<version>1.9</version>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<inherited>true</inherited>
<configuration>
<showDeprecation>true</showDeprecation>
<source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<executions>
<execution>
<id>jar</id>
<goals>
<goal>jar</goal>
</goals>
<phase>package</phase>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
Expand All @@ -181,30 +49,6 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>license-maven-plugin</artifactId>
<configuration>
<addJavaLicenseAfterPackage>false</addJavaLicenseAfterPackage>
<licenseName>bsd_2</licenseName>
</configuration>
<executions>
<execution>
<id>update-file-header</id>
<goals>
<goal>update-file-header</goal>
</goals>
<phase>process-sources</phase>
</execution>
<execution>
<id>download-licenses</id>
<goals>
<goal>download-licenses</goal>
</goals>
<phase>prepare-package</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>

Expand All @@ -218,7 +62,7 @@
<displayChangeSetDetailUrl>${project.scm.url}/commit/%REV%</displayChangeSetDetailUrl>
<displayFileDetailUrl>${project.scm.url}/%FILE%</displayFileDetailUrl>
<displayFileRevDetailUrl>${project.scm.url}/blob/%REV%/%FILE%</displayFileRevDetailUrl>
<outputEncoding>${project.reporting.outputEncoding}</outputEncoding>
<outputEncoding>${project.build.sourceEncoding}</outputEncoding>
</configuration>
<reportSets>
<reportSet>
Expand Down Expand Up @@ -270,15 +114,15 @@
<reportSet>
<reports>
<report>index</report>
<!--report>modules</report-->
<report>modules</report>
<report>plugin-management</report>
<!--report>distribution-management</report-->
<report>distribution-management</report>
<report>dependency-info</report>
<report>dependency-convergence</report>
<report>scm</report>
<!--report>mailing-list</report-->
<!--report>issue-tracking</report-->
<!--report>cim</report-->
<report>issue-tracking</report>
<report>cim</report>
<report>plugins</report>
<report>license</report>
<report>project-team</report>
Expand Down Expand Up @@ -373,4 +217,141 @@
</plugin>
</plugins>
</reporting>

<profiles>
<profile>
<id>debug-profile</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<executions>
<execution>
<id>default-testCompile</id>
<phase>test-compile</phase>
<goals>
<goal>testCompile</goal>
</goals>
<configuration>
<skip>true</skip>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skipTests>true</skipTests>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>release-profile</id>
<activation>
<property>
<name>performRelease</name>
<value>true</value>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<configuration>
<updateReleaseInfo>true</updateReleaseInfo>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<quiet>true</quiet>
<show>public</show>
</configuration>
<executions>
<execution>
<goals>
<goal>test-jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skipTests>false</skipTests>
</configuration>
</plugin>
<plugin>
<inherited>true</inherited>
<artifactId>maven-source-plugin</artifactId>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
<goal>test-jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>license-maven-plugin</artifactId>
<configuration>
<addJavaLicenseAfterPackage>false</addJavaLicenseAfterPackage>
<licenseFile>${project.basedir}/src/COPYING</licenseFile>
<licenseName>bsd_2</licenseName>
<thirdPartyFilename>LICENSE</thirdPartyFilename>
</configuration>
<executions>
<execution>
<id>update-file-header</id>
<goals>
<goal>update-file-header</goal>
</goals>
<phase>process-sources</phase>
</execution>
<execution>
<id>download-licenses</id>
<goals>
<goal>download-licenses</goal>
</goals>
<phase>prepare-package</phase>
</execution>
<execution>
<id>add-third-party</id>
<goals>
<goal>add-third-party</goal>
</goals>
<phase>prepare-package</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>

0 comments on commit 78fa810

Please sign in to comment.