我需要将所有资源都包含在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>
最佳答案
Favicon应该位于src/main/resources
或子文件夹中。
如果您不想将其保留在那里,可以使用maven-resources-plugin
复制它