【发布时间】:2020-05-03 16:47:56
【问题描述】:
我需要在我的 pom.xml 中包含所有资源,但我没有成功。确实,我正在尝试这段代码,但我认为它并不适用于所有资源
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>2.4.1</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<shadedArtifactAttached>true</shadedArtifactAttached>
<shadedClassifierName>project/classifier</shadedClassifierName>
<outputFile>shade\${project.artifactId}.jar</outputFile>
<transformers>
<transformer
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>fr.tse.fise2.pip.graphic.Main</mainClass>
</transformer>
</transformers>
</configuration>
</execution>
</executions>
</plugin>
【问题讨论】:
-
我认为您需要添加更多关于您想要实现的目标以及您遇到的错误的解释。请为此编辑您的问题。
-
完成,错误是因为我需要 src/main/resources 但也需要 favicon/
标签: java eclipse maven jar pom.xml