mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-11-16 07:15:16 +01:00
Maven cleaup
This commit is contained in:
parent
09c3e7bf22
commit
7f91b739f2
152
pom.xml
152
pom.xml
@ -11,8 +11,7 @@
|
||||
<name>AuthMeReloaded</name>
|
||||
<description>The first authentication plugin for the Bukkit API!</description>
|
||||
<inceptionYear>2013</inceptionYear>
|
||||
<url>http://dev.bukkit.org/bukkit-plugins/authme-reloaded/</url>
|
||||
<!-- See also: https://www.spigotmc.org/resources/authme-reloaded.6269/ -->
|
||||
<url>https://github.com/AuthMe/AuthMeReloaded</url>
|
||||
|
||||
<organization>
|
||||
<name>AuthMe-Team</name>
|
||||
@ -55,31 +54,31 @@
|
||||
</licenses>
|
||||
|
||||
<properties>
|
||||
<!-- Project properties -->
|
||||
<!-- Build cycle properties -->
|
||||
<project.skipExtendedHashTests>false</project.skipExtendedHashTests>
|
||||
|
||||
<!-- Environment properties -->
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
<jdk.version>1.8</jdk.version>
|
||||
<java.version>1.8</java.version>
|
||||
<maven.minimumVersion>3.3.9</maven.minimumVersion>
|
||||
|
||||
<!-- Output properties -->
|
||||
<!-- Dependencies versions -->
|
||||
<spigot.version>1.13.1-R0.1-SNAPSHOT</spigot.version>
|
||||
|
||||
<!-- Versioning properties -->
|
||||
<project.outputName>AuthMe</project.outputName>
|
||||
<project.buildNumber>CUSTOM</project.buildNumber>
|
||||
<project.skipExtendedHashTests>false</project.skipExtendedHashTests>
|
||||
<project.versionCode>${project.version}-b${project.buildNumber}</project.versionCode>
|
||||
<project.finalNameBase>${project.outputName}-${project.version}</project.finalNameBase>
|
||||
|
||||
<!-- BukkitPlugin properties -->
|
||||
<bukkitplugin.name>${project.outputName}</bukkitplugin.name>
|
||||
<bukkitplugin.version>${project.versionCode}</bukkitplugin.version>
|
||||
<bukkitplugin.main>${project.groupId}.${project.artifactId}.${bukkitplugin.name}</bukkitplugin.main>
|
||||
<bukkitplugin.authors>Xephi, sgdc3, DNx5, timvisee, games647, ljacqu, Gnat008</bukkitplugin.authors>
|
||||
|
||||
<!-- Change Bukkit Version HERE! -->
|
||||
<bukkit.version>1.13-R0.1-SNAPSHOT</bukkit.version>
|
||||
<!-- Plugin description file properties -->
|
||||
<pluginDescription.name>${project.outputName}</pluginDescription.name>
|
||||
<pluginDescription.version>${project.versionCode}</pluginDescription.version>
|
||||
<pluginDescription.main>${project.groupId}.${project.artifactId}.${pluginDescription.name}</pluginDescription.main>
|
||||
<pluginDescription.authors>Xephi, sgdc3, DNx5, timvisee, games647, ljacqu, Gnat008</pluginDescription.authors>
|
||||
</properties>
|
||||
|
||||
<prerequisites>
|
||||
<maven>3.3.9</maven>
|
||||
</prerequisites>
|
||||
|
||||
<!-- Jenkins profile -->
|
||||
<profiles>
|
||||
<!-- Set the buildNumber using the jenkins env. variable -->
|
||||
@ -109,8 +108,9 @@
|
||||
</profiles>
|
||||
|
||||
<build>
|
||||
<defaultGoal>clean install</defaultGoal>
|
||||
<finalName>${project.outputName}-${project.version}-noshade</finalName>
|
||||
<defaultGoal>clean package</defaultGoal>
|
||||
<!-- Little hack to make the shade plugin output a file with the right name -->
|
||||
<finalName>${project.finalNameBase}-noshade</finalName>
|
||||
|
||||
<resources>
|
||||
<resource>
|
||||
@ -132,25 +132,51 @@
|
||||
</resources>
|
||||
|
||||
<plugins>
|
||||
<!-- Enforce build environment -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-enforcer-plugin</artifactId>
|
||||
<version>1.4.1</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>enforce-environment</id>
|
||||
<goals>
|
||||
<goal>enforce</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<rules>
|
||||
<requireMavenVersion>
|
||||
<version>3.3.9</version>
|
||||
</requireMavenVersion>
|
||||
</rules>
|
||||
<fail>true</fail>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<!-- Clean the target folder content -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-clean-plugin</artifactId>
|
||||
<version>3.1.0</version>
|
||||
</plugin>
|
||||
<!-- Include resource files -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-resources-plugin</artifactId>
|
||||
<version>3.1.0</version>
|
||||
</plugin>
|
||||
<!-- Compile and include classes -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.8.0</version>
|
||||
<configuration>
|
||||
<source>${jdk.version}</source>
|
||||
<target>${jdk.version}</target>
|
||||
<source>${java.version}</source>
|
||||
<target>${java.version}</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<!-- Generate test coverage reports -->
|
||||
<plugin>
|
||||
<groupId>org.jacoco</groupId>
|
||||
<artifactId>jacoco-maven-plugin</artifactId>
|
||||
@ -170,6 +196,7 @@
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<!-- Unit testing -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
@ -181,17 +208,24 @@
|
||||
<systemPropertyVariables>
|
||||
<project.skipExtendedHashTests>${project.skipExtendedHashTests}</project.skipExtendedHashTests>
|
||||
</systemPropertyVariables>
|
||||
<!-- Don't trim stack traces -->
|
||||
<trimStackTrace>false</trimStackTrace>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<!-- Generate a jar containing classes and resources -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
<version>3.1.0</version>
|
||||
</plugin>
|
||||
<!-- Generate a jar containing the source javadoc -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-javadoc-plugin</artifactId>
|
||||
<version>3.0.1</version>
|
||||
<configuration>
|
||||
<finalName>${project.finalNameBase}</finalName>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>attach-javadoc</id>
|
||||
@ -199,23 +233,16 @@
|
||||
<goal>jar</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>aggregate-javadoc</id>
|
||||
<goals>
|
||||
<goal>aggregate</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
<configuration>
|
||||
<finalName>${project.outputName}-${project.version}</finalName>
|
||||
<show>public</show>
|
||||
<failOnError>false</failOnError>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<!-- Generate a jar containing the java sources -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-source-plugin</artifactId>
|
||||
<version>3.0.1</version>
|
||||
<configuration>
|
||||
<finalName>${project.finalNameBase}</finalName>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>attach-sources</id>
|
||||
@ -224,10 +251,8 @@
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
<configuration>
|
||||
<finalName>${project.outputName}-${project.version}</finalName>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<!-- Generate a jar containing classes, resources and shaded libraries -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-shade-plugin</artifactId>
|
||||
@ -241,9 +266,12 @@
|
||||
</execution>
|
||||
</executions>
|
||||
<configuration>
|
||||
<!-- Don't create the reduced pom file, as we don't deploy the shaded jar -->
|
||||
<createDependencyReducedPom>false</createDependencyReducedPom>
|
||||
<!-- Deploy the non shaded jar as main artifact -->
|
||||
<shadedArtifactAttached>true</shadedArtifactAttached>
|
||||
<finalName>${project.outputName}-${project.version}</finalName>
|
||||
<!-- Use the base jar name, to help server owners download the right jar -->
|
||||
<finalName>${project.finalNameBase}</finalName>
|
||||
|
||||
<!--
|
||||
Relocate all lib we use in order to fix class loading errors if we use different versions
|
||||
@ -299,15 +327,15 @@
|
||||
<pattern>at.favre.lib</pattern>
|
||||
<shadedPattern>fr.xephi.authme.libs.at.favre.lib</shadedPattern>
|
||||
</relocation>
|
||||
<relocation>
|
||||
<pattern>org.postgresql</pattern>
|
||||
<shadedPattern>fr.xephi.authme.libs.org.postgresql</shadedPattern>
|
||||
</relocation>
|
||||
<!-- bStats metrics class -->
|
||||
<relocation>
|
||||
<pattern>org.bstats</pattern>
|
||||
<shadedPattern>fr.xephi.authme.libs.org.bstats</shadedPattern>
|
||||
</relocation>
|
||||
<relocation>
|
||||
<pattern>org.postgresql</pattern>
|
||||
<shadedPattern>fr.xephi.authme.libs.org.postgresql</shadedPattern>
|
||||
</relocation>
|
||||
</relocations>
|
||||
<filters>
|
||||
<!-- Ignore manifest signatures for shading the project into an uber-jar to fix -->
|
||||
@ -323,27 +351,31 @@
|
||||
</filters>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<!-- Install the jars as artifacts into the local repository -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-install-plugin</artifactId>
|
||||
<version>2.5.2</version>
|
||||
</plugin>
|
||||
<!-- Deploy the jars as artifacts into the remote repository -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-deploy-plugin</artifactId>
|
||||
<version>2.8.2</version>
|
||||
</plugin>
|
||||
<!-- Handle documentation generation, required by other plugins -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-site-plugin</artifactId>
|
||||
<version>3.7.1</version>
|
||||
</plugin>
|
||||
<!-- Publish coveralls test coverage reports, not included in the build cycle by default -->
|
||||
<plugin>
|
||||
<groupId>org.eluder.coveralls</groupId>
|
||||
<artifactId>coveralls-maven-plugin</artifactId>
|
||||
<version>4.3.0</version>
|
||||
<configuration>
|
||||
<!-- The secret token is provided with a command-line parameter! -->
|
||||
<!-- The secret token is provided with a command-line parameter -->
|
||||
<failOnServiceError>false</failOnServiceError>
|
||||
</configuration>
|
||||
</plugin>
|
||||
@ -357,10 +389,16 @@
|
||||
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots</url>
|
||||
</repository>
|
||||
|
||||
<!-- Essentials Repo -->
|
||||
<!-- CodeMC Repo (Contains many required libraries) -->
|
||||
<repository>
|
||||
<id>ess-repo</id>
|
||||
<url>http://repo.ess3.net/content/groups/essentials</url>
|
||||
<id>codemc-repo</id>
|
||||
<url>https://repo.codemc.org/repository/maven-public/</url>
|
||||
</repository>
|
||||
|
||||
<!-- EssentialsX Repo -->
|
||||
<repository>
|
||||
<id>enderzone-repo</id>
|
||||
<url>https://ci.ender.zone/plugin/repository/everything</url>
|
||||
</repository>
|
||||
|
||||
<!-- ProtocolLib Repo -->
|
||||
@ -381,12 +419,6 @@
|
||||
<url>http://nexus.hc.to/content/repositories/pub_releases</url>
|
||||
</repository>
|
||||
|
||||
<!-- Our Repo (Many libs) -->
|
||||
<repository>
|
||||
<id>codemc-repo</id>
|
||||
<url>https://repo.codemc.org/repository/maven-public/</url>
|
||||
</repository>
|
||||
|
||||
<!-- bStats Repo -->
|
||||
<repository>
|
||||
<id>bstats-repo</id>
|
||||
@ -511,7 +543,7 @@
|
||||
<dependency>
|
||||
<groupId>org.spigotmc</groupId>
|
||||
<artifactId>spigot-api</artifactId>
|
||||
<version>${bukkit.version}</version>
|
||||
<version>${spigot.version}</version>
|
||||
<scope>provided</scope>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
@ -766,22 +798,12 @@
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<!-- Essentials plugin -->
|
||||
<!-- EssentialsX plugin -->
|
||||
<dependency>
|
||||
<groupId>net.ess3</groupId>
|
||||
<artifactId>Essentials</artifactId>
|
||||
<version>2.13.1</version>
|
||||
<artifactId>EssentialsX</artifactId>
|
||||
<version>2.15.0</version>
|
||||
<scope>provided</scope>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.bukkit</groupId>
|
||||
<artifactId>bukkit</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>org.bukkit</groupId>
|
||||
<artifactId>craftbukkit</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<!-- BCrypt implementation -->
|
||||
|
@ -75,6 +75,8 @@ public class SQLite extends AbstractSqlDataSource {
|
||||
|
||||
/**
|
||||
* Initializes the connection to the SQLite database.
|
||||
*
|
||||
* @throws SQLException when an SQL error occurs while connecting
|
||||
*/
|
||||
protected void connect() throws SQLException {
|
||||
try {
|
||||
@ -90,6 +92,8 @@ public class SQLite extends AbstractSqlDataSource {
|
||||
|
||||
/**
|
||||
* Creates the table if necessary, or adds any missing columns to the table.
|
||||
*
|
||||
* @throws SQLException when an SQL error occurs while initializing the database
|
||||
*/
|
||||
@VisibleForTesting
|
||||
protected void setup() throws SQLException {
|
||||
|
@ -1,9 +1,9 @@
|
||||
name: ${bukkitplugin.name}
|
||||
authors: [${bukkitplugin.authors}]
|
||||
name: ${pluginDescription.name}
|
||||
authors: [${pluginDescription.authors}]
|
||||
website: ${project.url}
|
||||
description: ${project.description}
|
||||
main: ${bukkitplugin.main}
|
||||
version: ${bukkitplugin.version}
|
||||
main: ${pluginDescription.main}
|
||||
version: ${pluginDescription.version}
|
||||
api-version: 1.13
|
||||
softdepend:
|
||||
- Vault
|
||||
|
Loading…
Reference in New Issue
Block a user