Fix the deploy system

This commit is contained in:
sgdc3 2018-01-29 15:08:59 +01:00
parent a76eee5965
commit a92084ec60
3 changed files with 105 additions and 45 deletions

141
pom.xml
View File

@ -35,6 +35,17 @@
<url>https://github.com/AuthMe/AuthMeReloaded/issues</url> <url>https://github.com/AuthMe/AuthMeReloaded/issues</url>
</issueManagement> </issueManagement>
<distributionManagement>
<snapshotRepository>
<id>codemc-snapshots</id>
<url>https://repo.codemc.org/repository/maven-snapshots/</url>
</snapshotRepository>
<repository>
<id>codemc-releases</id>
<url>https://repo.codemc.org/repository/maven-releases/</url>
</repository>
</distributionManagement>
<licenses> <licenses>
<license> <license>
<name>The GNU General Public Licence version 3 (GPLv3)</name> <name>The GNU General Public Licence version 3 (GPLv3)</name>
@ -46,15 +57,17 @@
<properties> <properties>
<!-- Project properties --> <!-- Project properties -->
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<jdk.version>1.8</jdk.version> <jdk.version>1.8</jdk.version>
<!-- Output properties --> <!-- Output properties -->
<project.outputName>AuthMe</project.outputName>
<project.buildNumber>CUSTOM</project.buildNumber> <project.buildNumber>CUSTOM</project.buildNumber>
<project.skipExtendedHashTests>false</project.skipExtendedHashTests> <project.skipExtendedHashTests>false</project.skipExtendedHashTests>
<project.versionCode>${project.version}-b${project.buildNumber}</project.versionCode> <project.versionCode>${project.version}-b${project.buildNumber}</project.versionCode>
<!-- BukkitPlugin properties --> <!-- BukkitPlugin properties -->
<bukkitplugin.name>AuthMe</bukkitplugin.name> <bukkitplugin.name>${project.outputName}</bukkitplugin.name>
<bukkitplugin.version>${project.versionCode}</bukkitplugin.version> <bukkitplugin.version>${project.versionCode}</bukkitplugin.version>
<bukkitplugin.main>${project.groupId}.${project.artifactId}.${bukkitplugin.name}</bukkitplugin.main> <bukkitplugin.main>${project.groupId}.${project.artifactId}.${bukkitplugin.name}</bukkitplugin.main>
<bukkitplugin.authors>Xephi, sgdc3, DNx5, timvisee, games647, ljacqu, Gnat008</bukkitplugin.authors> <bukkitplugin.authors>Xephi, sgdc3, DNx5, timvisee, games647, ljacqu, Gnat008</bukkitplugin.authors>
@ -92,6 +105,9 @@
</profiles> </profiles>
<build> <build>
<defaultGoal>clean install</defaultGoal>
<finalName>${project.outputName}-${project.version}</finalName>
<resources> <resources>
<resource> <resource>
<directory>.</directory> <directory>.</directory>
@ -112,7 +128,16 @@
</resources> </resources>
<plugins> <plugins>
<!-- Maven Java Compiler --> <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-resources-plugin</artifactId>
<version>3.0.2</version>
</plugin>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId> <artifactId>maven-compiler-plugin</artifactId>
@ -122,7 +147,25 @@
<target>${jdk.version}</target> <target>${jdk.version}</target>
</configuration> </configuration>
</plugin> </plugin>
<!-- Test Plugin --> <plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.0</version>
<executions>
<execution>
<id>pre-unit-test</id>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>post-unit-test</id>
<goals>
<goal>report</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId> <artifactId>maven-surefire-plugin</artifactId>
@ -135,13 +178,47 @@
</systemPropertyVariables> </systemPropertyVariables>
</configuration> </configuration>
</plugin> </plugin>
<!-- Libs Shading and Relocation --> <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>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>aggregate</goal>
<goal>jar</goal>
</goals>
</execution>
</executions>
<configuration>
<show>public</show>
<failOnError>false</failOnError>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.0.1</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId> <artifactId>maven-shade-plugin</artifactId>
<version>3.1.0</version> <version>3.1.0</version>
<executions> <executions>
<!-- Run shade goal on package phase -->
<execution> <execution>
<phase>package</phase> <phase>package</phase>
<goals> <goals>
@ -206,48 +283,36 @@
</relocations> </relocations>
</configuration> </configuration>
</plugin> </plugin>
<!-- Coverage report generator -->
<plugin> <plugin>
<groupId>org.jacoco</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>jacoco-maven-plugin</artifactId> <artifactId>maven-install-plugin</artifactId>
<version>0.8.0</version> <version>2.5.2</version>
<executions> <configuration>
<execution> <pomFile>pom.xml</pomFile>
<id>prepare-agent</id> <file>original-${project.outputName}.jar</file>
<goals> <javadoc>${project.outputName}-javadoc.jar</javadoc>
<goal>prepare-agent</goal> <sources>${project.outputName}-sources.jar</sources>
</goals> </configuration>
</execution> </plugin>
</executions> <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
<configuration>
<pomFile>pom.xml</pomFile>
<file>original-${project.outputName}.jar</file>
<javadoc>${project.outputName}-javadoc.jar</javadoc>
<sources>${project.outputName}-sources.jar</sources>
</configuration>
</plugin> </plugin>
<!-- Coverage report uploader -->
<plugin> <plugin>
<groupId>org.eluder.coveralls</groupId> <groupId>org.eluder.coveralls</groupId>
<artifactId>coveralls-maven-plugin</artifactId> <artifactId>coveralls-maven-plugin</artifactId>
<version>4.3.0</version> <version>4.3.0</version>
<configuration> <configuration>
<!-- The secret token is provided with a command-line parameter! -->
<failOnServiceError>false</failOnServiceError> <failOnServiceError>false</failOnServiceError>
</configuration> </configuration>
<!-- The secret token is provided with a command-line parameter! -->
</plugin>
<!-- JavaDocs generator -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.10.4</version>
<configuration>
<show>public</show>
<failOnError>false</failOnError>
</configuration>
<executions>
<execution>
<id>attach-javadocs</id>
<phase>deploy</phase>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin> </plugin>
</plugins> </plugins>
</build> </build>

View File

@ -41,6 +41,7 @@ public class SQLite implements DataSource {
* Constructor for SQLite. * Constructor for SQLite.
* *
* @param settings The settings instance * @param settings The settings instance
* @param dataFolder The data folder
* *
* @throws SQLException when initialization of a SQL datasource failed * @throws SQLException when initialization of a SQL datasource failed
*/ */

View File

@ -50,14 +50,8 @@ public class PermissionsManager implements Reloadable {
*/ */
private PermissionHandler handler = null; private PermissionHandler handler = null;
/**
* Constructor.
*
* @param server Server instance
* @param pluginManager Bukkit plugin manager
*/
@Inject @Inject
public PermissionsManager(Server server, PluginManager pluginManager, Settings settings) { PermissionsManager(Server server, PluginManager pluginManager, Settings settings) {
this.server = server; this.server = server;
this.pluginManager = pluginManager; this.pluginManager = pluginManager;
this.settings = settings; this.settings = settings;