Merge pull request #1915 from Foorack/master

Fix maven compilation
This commit is contained in:
Alexander Söderberg 2018-04-09 17:05:27 +02:00 committed by GitHub
commit 0c7be7e11d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 14 deletions

View File

@ -13,16 +13,25 @@ public class PlotVersion {
this.year = Integer.parseInt(date[0]);
this.month = Integer.parseInt(date[1]);
this.day = Integer.parseInt(date[2]);
this.hash = Integer.parseInt(split[1], 16);
this.build = Integer.parseInt(split[2]);
if(split[1].equals("SNAPSHOT")) { // fallback when compiling with Maven
this.hash = 0;
this.build = 0;
} else {
this.hash = Integer.parseInt(split[1], 16);
this.build = Integer.parseInt(split[2]);
}
}
@Override
public String toString() {
return "PlotSquared-" + year + "." + month + "." + day + "-" + Integer.toHexString(hash) + "-" + build;
if(hash == 0 && build == 0) {
return "PlotSquared-" + year + "." + month + "." + day + "-SNAPSHOT";
} else {
return "PlotSquared-" + year + "." + month + "." + day + "-" + Integer.toHexString(hash) + "-" + build;
}
}
public boolean isNewer(PlotVersion other) {
return other.build < this.build;
}
}
}

14
pom.xml
View File

@ -12,7 +12,7 @@
<packaging>jar</packaging>
<build>
<finalName>PlotSquared-Bukkit-${project.version}</finalName>
<sourceDirectory>Bukkit/src/main/java</sourceDirectory>
<sourceDirectory>Bukkit/src</sourceDirectory>
<resources>
<resource>
<filtering>true</filtering>
@ -22,7 +22,7 @@
<directory>Bukkit/src/main/resources/</directory>
</resource>
<resource>
<filtering>false</filtering>
<filtering>true</filtering>
<includes>
<include>**/*.*</include>
</includes>
@ -52,7 +52,7 @@
</goals>
<configuration>
<sources>
<source>Core/src/main/java</source>
<source>Core/src</source>
</sources>
</configuration>
</execution>
@ -82,7 +82,7 @@
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.11-R0.1-SNAPSHOT</version>
<version>1.12-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
@ -97,12 +97,6 @@
<artifactId>VaultAPI</artifactId>
<version>1.5</version>
<scope>provided</scope>
<exclusions>
<exclusion>
<groupId>org.bukkit</groupId>
<artifactId>bukkit</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
</project>