我正在使用maven- ear -plugin构建一个带有skinny war的ear文件。
我正在与另一个提供每日快照的团队合作,我得到的是如果我没有在本地构建快照的情况
ear文件有每日构建(这很好),而war文件有我最新的快照(这不好)。
例如,ear文件将具有imported1-2017-010101.jar,而war文件将具有imported1-SNAPSHOT.jar
这似乎是由于每日构建在其名称中有日期戳而快照没有。
如果我在构建ear文件之前构建导入库的快照。例如,ear文件将具有imported1-SNAPSHOT.jar,而war文件将不具有库。
这是ear配置
<profile>
<id>skinny</id>
<activation>
<property>
<name>!skinny</name>
</property>
</activation>
<dependencies>
<dependency>
<groupId>my.library</groupId>
<artifactId>war-1</artifactId>
<type>pom</type>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>my.library</groupId>
<artifactId>war-2</artifactId>
<type>pom</type>
<version>${project.version}</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-ear-plugin</artifactId>
<configuration>
<defaultLibBundleDir>/lib</defaultLibBundleDir>
<skinnyWars>true</skinnyWars>
</configuration>
</plugin>
</plugins>
</build>
</profile>是我弄错了什么,还是插件在这种情况下不能工作?
发布于 2017-12-13 06:36:34
我通过检查我的Maven Repository快照行为解决了这个问题。
我正在使用Artifactory作为maven Repository。它允许你选择3种不同的行为来命名你的快照,其中一种使用时间戳,另一种使用-SNAPSHOT,其他接受部署者选择的名称。
我已经将快照行为更改为-SNAPSHOT,从存储库中删除了较旧版本的快照(我不知道这是否真的有必要),并且skinnyWars现在可以正确创建。
[]的
https://stackoverflow.com/questions/45667114
复制相似问题