Simplify project setup to single-module and modernize pom.xml+plugin.yml
This commit is contained in:
parent
3e9f7d2eec
commit
ea940d573d
|
@ -1,31 +1,10 @@
|
||||||
# Compiled class file
|
## JetBrains IDEs
|
||||||
*.class
|
/.idea/
|
||||||
|
|
||||||
# Log file
|
|
||||||
*.log
|
|
||||||
|
|
||||||
# BlueJ files
|
|
||||||
*.ctxt
|
|
||||||
|
|
||||||
# Mobile Tools for Java (J2ME)
|
|
||||||
.mtj.tmp/
|
|
||||||
|
|
||||||
# Package Files #
|
|
||||||
*.jar
|
|
||||||
*.war
|
|
||||||
*.nar
|
|
||||||
*.settings
|
|
||||||
*.ear
|
|
||||||
*.zip
|
|
||||||
*.tar.gz
|
|
||||||
*.rar
|
|
||||||
|
|
||||||
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
|
|
||||||
hs_err_pid*
|
|
||||||
/.gradle/
|
|
||||||
/.settings/
|
|
||||||
.idea/
|
|
||||||
build/
|
|
||||||
target/
|
|
||||||
*.iml
|
*.iml
|
||||||
/bin/
|
|
||||||
|
## Maven
|
||||||
|
/**/target/
|
||||||
|
/dependency-reduced-pom.xml
|
||||||
|
|
||||||
|
## Misc.
|
||||||
|
.DS_Store
|
||||||
|
|
|
@ -1,29 +0,0 @@
|
||||||
<project xmlns="http://maven.apache.org/POM/4.0.0">
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
|
||||||
|
|
||||||
<parent>
|
|
||||||
<groupId>com.songoda</groupId>
|
|
||||||
<artifactId>UltimateTimber</artifactId>
|
|
||||||
<version>2.3.7</version>
|
|
||||||
<relativePath>../../pom.xml</relativePath>
|
|
||||||
</parent>
|
|
||||||
|
|
||||||
<artifactId>Core</artifactId>
|
|
||||||
<packaging>jar</packaging>
|
|
||||||
|
|
||||||
<dependencies>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.spigotmc</groupId>
|
|
||||||
<artifactId>spigot-api</artifactId>
|
|
||||||
<version>1.18-R0.1-SNAPSHOT</version>
|
|
||||||
<scope>provided</scope>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.songoda</groupId>
|
|
||||||
<artifactId>SongodaCore</artifactId>
|
|
||||||
<version>2.6.19</version>
|
|
||||||
<scope>compile</scope>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
</project>
|
|
|
@ -1,123 +0,0 @@
|
||||||
<project xmlns="http://maven.apache.org/POM/4.0.0">
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
|
||||||
|
|
||||||
<parent>
|
|
||||||
<groupId>com.songoda</groupId>
|
|
||||||
<artifactId>UltimateTimber</artifactId>
|
|
||||||
<version>2.3.7</version>
|
|
||||||
<relativePath>../../pom.xml</relativePath>
|
|
||||||
</parent>
|
|
||||||
|
|
||||||
<artifactId>Plugin</artifactId>
|
|
||||||
<packaging>jar</packaging>
|
|
||||||
|
|
||||||
<build>
|
|
||||||
<finalName>${project.parent.artifactId}-${project.parent.version}</finalName>
|
|
||||||
|
|
||||||
<plugins>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-compiler-plugin</artifactId>
|
|
||||||
<version>2.3.2</version>
|
|
||||||
<configuration>
|
|
||||||
<showDeprecation>false</showDeprecation>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
|
|
||||||
<plugin>
|
|
||||||
<groupId>com.google.code.maven-replacer-plugin</groupId>
|
|
||||||
<artifactId>replacer</artifactId>
|
|
||||||
<version>1.5.3</version>
|
|
||||||
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<phase>prepare-package</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>replace</goal>
|
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
|
|
||||||
<configuration>
|
|
||||||
<file>${project.build.directory}/classes/plugin.yml</file>
|
|
||||||
|
|
||||||
<replacements>
|
|
||||||
<replacement>
|
|
||||||
<token>maven-version-number</token>
|
|
||||||
<value>${project.version}</value>
|
|
||||||
</replacement>
|
|
||||||
</replacements>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-shade-plugin</artifactId>
|
|
||||||
<version>3.3.0</version>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>shaded</id>
|
|
||||||
<phase>package</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>shade</goal>
|
|
||||||
</goals>
|
|
||||||
|
|
||||||
<configuration>
|
|
||||||
<shadedArtifactAttached>false</shadedArtifactAttached>
|
|
||||||
<createDependencyReducedPom>false</createDependencyReducedPom>
|
|
||||||
<minimizeJar>true</minimizeJar>
|
|
||||||
|
|
||||||
<artifactSet>
|
|
||||||
<includes>
|
|
||||||
<include>com.songoda:SongodaCore</include>
|
|
||||||
<include>com.songoda:Core</include>
|
|
||||||
</includes>
|
|
||||||
</artifactSet>
|
|
||||||
|
|
||||||
<filters>
|
|
||||||
<filter>
|
|
||||||
<artifact>*:*</artifact>
|
|
||||||
<excludes>
|
|
||||||
<exclude>META-INF/*.SF</exclude>
|
|
||||||
<exclude>META-INF/*.DSA</exclude>
|
|
||||||
<exclude>META-INF/*.RSA</exclude>
|
|
||||||
</excludes>
|
|
||||||
</filter>
|
|
||||||
|
|
||||||
<filter>
|
|
||||||
<artifact>com.songoda:Lootables</artifact>
|
|
||||||
<excludes>
|
|
||||||
<exclude>com/songoda/core/**</exclude>
|
|
||||||
</excludes>
|
|
||||||
</filter>
|
|
||||||
</filters>
|
|
||||||
|
|
||||||
<relocations>
|
|
||||||
<relocation>
|
|
||||||
<pattern>com.songoda.core</pattern>
|
|
||||||
<shadedPattern>${project.groupId}.ultimatetimber.core</shadedPattern>
|
|
||||||
</relocation>
|
|
||||||
</relocations>
|
|
||||||
</configuration>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</build>
|
|
||||||
|
|
||||||
<dependencies>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.spigotmc</groupId>
|
|
||||||
<artifactId>spigot-api</artifactId>
|
|
||||||
<version>1.18-R0.1-SNAPSHOT</version>
|
|
||||||
<scope>provided</scope>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>${project.groupId}</groupId>
|
|
||||||
<artifactId>Core</artifactId>
|
|
||||||
<version>${project.version}</version>
|
|
||||||
<scope>compile</scope>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
</project>
|
|
187
pom.xml
187
pom.xml
|
@ -1,17 +1,87 @@
|
||||||
<project xmlns="http://maven.apache.org/POM/4.0.0">
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
<groupId>com.songoda</groupId>
|
<groupId>com.songoda</groupId>
|
||||||
<artifactId>UltimateTimber</artifactId>
|
<artifactId>UltimateTimber</artifactId>
|
||||||
<version>2.3.7</version>
|
<version>2.3.7</version>
|
||||||
<packaging>pom</packaging>
|
|
||||||
|
|
||||||
<!-- Run 'mvn versions:set -DgenerateBackupPoms=false -DnewVersion=X.Y.Z' to update version recursively -->
|
<name>UltimateTimber</name>
|
||||||
|
<description>Give your players a new and exciting way to chop down trees</description>
|
||||||
|
<url>https://craftaro.com/marketplace/product/18</url>
|
||||||
|
|
||||||
<modules>
|
<properties>
|
||||||
<module>UltimateTimber/Core</module>
|
<maven.compiler.release>8</maven.compiler.release>
|
||||||
<module>UltimateTimber/Plugin</module>
|
<maven.compiler.target>1.8</maven.compiler.target>
|
||||||
</modules>
|
<maven.compiler.source>1.8</maven.compiler.source>
|
||||||
|
|
||||||
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
<issueManagement>
|
||||||
|
<url>https://discord.gg/craftaro</url>
|
||||||
|
<system>Discord server</system>
|
||||||
|
</issueManagement>
|
||||||
|
|
||||||
|
<scm>
|
||||||
|
<url>https://github.com/craftaro/UltimateTimber</url>
|
||||||
|
<connection>scm:git:git://github.com/craftaro/UltimateTimber.git</connection>
|
||||||
|
</scm>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-shade-plugin</artifactId>
|
||||||
|
<version>3.4.1</version>
|
||||||
|
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<phase>package</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>shade</goal>
|
||||||
|
</goals>
|
||||||
|
|
||||||
|
<configuration>
|
||||||
|
<finalName>${project.name}-${project.version}</finalName>
|
||||||
|
|
||||||
|
<shadedArtifactAttached>false</shadedArtifactAttached>
|
||||||
|
<useDependencyReducedPomInJar>true</useDependencyReducedPomInJar>
|
||||||
|
<minimizeJar>true</minimizeJar>
|
||||||
|
|
||||||
|
<relocations>
|
||||||
|
<relocation>
|
||||||
|
<pattern>com.songoda.core</pattern>
|
||||||
|
<shadedPattern>com.songoda.ultimatetimber.core</shadedPattern>
|
||||||
|
</relocation>
|
||||||
|
</relocations>
|
||||||
|
|
||||||
|
<filters>
|
||||||
|
<filter>
|
||||||
|
<artifact>*:*</artifact>
|
||||||
|
|
||||||
|
<excludes>
|
||||||
|
<exclude>META-INF/**</exclude>
|
||||||
|
<exclude>LICENSE</exclude>
|
||||||
|
<exclude>LICENSE.**</exclude>
|
||||||
|
</excludes>
|
||||||
|
</filter>
|
||||||
|
</filters>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
|
||||||
|
<resources>
|
||||||
|
<resource>
|
||||||
|
<directory>src/main/resources</directory>
|
||||||
|
<filtering>true</filtering>
|
||||||
|
</resource>
|
||||||
|
</resources>
|
||||||
|
</build>
|
||||||
|
|
||||||
<repositories>
|
<repositories>
|
||||||
<repository>
|
<repository>
|
||||||
|
@ -20,96 +90,25 @@
|
||||||
</repository>
|
</repository>
|
||||||
|
|
||||||
<repository>
|
<repository>
|
||||||
<id>spigot-repo</id>
|
<id>SpigotMC</id>
|
||||||
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
|
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
|
||||||
</repository>
|
</repository>
|
||||||
|
|
||||||
<repository>
|
|
||||||
<id>jitpack.io</id>
|
|
||||||
<url>https://jitpack.io</url>
|
|
||||||
</repository>
|
|
||||||
</repositories>
|
</repositories>
|
||||||
|
|
||||||
<pluginRepositories>
|
<dependencies>
|
||||||
<pluginRepository>
|
<dependency>
|
||||||
<id>apache.snapshots</id>
|
<groupId>com.songoda</groupId>
|
||||||
<url>https://repository.apache.org/snapshots/</url>
|
<artifactId>SongodaCore</artifactId>
|
||||||
</pluginRepository>
|
<version>2.6.19</version>
|
||||||
</pluginRepositories>
|
<scope>compile</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- TODO: Check if spigot-api can be downgraded to 1.8 -->
|
||||||
<build>
|
<dependency>
|
||||||
<defaultGoal>clean install</defaultGoal>
|
<groupId>org.spigotmc</groupId>
|
||||||
<sourceDirectory>src</sourceDirectory>
|
<artifactId>spigot-api</artifactId>
|
||||||
<testSourceDirectory>test</testSourceDirectory>
|
<version>1.18-R0.1-SNAPSHOT</version>
|
||||||
|
<scope>provided</scope>
|
||||||
<plugins>
|
</dependency>
|
||||||
<plugin>
|
</dependencies>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-compiler-plugin</artifactId>
|
|
||||||
<version>3.1</version>
|
|
||||||
|
|
||||||
<configuration>
|
|
||||||
<source>1.8</source>
|
|
||||||
<target>1.8</target>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-antrun-plugin</artifactId>
|
|
||||||
<version>1.7</version>
|
|
||||||
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<phase>validate</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>run</goal>
|
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
|
|
||||||
<inherited>false</inherited>
|
|
||||||
</plugin>
|
|
||||||
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-dependency-plugin</artifactId>
|
|
||||||
<version>2.8</version>
|
|
||||||
|
|
||||||
<configuration>
|
|
||||||
<outputDirectory>jars</outputDirectory>
|
|
||||||
<stripVersion>true</stripVersion>
|
|
||||||
|
|
||||||
<artifactItems>
|
|
||||||
<artifactItem>
|
|
||||||
<groupId>${project.groupId}</groupId>
|
|
||||||
<artifactId>McMMO</artifactId>
|
|
||||||
<version>${project.version}</version>
|
|
||||||
</artifactItem>
|
|
||||||
|
|
||||||
<artifactItem>
|
|
||||||
<groupId>${project.groupId}</groupId>
|
|
||||||
<artifactId>Plugin</artifactId>
|
|
||||||
<version>${project.version}</version>
|
|
||||||
</artifactItem>
|
|
||||||
|
|
||||||
<artifactItem>
|
|
||||||
<groupId>${project.groupId}</groupId>
|
|
||||||
<artifactId>Core</artifactId>
|
|
||||||
<version>${project.version}</version>
|
|
||||||
</artifactItem>
|
|
||||||
</artifactItems>
|
|
||||||
</configuration>
|
|
||||||
|
|
||||||
<inherited>false</inherited>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
|
|
||||||
<resources>
|
|
||||||
<resource>
|
|
||||||
<directory>resources</directory>
|
|
||||||
<filtering>true</filtering>
|
|
||||||
</resource>
|
|
||||||
</resources>
|
|
||||||
</build>
|
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -1,14 +1,24 @@
|
||||||
name: UltimateTimber
|
name: ${project.name}
|
||||||
version: maven-version-number
|
description: ${project.description}
|
||||||
authors: [Songoda]
|
version: ${project.version}
|
||||||
main: com.songoda.ultimatetimber.UltimateTimber
|
|
||||||
api-version: 1.13
|
api-version: 1.13
|
||||||
softdepend: [mcMMO, Jobs, CoreProtect]
|
|
||||||
|
main: com.songoda.ultimatetimber.UltimateTimber
|
||||||
|
softdepend:
|
||||||
|
- mcMMO
|
||||||
|
- Jobs
|
||||||
|
- CoreProtect
|
||||||
|
|
||||||
|
author: Craftaro
|
||||||
|
website: ${project.url}
|
||||||
|
|
||||||
|
# TODO: cleanup commands and permissions sections
|
||||||
commands:
|
commands:
|
||||||
ut:
|
ut:
|
||||||
description: Reloads the configuration file
|
description: Reloads the configuration file
|
||||||
usage: /ultimatetimber reload
|
usage: /ultimatetimber reload
|
||||||
aliases: [ultimatetimber]
|
aliases: [ ultimatetimber ]
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
ultimatetimber.*:
|
ultimatetimber.*:
|
||||||
description: Inherits all plugin permissions
|
description: Inherits all plugin permissions
|
||||||
|
@ -17,15 +27,19 @@ permissions:
|
||||||
ultimatetimber.bonusloot: true
|
ultimatetimber.bonusloot: true
|
||||||
ultimatetimber.reload: true
|
ultimatetimber.reload: true
|
||||||
ultimatetimber.bypasscooldown: true
|
ultimatetimber.bypasscooldown: true
|
||||||
|
|
||||||
ultimatetimber.chop:
|
ultimatetimber.chop:
|
||||||
description: Allows players to trigger the trees toppling down effect
|
description: Allows players to trigger the trees toppling down effect
|
||||||
default: op
|
default: op
|
||||||
|
|
||||||
ultimatetimber.bonusloot:
|
ultimatetimber.bonusloot:
|
||||||
description: Doubles the loot obtained from trees
|
description: Doubles the loot obtained from trees
|
||||||
default: op
|
default: op
|
||||||
|
|
||||||
ultimatetimber.reload:
|
ultimatetimber.reload:
|
||||||
description: Reloads the configuration file
|
description: Reloads the configuration file
|
||||||
default: op
|
default: op
|
||||||
|
|
||||||
ultimatetimber.bypasscooldown:
|
ultimatetimber.bypasscooldown:
|
||||||
description: Allows a player to bypass the tree topple cooldown
|
description: Allows a player to bypass the tree topple cooldown
|
||||||
default: op
|
default: op
|
Loading…
Reference in New Issue