当我在我的项目上运行命令“mvn package”时,来自 src/main/resources/META-INF 的资源文件(如 persistence.xml、persistence.xml.dev、persistence.xml.qa 等)被打包在包中。我需要帮助让 mvn-bundle-plugin 查看目标文件夹而不是 src 文件夹,因为我的目标文件夹将只有一个资源文件 persistence.xml。我的 pom mave-bundle-plugin 在下面
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<executions>
<execution>
<id>bundle</id>
<phase>package</phase>
<goals>
<goal>bundle</goal>
</goals>
</execution>
</executions>
<configuration>
<instructions>
<Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
<Bundle-Classpath>.</Bundle-Classpath>
<Meta-Persistence>META-INF/persistence.xml</Meta-Persistence>
<Embed-Dependency>
my-project-api
</Embed-Dependency>
<Export-Package></Export-Package>
<Import-Package>
javax.ws.rs;version="[2.0,3)",
javax.ws.rs.core;version="[2.0,3)",
*</Import-Package>
</instructions>
</configuration>
</plugin>