我有一个 ejbModule,我想根据配置文件更改他的名称。
有没有办法可以更改 jar 中生成的名称,例如 Artifact 的 FinalName?
我的pom:
<modules>
<ejbModule>
<groupId>grerj.sample</groupId>
<artifactId>sample</artifactId>
</ejbModule>
</modules>
我想要一个名为 hsample 而不是 example 的 jar。
最佳答案
最简单的解决方案是使用 bundleName like the documentation suggested看起来像这样:
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-ear-plugin</artifactId>
<version>2.9</version>
<configuration>
[...]
<modules>
<ejbModule>
<groupId>artifactGroupId</groupId>
<artifactId>artifactId</artifactId>
<bundleFileName>TheNameYouPrefer</bundleFileName>
</ejbModule>
</modules>
</configuration>
</plugin>
</plugins>
</build>
关于java - 更改maven中的模块名称,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22259501/