我正在尝试使用Maven JarJar插件,但我遇到了问题。我想要做的是把杰克逊图书馆作为我“依赖的罐子”的一部分。
因为我找不到帮助,所以我想猜测一下配置。你能看看然后告诉我我做错了什么吗?
这是配置:
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>jarjar-maven-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>jarjar</goal>
</goals>
<configuration>
<includes>
<include>com.fasterxml.jackson.core:jackson-core</include>
<include>com.fasterxml.jackson.core:jackson-databind</include>
<include>com.fasterxml.jackson.core:jackson-annotations</include>
</includes>
<rules>
<rule>
<pattern>com.fasterxml.jackson.**</pattern>
<result>${my.package.prefix}.com.fasterxml.jackson.@1</result>
</rule>
</rules>
</configuration>
</execution>
</executions>
</plugin>在编译时,我收到以下信息:
Cleaning up unclosed ZipFile for archive C:\Work\Projects\XXXX\target\xxxx-1.0.0-SNAPSHOT.jar[ERROR] Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:2.6:single (assemble-all) on project xxxx: Failed to create assembly: Error creating assembly archive jar-with-dependencies: Problem creating jar: jar:file:/C:/Work/Projects/XXXX/target/xxxx-1.0.0-SNAPSHOT.jar!/META-INF/aop.xml: JAR entry META-INF/aop.xml not found in C:\Work\Projects\XXXX\target\xxxx-1.0.0-SNAPSHOT.jar -> [Help 1]我会感谢你的帮助!
发布于 2016-01-13 13:47:34
最后,我没有使用maven-jarjar插件。我用过JarJar的罐子。以下问题的回答说明了解决办法:
Relocating fastxml.jackson classes to my.package.fastxml.jackson
https://stackoverflow.com/questions/34747744
复制相似问题