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

View File

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