[英]Include all resources in maven project in pom.xml
I need to include all resources in my pom.xml but i didn't succeed.我需要在我的 pom.xml 中包含所有资源,但我没有成功。 Indeed, I'm trying this code but i don't think it works for all resources
确实,我正在尝试此代码,但我认为它不适用于所有资源
<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>
I need to include all of my resources on the project named pip.我需要在名为 pip 的项目中包含我的所有资源。
error it's juste because my includes in pom.xml don't include src/main/resources and main can't access to files in this folder错误是公正的,因为我在 pom.xml 中的包含不包含 src/main/resources 并且 main 无法访问此文件夹中的文件
favicon should be in src/main/resources
or a subfolder. favicon 应该在
src/main/resources
或子文件夹中。
If you dont want to keep it there you can copy it using maven-resources-plugin
如果你不想把它留在那里,你可以使用
maven-resources-plugin
复制它
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.