cobble-loader
Used in:
components
- OverviewOverview
- VersionsVersions
- DependentsDependents
- DependenciesDependencies
<dependency>
<groupId>net.hasor</groupId>
<artifactId>cobble-loader</artifactId>
<version>4.8.6</version>
</dependency><?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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>net.hasor</groupId>
<artifactId>cobble-parent</artifactId>
<version>4.8.6</version>
</parent>
<!-- Maven Info -->
<artifactId>cobble-loader</artifactId>
<packaging>jar</packaging>
<!-- Project Info -->
<name>Cobble Loader</name>
<description>resource loader util.</description>
<developers>
<developer>
<name>赵永春(Mr.Zhao)</name>
<email>zyc@hasor.net</email>
</developer>
</developers>
<!-- 引用依赖 -->
<dependencies>
<dependency>
<groupId>net.hasor</groupId>
<artifactId>cobble-lang</artifactId>
</dependency>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
<scope>compile</scope>
<optional>true</optional>
</dependency>
</dependencies>
<build>
<plugins>
<!-- java9 编译 -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<executions>
<execution>
<id>compile-java-9</id>
<phase>compile</phase>
<goals>
<goal>compile</goal>
</goals>
<configuration>
<release>9</release>
<compileSourceRoots>
<compileSourceRoot>${project.basedir}/src/main/java9</compileSourceRoot>
</compileSourceRoots>
<multiReleaseOutput>true</multiReleaseOutput>
</configuration>
</execution>
</executions>
</plugin>
<!-- 把 asm 的源码和 class 集成到项目中 -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.6.0</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<createSourcesJar>true</createSourcesJar>
<createDependencyReducedPom>false</createDependencyReducedPom>
<artifactSet>
<includes>
<include>org.ow2.asm:asm</include>
<include>net.hasor:cobble-loader</include>
</includes>
<excludes>
<exclude>module-info.class</exclude>
</excludes>
</artifactSet>
<relocations>
<relocation>
<pattern>org.objectweb.asm</pattern>
<shadedPattern>net.hasor.cobble.asm</shadedPattern>
</relocation>
</relocations>
<filters>
<filter>
<artifact>org.ow2.asm:asm</artifact>
<excludes>
<exclude>META-INF/MANIFEST.MF</exclude>
<exclude>module-info.class</exclude>
</excludes>
</filter>
</filters>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<manifestEntries>
<Multi-Release>true</Multi-Release>
</manifestEntries>
</transformer>
</transformers>
</configuration>
</execution>
</executions>
</plugin>
<!-- 把 module-info.java 加入到 shade 后到 jar 包中 -->
<plugin>
<groupId>org.moditect</groupId>
<artifactId>moditect-maven-plugin</artifactId>
<version>1.3.0.Final</version>
<executions>
<execution>
<id>add-module-infos</id>
<phase>package</phase>
<goals>
<goal>add-module-info</goal>
</goals>
<configuration>
<overwriteExistingFiles>true</overwriteExistingFiles>
<module>
<moduleInfoFile>src/main/module/module-info.java</moduleInfoFile>
</module>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>