Pom enhancements

This commit is contained in:
Gabriele C 2016-05-04 17:12:14 +02:00
parent 2f76e06373
commit 39aaef8f8a
2 changed files with 81 additions and 98 deletions

173
pom.xml
View File

@ -21,9 +21,9 @@
</organization>
<scm>
<connection>scm:git:https://github.com/Xephi/AuthMeReloaded.git</connection>
<developerConnection>scm:git:git@github.com:Xephi/AuthMeReloaded.git</developerConnection>
<url>https://github.com/Xephi/AuthMeReloaded</url>
<connection>scm:git:https://github.com/AuthMe-Team/AuthMeReloaded.git</connection>
<developerConnection>scm:git:git@github.com:AuthMe-Team/AuthMeReloaded.git</developerConnection>
<url>https://github.com/AuthMe-Team/AuthMeReloaded</url>
</scm>
<ciManagement>
@ -49,22 +49,21 @@
</prerequisites>
<properties>
<!-- Project Properties -->
<projectEncoding>UTF-8</projectEncoding>
<project.build.sourceEncoding>${projectEncoding}</project.build.sourceEncoding>
<project.build.outputEncoding>${projectEncoding}</project.build.outputEncoding>
<jdkVersion>1.7</jdkVersion>
<testJreVersion>1.7</testJreVersion>
<!-- Project properties -->
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.jdkVersion>1.7</project.jdkVersion>
<!-- Output properties -->
<pluginName>AuthMe</pluginName>
<jarName>${pluginName}-${project.version}</jarName>
<mainClass>${project.groupId}.${project.artifactId}.${pluginName}</mainClass>
<pluginAuthors>Xephi, sgdc3, DNx5, timvisee, games647, ljacqu</pluginAuthors>
<buildNumber>Unknown</buildNumber>
<project.buildNumber>CUSTOM</project.buildNumber>
<project.outputFile>${pluginName}-${project.version}</project.outputFile>
<!-- BukkitPlugin properties -->
<bukkitplugin.name>AuthMe</bukkitplugin.name>
<bukkitplugin.main>${project.groupId}.${project.artifactId}.${pluginName}</bukkitplugin.main>
<bukkitplugin.authors>Xephi, sgdc3, DNx5, timvisee, games647, ljacqu</bukkitplugin.authors>
<!-- Change Bukkit Version HERE! -->
<bukkitVersion>1.9.2-R0.1-SNAPSHOT</bukkitVersion>
<bukkit.version>1.9.2-R0.1-SNAPSHOT</bukkit.version>
</properties>
<!-- Jenkins profile (add the real buildNumber to the version string) -->
@ -77,47 +76,32 @@
</property>
</activation>
<properties>
<buildNumber>${env.BUILD_NUMBER}</buildNumber>
<project.buildNumber>${env.BUILD_NUMBER}</project.buildNumber>
</properties>
</profile>
</profiles>
<build>
<finalName>${jarName}-noshade</finalName>
<sourceDirectory>src/main/java</sourceDirectory>
<testSourceDirectory>src/test/java</testSourceDirectory>
<finalName>${project.buildNumber}-noshade</finalName>
<resources>
<resource>
<targetPath>.</targetPath>
<filtering>false</filtering>
<directory>.</directory>
<filtering>false</filtering>
<includes>
<include>LICENSE</include>
</includes>
</resource>
<resource>
<targetPath>.</targetPath>
<filtering>true</filtering>
<directory>src/main/resources/</directory>
<includes>
<include>*</include>
</includes>
<filtering>true</filtering>
</resource>
<resource>
<directory>src/main/resources/messages/</directory>
<targetPath>./messages/</targetPath>
<filtering>false</filtering>
<directory>src/main/resources/messages/</directory>
<includes>
<include>*.yml</include>
</includes>
</resource>
</resources>
<testResources>
<testResource>
<directory>src/test/resources</directory>
</testResource>
</testResources>
<plugins>
<!-- Maven Java Compiler -->
@ -126,10 +110,8 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>3.5.1</version>
<configuration>
<source>${jdkVersion}</source>
<target>${jdkVersion}</target>
<testSource>${testJreVersion}</testSource>
<testTarget>${testJreVersion}</testTarget>
<source>${project.jdkVersion}</source>
<target>${project.jdkVersion}</target>
</configuration>
</plugin>
<!-- Test Plugin -->
@ -138,21 +120,27 @@
<artifactId>maven-surefire-plugin</artifactId>
<version>2.19.1</version>
<configuration>
<argLine>-Dfile.encoding=${projectEncoding} ${argLine}</argLine>
<argLine>-Dfile.encoding=${project.build.sourceEncoding} ${argLine}</argLine>
</configuration>
</plugin>
<!-- Libs Shading and Relocation -->
<plugin>
<!--Relocate all lib we use in order to fix class loading errors if we use different versions
than already loaded libs (i.e. by Mojang -> gson)-->
<!--
Relocate all lib we use in order to fix class loading errors if we use different versions
than already loaded libs (i.e. by Mojang -> gson)
-->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>2.4.3</version>
<configuration>
<createDependencyReducedPom>false</createDependencyReducedPom>
<!--
Let's try to remove this!
<minimizeJar>false</minimizeJar>
-->
</configuration>
<executions>
<!-- Spigot 1.8+ -->
<execution>
<id>spigot-shade</id>
<phase>package</phase>
@ -160,6 +148,7 @@
<goal>shade</goal>
</goals>
<configuration>
<!-- Exclude guava (already included into spigot) -->
<artifactSet>
<excludes>
<exclude>com.google.guava:guava</exclude>
@ -196,6 +185,7 @@
<outputFile>target/${jarName}-spigot.jar</outputFile>
</configuration>
</execution>
<!-- 1.7.10 and lower -->
<execution>
<id>legacy-shade</id>
<phase>package</phase>
@ -354,19 +344,6 @@
<scope>compile</scope>
<optional>true</optional>
</dependency>
<!-- JDBC drivers for datasource integration tests -->
<dependency>
<groupId>org.xerial</groupId>
<artifactId>sqlite-jdbc</artifactId>
<version>3.8.11.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>1.4.191</version>
<scope>test</scope>
</dependency>
<!-- Log4J Logger (required by the console filter) -->
<dependency>
@ -375,7 +352,6 @@
<!-- Can't use newer versions due to api changes! -->
<version>2.0-beta9</version>
<scope>provided</scope>
<optional>true</optional>
</dependency>
<!-- Java Email Library -->
@ -396,7 +372,7 @@
<optional>true</optional>
</dependency>
<!-- Guava (required to provide 1.7.10 and below compatibility) -->
<!-- Guava (the version provided by the latest bukkit version) -->
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
@ -405,11 +381,15 @@
<optional>true</optional>
</dependency>
<!-- javax.inject API -->
<!-- TODO: relocate!!!!!!!!!!!!!!!!!!!! -->
<dependency>
<groupId>javax.inject</groupId>
<artifactId>javax.inject</artifactId>
<version>1</version>
<scope>compile</scope>
<optional>true</optional>
</dependency>
<!-- Maxmind GeoIp API -->
@ -440,9 +420,8 @@
<dependency>
<groupId>org.bukkit</groupId>
<artifactId>bukkit</artifactId>
<version>${bukkitVersion}</version>
<version>${bukkit.version}</version>
<scope>provided</scope>
<optional>true</optional>
<exclusions>
<exclusion>
<artifactId>junit</artifactId>
@ -473,7 +452,6 @@
<artifactId>ProtocolLib</artifactId>
<version>3.6.5-SNAPSHOT</version>
<scope>provided</scope>
<optional>true</optional>
<exclusions>
<exclusion>
<artifactId>cglib-nodep</artifactId>
@ -590,7 +568,6 @@
<artifactId>craftbukkit</artifactId>
</exclusion>
</exclusions>
<optional>true</optional>
</dependency>
<!-- Multi World plugin, http://www.spigotmc.org/resources/multiverse-core.390/ -->
@ -646,7 +623,6 @@
<groupId>junit</groupId>
</exclusion>
</exclusions>
<optional>true</optional>
</dependency>
<!-- Essentials plugin -->
@ -665,7 +641,6 @@
<artifactId>craftbukkit</artifactId>
</exclusion>
</exclusions>
<optional>true</optional>
</dependency>
<!-- Anti-PvPLogging plugin, https://github.com/MinelinkNetwork/CombatTagPlus -->
@ -740,7 +715,6 @@
<groupId>org.mcstats.bukkit</groupId>
</exclusion>
</exclusions>
<optional>true</optional>
</dependency>
<!-- XAuth, another authentication plugin, required by the database converter -->
@ -783,36 +757,6 @@
<groupId>org.apache.logging.log4j</groupId>
</exclusion>
</exclusions>
<optional>true</optional>
</dependency>
<!-- Unit Testing Libraries -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
<version>4.12</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>java-hamcrest</artifactId>
<scope>test</scope>
<version>2.0.0.0</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<scope>test</scope>
<version>2.0.5-beta</version>
<optional>true</optional>
<exclusions>
<exclusion>
<artifactId>hamcrest-core</artifactId>
<groupId>org.hamcrest</groupId>
</exclusion>
</exclusions>
</dependency>
<!-- String comparison library. Used for dynamic help system. -->
@ -823,5 +767,44 @@
<scope>compile</scope>
<optional>true</optional>
</dependency>
<!-- Unit Testing Libraries -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
<version>4.12</version>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>java-hamcrest</artifactId>
<scope>test</scope>
<version>2.0.0.0</version>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<scope>test</scope>
<version>2.0.5-beta</version>
<exclusions>
<exclusion>
<artifactId>hamcrest-core</artifactId>
<groupId>org.hamcrest</groupId>
</exclusion>
</exclusions>
</dependency>
<!-- JDBC drivers for datasource integration tests -->
<dependency>
<groupId>org.xerial</groupId>
<artifactId>sqlite-jdbc</artifactId>
<version>3.8.11.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>1.4.191</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>

View File

@ -1,8 +1,8 @@
name: ${pluginName}
authors: [${pluginAuthors}]
name: ${bukkitplugin.name}
authors: [${bukkitplugin.authors}]
website: ${project.url}
description: ${project.description}
main: ${mainClass}
main: ${bukkitplugin.main}
version: ${project.version}-b${buildNumber}
softdepend:
- Vault