1
mirror of https://github.com/CarmJos/EasyPlugin.git synced 2024-09-19 19:25:45 +00:00

feat(proj): 提供更多子项目打包,便于快速导入对应依赖。

This commit is contained in:
Carm Jos 2022-07-27 14:29:13 +08:00
parent fb125ee9bd
commit e5fc8acddc
5 changed files with 268 additions and 2 deletions

81
base/conf/pom.xml Normal file
View File

@ -0,0 +1,81 @@
<?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">
<parent>
<artifactId>easyplugin-parent</artifactId>
<groupId>cc.carm.lib</groupId>
<version>1.4.13</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<properties>
<maven.compiler.source>${project.jdk.version}</maven.compiler.source>
<maven.compiler.target>${project.jdk.version}</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.encoding>UTF-8</maven.compiler.encoding>
</properties>
<artifactId>easyplugin-conf</artifactId>
<packaging>jar</packaging>
<name>EasyPlugin-Configuration</name>
<description>轻松插件配置文件接口模块,基于 MineConfiguration 项目。</description>
<url>https://github.com/CarmJos/EasyPlugin</url>
<dependencies>
<dependency>
<!-- https://github.com/CarmJos/MineConfiguration -->
<groupId>cc.carm.lib</groupId>
<artifactId>mineconfiguration-bukkit</artifactId>
<scope>compile</scope>
<optional>true</optional>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.3.0</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<createDependencyReducedPom>false</createDependencyReducedPom>
</configuration>
</execution>
</executions>
<configuration>
<relocations>
<relocation>
<pattern>cc.carm.lib.configuration.core</pattern>
<shadedPattern>cc.carm.lib.easyplugin.conf</shadedPattern>
</relocation>
<relocation>
<pattern>cc.carm.lib.mineconfiguration.common</pattern>
<shadedPattern>cc.carm.lib.easyplugin.conf</shadedPattern>
</relocation>
<relocation>
<pattern>cc.carm.lib.mineconfiguration.bukkit</pattern>
<shadedPattern>cc.carm.lib.easyplugin.conf</shadedPattern>
</relocation>
</relocations>
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>META-INF/MANIFEST.MF</exclude>
<exclude>META-INF/*.txt</exclude>
</excludes>
</filter>
</filters>
</configuration>
</plugin>
</plugins>
</build>
</project>

73
base/database/pom.xml Normal file
View File

@ -0,0 +1,73 @@
<?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">
<parent>
<artifactId>easyplugin-parent</artifactId>
<groupId>cc.carm.lib</groupId>
<version>1.4.13</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<properties>
<maven.compiler.source>${project.jdk.version}</maven.compiler.source>
<maven.compiler.target>${project.jdk.version}</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.encoding>UTF-8</maven.compiler.encoding>
</properties>
<artifactId>easyplugin-database</artifactId>
<packaging>jar</packaging>
<name>EasyPlugin-Database</name>
<description>轻松插件数据库接口模块,基于 EasySQL 项目。</description>
<url>https://github.com/CarmJos/EasyPlugin</url>
<dependencies>
<dependency>
<!-- https://github.com/CarmJos/EasySQL -->
<groupId>cc.carm.lib</groupId>
<artifactId>easysql-beecp</artifactId>
<scope>compile</scope>
<optional>true</optional>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.3.0</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<createDependencyReducedPom>false</createDependencyReducedPom>
</configuration>
</execution>
</executions>
<configuration>
<relocations>
<relocation>
<pattern>cc.carm.lib.easysql</pattern>
<shadedPattern>cc.carm.lib.easyplugin.database</shadedPattern>
</relocation>
</relocations>
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>META-INF/MANIFEST.MF</exclude>
<exclude>META-INF/*.txt</exclude>
</excludes>
</filter>
</filters>
</configuration>
</plugin>
</plugins>
</build>
</project>

80
base/listener/pom.xml Normal file
View File

@ -0,0 +1,80 @@
<?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">
<parent>
<artifactId>easyplugin-parent</artifactId>
<groupId>cc.carm.lib</groupId>
<version>1.4.13</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<properties>
<maven.compiler.source>${project.jdk.version}</maven.compiler.source>
<maven.compiler.target>${project.jdk.version}</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.encoding>UTF-8</maven.compiler.encoding>
</properties>
<artifactId>easyplugin-listener</artifactId>
<name>EasyPlugin-Listener</name>
<description>轻松插件监听器接口模块,基于 EasyListener 项目。</description>
<url>https://github.com/CarmJos/EasyPlugin</url>
<licenses>
<license>
<name>GNU LESSER GENERAL PUBLIC LICENSE</name>
<url>https://www.gnu.org/licenses/lgpl-3.0.html</url>
</license>
</licenses>
<dependencies>
<dependency>
<!-- https://github.com/CarmJos/EasyListener -->
<groupId>cc.carm.lib</groupId>
<artifactId>easylistener</artifactId>
<scope>compile</scope>
<optional>true</optional>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.3.0</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<createDependencyReducedPom>false</createDependencyReducedPom>
</configuration>
</execution>
</executions>
<configuration>
<relocations>
<relocation>
<pattern>cc.carm.lib.easylistener</pattern>
<shadedPattern>cc.carm.lib.easyplugin.listener</shadedPattern>
</relocation>
</relocations>
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>META-INF/MANIFEST.MF</exclude>
<exclude>META-INF/*.txt</exclude>
</excludes>
</filter>
</filters>
</configuration>
</plugin>
</plugins>
</build>
</project>

View File

@ -52,6 +52,7 @@
<dependencyManagement>
<dependencies>
<dependency>
<groupId>${project.parent.groupId}</groupId>
<artifactId>easyplugin-main</artifactId>
@ -67,6 +68,12 @@
<artifactId>easyplugin-gui</artifactId>
<version>${project.parent.version}</version>
</dependency>
<dependency>
<groupId>${project.parent.groupId}</groupId>
<artifactId>easyplugin-storage</artifactId>
<version>${project.parent.version}</version>
</dependency>
<dependency>
<groupId>${project.parent.groupId}</groupId>
<artifactId>easyplugin-papi</artifactId>
@ -77,6 +84,13 @@
<artifactId>easyplugin-vault</artifactId>
<version>${project.parent.version}</version>
</dependency>
<dependency>
<groupId>${project.parent.groupId}</groupId>
<artifactId>easyplugin-githubchecker</artifactId>
<version>${project.parent.version}</version>
</dependency>
</dependencies>
</dependencyManagement>

22
pom.xml
View File

@ -19,8 +19,12 @@
<modules>
<module>base/main</module>
<module>base/command</module>
<module>base/conf</module>
<module>base/gui</module>
<module>base/command</module>
<module>base/storage</module>
<module>base/listener</module>
<module>base/database</module>
<module>extension/papi</module>
<module>extension/vault</module>
@ -29,7 +33,6 @@
<module>collection/all</module>
<module>collection/bom</module>
<module>collection/common</module>
<module>base/storage</module>
</modules>
@ -141,6 +144,21 @@
<artifactId>githubreleases4j</artifactId>
<version>1.3.1</version>
</dependency>
<dependency>
<groupId>cc.carm.lib</groupId>
<artifactId>easylistener</artifactId>
<version>2.0.1</version>
</dependency>
<dependency>
<groupId>cc.carm.lib</groupId>
<artifactId>mineconfiguration-bukkit</artifactId>
<version>2.0.2</version>
</dependency>
<dependency>
<groupId>cc.carm.lib</groupId>
<artifactId>easysql-beecp</artifactId>
<version>0.4.3</version>
</dependency>
</dependencies>
</dependencyManagement>