Simplify dependency management
Use dependencyManagement for versioning shared dependencies Use pluginManagement for versioning and configuring plugins
This commit is contained in:
95
README.MD
95
README.MD
@@ -15,48 +15,7 @@ OpenInv is a [Bukkit plugin](https://dev.bukkit.org/bukkit-plugins/openinv/) whi
|
|||||||
- **AnyContainer**: Open containers, even if blocked by ocelots or blocks.
|
- **AnyContainer**: Open containers, even if blocked by ocelots or blocks.
|
||||||
|
|
||||||
## Commands
|
## Commands
|
||||||
<table width=100%>
|
See [the wiki](https://github.com/Jikoo/OpenInv/wiki/Commands).
|
||||||
<tr>
|
|
||||||
<th width=175px>Command</th>
|
|
||||||
<th>Aliases</th>
|
|
||||||
<th>Description</th>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>/openinv [player]</td>
|
|
||||||
<td>oi, inv, open</td>
|
|
||||||
<td>Open a player's inventory. If unspecified, will select last player opened or own if none opened previously.</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>/openender [player]</td>
|
|
||||||
<td>oe</td>
|
|
||||||
<td>Open a player's ender chest. If unspecified, will select last player opened or own if none opened previously.</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>/searchinv <item> [minAmount]</td>
|
|
||||||
<td>si</td>
|
|
||||||
<td>Lists all online players that have a certain item in their inventory.</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>/searchender <item> [minAmount]</td>
|
|
||||||
<td>se</td>
|
|
||||||
<td>Lists all online players that have a certain item in their ender chest.</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>/searchenchant <[enchantment] [MinLevel]></td>
|
|
||||||
<td>searchenchants</td>
|
|
||||||
<td>Lists all online players with a specific enchantment.</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>/anycontainer [check]</td>
|
|
||||||
<td>ac, anychest</td>
|
|
||||||
<td>Check or toggle the AnyContainer function, allowing opening blocked containers.</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>/silentcontainer [check]</td>
|
|
||||||
<td>sc, silentchest</td>
|
|
||||||
<td>Check or toggle the SilentContainer function, allowing opening containers silently.</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
## Permissions
|
## Permissions
|
||||||
<table>
|
<table>
|
||||||
@@ -143,8 +102,39 @@ OpenInv is a [Bukkit plugin](https://dev.bukkit.org/bukkit-plugins/openinv/) whi
|
|||||||
</table>
|
</table>
|
||||||
|
|
||||||
## For Developers
|
## For Developers
|
||||||
To compile, the relevant Craftbukkit/Spigot jars must be installed in your local repository using the install plugin.
|
|
||||||
Ex: `mvn install:install-file -Dpackaging=jar -Dfile=spigot-1.8-R0.1-SNAPSHOT.jar -DgroupId=org.spigotmc -DartifactId=spigot -Dversion=1.8-R0.1-SNAPSHOT`
|
### As a Dependency
|
||||||
|
The OpenInv API is available via [JitPack](https://jitpack.io/).
|
||||||
|
```xml
|
||||||
|
<repositories>
|
||||||
|
<repository>
|
||||||
|
<id>jitpack.io</id>
|
||||||
|
<url>https://jitpack.io</url>
|
||||||
|
</repository>
|
||||||
|
</repositories>
|
||||||
|
```
|
||||||
|
```xml
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.github.jikoo.OpenInv</groupId>
|
||||||
|
<artifactId>openinvapi</artifactId>
|
||||||
|
<version>${openinv.version}</version>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
```
|
||||||
|
|
||||||
|
### Compilation
|
||||||
|
To compile, the relevant Spigot jars must be installed in your local repository using the `install` plugin:
|
||||||
|
```shell
|
||||||
|
mvn install:install-file -Dpackaging=jar -Dfile=spigot-1.8-R0.1-SNAPSHOT.jar \
|
||||||
|
-DgroupId=org.spigotmc -DartifactId=spigot -Dversion=1.8-R0.1-SNAPSHOT
|
||||||
|
```
|
||||||
|
Note that BuildTools automatically installs produced files. If you use BuildTools to compile Spigot locally, you don't need to install it manually.
|
||||||
|
If you want to use Paper as a dependency, you can install it by executing PaperClip with the property `paperclip.install` set to true:
|
||||||
|
```shell
|
||||||
|
wget -O paperclip.jar https://papermc.io/api/v1/paper/1.16.5/latest/download
|
||||||
|
java -jar -Dpaperclip.install=true paperclip.jar
|
||||||
|
```
|
||||||
|
|
||||||
To compile for a single version, specify the NMS revision you are targeting: `mvn -pl <NMS module> -am clean install`
|
To compile for a single version, specify the NMS revision you are targeting: `mvn -pl <NMS module> -am clean install`
|
||||||
|
|
||||||
@@ -153,20 +143,3 @@ To compile for a set of versions, you'll need to use a profile. The only provide
|
|||||||
For more information, check out the [official Maven guide](http://maven.apache.org/guides/introduction/introduction-to-profiles.html).
|
For more information, check out the [official Maven guide](http://maven.apache.org/guides/introduction/introduction-to-profiles.html).
|
||||||
|
|
||||||
The final file is `target/OpenInv.jar`
|
The final file is `target/OpenInv.jar`
|
||||||
|
|
||||||
## License
|
|
||||||
```
|
|
||||||
Copyright (C) 2011-2020 lishid. All rights reserved.
|
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, version 3.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
```
|
|
||||||
|
18
api/pom.xml
18
api/pom.xml
@@ -19,23 +19,29 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>com.lishid</groupId>
|
|
||||||
<artifactId>openinvparent</artifactId>
|
<artifactId>openinvparent</artifactId>
|
||||||
|
<groupId>com.lishid</groupId>
|
||||||
<version>4.1.7-SNAPSHOT</version>
|
<version>4.1.7-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>openinvapi</artifactId>
|
<artifactId>openinvapi</artifactId>
|
||||||
<name>OpenInvAPI</name>
|
<name>OpenInvAPI</name>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<artifactId>annotations</artifactId>
|
||||||
|
<groupId>org.jetbrains</groupId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<artifactId>spigot-api</artifactId>
|
||||||
|
<groupId>org.spigotmc</groupId>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
<artifactId>maven-compiler-plugin</artifactId>
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
<version>3.8.1</version>
|
|
||||||
<configuration>
|
|
||||||
<source>1.8</source>
|
|
||||||
<target>1.8</target>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
@@ -26,6 +26,7 @@
|
|||||||
|
|
||||||
<artifactId>openinvassembly</artifactId>
|
<artifactId>openinvassembly</artifactId>
|
||||||
<name>OpenInvAssembly</name>
|
<name>OpenInvAssembly</name>
|
||||||
|
<packaging>pom</packaging>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
<directory>../target</directory>
|
<directory>../target</directory>
|
||||||
@@ -34,7 +35,6 @@
|
|||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
<artifactId>maven-assembly-plugin</artifactId>
|
<artifactId>maven-assembly-plugin</artifactId>
|
||||||
<version>3.2.0</version>
|
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<id>reactor-uberjar</id>
|
<id>reactor-uberjar</id>
|
||||||
|
@@ -14,9 +14,9 @@
|
|||||||
~ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
~ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<assembly xmlns="http://maven.apache.org/ASSEMBLY/2.0.0"
|
<assembly xmlns="http://maven.apache.org/ASSEMBLY/2.1.0"
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.0.0 http://maven.apache.org/xsd/assembly-2.0.0.xsd">
|
xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.1.0 http://maven.apache.org/xsd/assembly-2.1.0.xsd">
|
||||||
|
|
||||||
<id>reactor-uberjar</id>
|
<id>reactor-uberjar</id>
|
||||||
|
|
||||||
@@ -34,8 +34,18 @@
|
|||||||
<binaries>
|
<binaries>
|
||||||
<outputDirectory>/</outputDirectory>
|
<outputDirectory>/</outputDirectory>
|
||||||
<unpack>true</unpack>
|
<unpack>true</unpack>
|
||||||
<!-- unpackOptions must be present or build breaks. -->
|
<unpackOptions>
|
||||||
<unpackOptions/>
|
<excludes>
|
||||||
|
<!--
|
||||||
|
- Exclude existing meta - assembly will write its own manifest, and the rest is maven
|
||||||
|
- details that end users don't need. Ignoring it saves around 7KB after compression
|
||||||
|
- with a single internal module present.
|
||||||
|
-->
|
||||||
|
<exclude>META-INF/**</exclude>
|
||||||
|
</excludes>
|
||||||
|
</unpackOptions>
|
||||||
|
<!-- Exclude dependencies - shade plugin will handle their inclusion as necessary in individual jars. -->
|
||||||
|
<includeDependencies>false</includeDependencies>
|
||||||
</binaries>
|
</binaries>
|
||||||
|
|
||||||
</moduleSet>
|
</moduleSet>
|
||||||
|
@@ -1,42 +0,0 @@
|
|||||||
<!--
|
|
||||||
~ Copyright (C) 2011-2020 lishid. All rights reserved.
|
|
||||||
~
|
|
||||||
~ This program is free software: you can redistribute it and/or modify
|
|
||||||
~ it under the terms of the GNU General Public License as published by
|
|
||||||
~ the Free Software Foundation, version 3.
|
|
||||||
~
|
|
||||||
~ This program is distributed in the hope that it will be useful,
|
|
||||||
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
~ GNU General Public License for more details.
|
|
||||||
~
|
|
||||||
~ You should have received a copy of the GNU General Public License
|
|
||||||
~ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<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>
|
|
||||||
|
|
||||||
<parent>
|
|
||||||
<groupId>com.lishid</groupId>
|
|
||||||
<artifactId>openinvparent</artifactId>
|
|
||||||
<version>4.1.7-SNAPSHOT</version>
|
|
||||||
</parent>
|
|
||||||
|
|
||||||
<artifactId>openinvinternal</artifactId>
|
|
||||||
<name>OpenInvInternal</name>
|
|
||||||
|
|
||||||
<packaging>pom</packaging>
|
|
||||||
|
|
||||||
<profiles>
|
|
||||||
|
|
||||||
<profile>
|
|
||||||
<id>all</id>
|
|
||||||
<modules>
|
|
||||||
<module>v1_16_R3</module>
|
|
||||||
</modules>
|
|
||||||
</profile>
|
|
||||||
|
|
||||||
</profiles>
|
|
||||||
|
|
||||||
</project>
|
|
@@ -20,8 +20,9 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
<parent>
|
<parent>
|
||||||
|
<artifactId>openinvparent</artifactId>
|
||||||
<groupId>com.lishid</groupId>
|
<groupId>com.lishid</groupId>
|
||||||
<artifactId>openinvinternal</artifactId>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
<version>4.1.7-SNAPSHOT</version>
|
<version>4.1.7-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
@@ -30,44 +31,32 @@
|
|||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.spigotmc</groupId>
|
|
||||||
<artifactId>spigot</artifactId>
|
<artifactId>spigot</artifactId>
|
||||||
<version>1.16.5-R0.1-SNAPSHOT</version>
|
<groupId>org.spigotmc</groupId>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
|
<version>1.16.5-R0.1-SNAPSHOT</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
|
<artifactId>openinvapi</artifactId>
|
||||||
<groupId>com.lishid</groupId>
|
<groupId>com.lishid</groupId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
<artifactId>openinvplugincore</artifactId>
|
<artifactId>openinvplugincore</artifactId>
|
||||||
<version>4.1.7-SNAPSHOT</version>
|
<groupId>com.lishid</groupId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<artifactId>annotations</artifactId>
|
||||||
|
<groupId>org.jetbrains</groupId>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-shade-plugin</artifactId>
|
<artifactId>maven-shade-plugin</artifactId>
|
||||||
<version>3.2.2</version>
|
|
||||||
<configuration>
|
|
||||||
<minimizeJar>true</minimizeJar>
|
|
||||||
</configuration>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<phase>package</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>shade</goal>
|
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|
||||||
<plugin>
|
<plugin>
|
||||||
<artifactId>maven-compiler-plugin</artifactId>
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
<version>3.8.1</version>
|
|
||||||
<configuration>
|
|
||||||
<source>1.8</source>
|
|
||||||
<target>1.8</target>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
@@ -19,8 +19,8 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>com.lishid</groupId>
|
|
||||||
<artifactId>openinvparent</artifactId>
|
<artifactId>openinvparent</artifactId>
|
||||||
|
<groupId>com.lishid</groupId>
|
||||||
<version>4.1.7-SNAPSHOT</version>
|
<version>4.1.7-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
@@ -29,9 +29,8 @@
|
|||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.lishid</groupId>
|
|
||||||
<artifactId>openinvapi</artifactId>
|
<artifactId>openinvapi</artifactId>
|
||||||
<version>4.1.7-SNAPSHOT</version>
|
<groupId>com.lishid</groupId>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
@@ -42,31 +41,13 @@
|
|||||||
<filtering>true</filtering>
|
<filtering>true</filtering>
|
||||||
</resource>
|
</resource>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-shade-plugin</artifactId>
|
<artifactId>maven-shade-plugin</artifactId>
|
||||||
<version>3.2.2</version>
|
|
||||||
<configuration>
|
|
||||||
<minimizeJar>true</minimizeJar>
|
|
||||||
</configuration>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<phase>package</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>shade</goal>
|
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|
||||||
<plugin>
|
<plugin>
|
||||||
<artifactId>maven-compiler-plugin</artifactId>
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
<version>3.8.1</version>
|
|
||||||
<configuration>
|
|
||||||
<source>1.8</source>
|
|
||||||
<target>1.8</target>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
162
pom.xml
162
pom.xml
@@ -27,33 +27,32 @@
|
|||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
<maven.compiler.source>1.8</maven.compiler.source>
|
||||||
|
<maven.compiler.target>1.8</maven.compiler.target>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<modules>
|
|
||||||
<module>api</module>
|
|
||||||
<module>plugin</module>
|
|
||||||
<module>internal</module>
|
|
||||||
<module>assembly</module>
|
|
||||||
</modules>
|
|
||||||
|
|
||||||
<profiles>
|
<profiles>
|
||||||
|
|
||||||
<!--
|
|
||||||
~ N.B.: All version-specific code is handled in submodules of the internal module.
|
|
||||||
~
|
|
||||||
~ Internal submodules built by each profile are handled in internal/pom.xml
|
|
||||||
-->
|
|
||||||
|
|
||||||
<profile>
|
<profile>
|
||||||
<id>all</id>
|
<id>all</id>
|
||||||
<activation>
|
<modules>
|
||||||
<property>
|
<module>api</module>
|
||||||
<name>all</name>
|
<module>plugin</module>
|
||||||
<value>true</value>
|
<module>internal/v1_16_R3</module>
|
||||||
</property>
|
<module>assembly</module>
|
||||||
</activation>
|
</modules>
|
||||||
</profile>
|
</profile>
|
||||||
|
|
||||||
|
<profile>
|
||||||
|
<id>default</id>
|
||||||
|
<activation>
|
||||||
|
<activeByDefault>true</activeByDefault>
|
||||||
|
</activation>
|
||||||
|
<modules>
|
||||||
|
<module>api</module>
|
||||||
|
<module>plugin</module>
|
||||||
|
<module>assembly</module>
|
||||||
|
</modules>
|
||||||
|
</profile>
|
||||||
</profiles>
|
</profiles>
|
||||||
|
|
||||||
<repositories>
|
<repositories>
|
||||||
@@ -63,57 +62,84 @@
|
|||||||
</repository>
|
</repository>
|
||||||
</repositories>
|
</repositories>
|
||||||
|
|
||||||
<dependencies>
|
<dependencyManagement>
|
||||||
<dependency>
|
<dependencies>
|
||||||
<groupId>org.jetbrains</groupId>
|
<dependency>
|
||||||
<artifactId>annotations</artifactId>
|
<artifactId>annotations</artifactId>
|
||||||
<version>17.0.0</version>
|
<groupId>org.jetbrains</groupId>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
<version>20.1.0</version>
|
||||||
<dependency>
|
</dependency>
|
||||||
<groupId>org.spigotmc</groupId>
|
<dependency>
|
||||||
<artifactId>spigot-api</artifactId>
|
<artifactId>spigot-api</artifactId>
|
||||||
<version>1.16.5-R0.1-SNAPSHOT</version>
|
<groupId>org.spigotmc</groupId>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
<version>1.16.5-R0.1-SNAPSHOT</version>
|
||||||
</dependencies>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<artifactId>openinvapi</artifactId>
|
||||||
|
<groupId>com.lishid</groupId>
|
||||||
|
<scope>compile</scope>
|
||||||
|
<version>4.1.7-SNAPSHOT</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<artifactId>openinvplugincore</artifactId>
|
||||||
|
<groupId>com.lishid</groupId>
|
||||||
|
<scope>compile</scope>
|
||||||
|
<version>4.1.7-SNAPSHOT</version>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
</dependencyManagement>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
<plugins>
|
<pluginManagement>
|
||||||
<plugin>
|
<plugins>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<plugin>
|
||||||
<artifactId>maven-shade-plugin</artifactId>
|
<artifactId>maven-shade-plugin</artifactId>
|
||||||
<version>3.2.2</version>
|
<configuration>
|
||||||
<configuration>
|
<filters>
|
||||||
<filters>
|
<filter>
|
||||||
<filter>
|
<!-- Always shade entirety of required modules. -->
|
||||||
<artifact>*:*</artifact>
|
<artifact>com.lishid:openinv*</artifact>
|
||||||
<!-- Keep the file clean, don't include every single pom from all modules -->
|
<includes>
|
||||||
<excludes>
|
<include>**</include>
|
||||||
<exclude>META-INF/maven/**</exclude>
|
</includes>
|
||||||
</excludes>
|
</filter>
|
||||||
</filter>
|
<filter>
|
||||||
</filters>
|
<artifact>*:*</artifact>
|
||||||
</configuration>
|
<!-- Don't warn about file conflicts that'll be clobbered anyway. -->
|
||||||
<executions>
|
<excludes>
|
||||||
<execution>
|
<exclude>META-INF/MANIFEST.MF</exclude>
|
||||||
<phase>package</phase>
|
</excludes>
|
||||||
<goals>
|
</filter>
|
||||||
<goal>shade</goal>
|
</filters>
|
||||||
</goals>
|
<minimizeJar>true</minimizeJar>
|
||||||
</execution>
|
</configuration>
|
||||||
</executions>
|
<executions>
|
||||||
</plugin>
|
<execution>
|
||||||
|
<phase>package</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>shade</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<version>3.2.4</version>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
<plugin>
|
<plugin>
|
||||||
<artifactId>maven-compiler-plugin</artifactId>
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
<version>3.8.1</version>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<configuration>
|
<version>3.8.1</version>
|
||||||
<source>1.8</source>
|
</plugin>
|
||||||
<target>1.8</target>
|
|
||||||
</configuration>
|
<plugin>
|
||||||
</plugin>
|
<artifactId>maven-assembly-plugin</artifactId>
|
||||||
</plugins>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<version>3.3.0</version>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</pluginManagement>
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
@@ -32,22 +32,23 @@ if [[ ${spigot_versions[@]} ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Pull Spigot dependency information from Maven.
|
# Pull Spigot dependency information from Maven.
|
||||||
modules=$(mvn help:evaluate -Dexpression=project.modules -q -DforceStdout -P all -pl internal | grep -oP '(?<=<string>)(.*)(?=<\/string>)')
|
# Since we only care about Spigot versions, only check modules in the folder internal.
|
||||||
|
readarray -t modules <<< "$(mvn help:evaluate -Dexpression=project.modules -q -DforceStdout -P all | grep -oP '(?<=<string>)(internal/.*)(?=</string>)')"
|
||||||
|
|
||||||
declare -n versions="spigot_versions"
|
declare -n versions="spigot_versions"
|
||||||
|
|
||||||
for module in "${modules[@]}"; do
|
for module in "${modules[@]}"; do
|
||||||
# Get number of dependencies declared in pom of specified internal module.
|
# Get number of dependencies declared in pom of specified internal module.
|
||||||
max_index=$(mvn help:evaluate -Dexpression=project.dependencies -q -DforceStdout -P all -pl internal/"$module" | grep -c "<dependency>")
|
max_index=$(mvn help:evaluate -Dexpression=project.dependencies -q -DforceStdout -P all -pl "$module" | grep -c "<dependency>")
|
||||||
|
|
||||||
for ((i=0; i < max_index; i++)); do
|
for ((i=0; i < max_index; i++)); do
|
||||||
# Get artifactId of dependency.
|
# Get artifactId of dependency.
|
||||||
artifact_id=$(mvn help:evaluate -Dexpression=project.dependencies["$i"].artifactId -q -DforceStdout -P all -pl internal/"$module")
|
artifact_id=$(mvn help:evaluate -Dexpression=project.dependencies["$i"].artifactId -q -DforceStdout -P all -pl "$module")
|
||||||
|
|
||||||
# Ensure dependency is Spigot.
|
# Ensure dependency is Spigot.
|
||||||
if [[ "$artifact_id" == spigot ]]; then
|
if [[ "$artifact_id" == spigot ]]; then
|
||||||
# Get Spigot version.
|
# Get Spigot version.
|
||||||
spigot_version=$(mvn help:evaluate -Dexpression=project.dependencies["$i"].version -q -DforceStdout -P all -pl internal/"$module")
|
spigot_version=$(mvn help:evaluate -Dexpression=project.dependencies["$i"].version -q -DforceStdout -P all -pl "$module")
|
||||||
versions+=("$spigot_version")
|
versions+=("$spigot_version")
|
||||||
echo "$spigot_version"
|
echo "$spigot_version"
|
||||||
break
|
break
|
||||||
|
Reference in New Issue
Block a user