我有一些JBOSS项目,POM的版本设置为1.0.0-snapshot。JBOSS使用Nexus快照存储库设置为org.ops4j.pax.url.mvn.cfg中的远程存储库,就像这样:
org.ops4j.pax.url.mvn.repositories=
http://localhost:8888/nexus/content/repositories/snapshots/@snapshots@id=nexus.repo
在我的POMS中,我使用Nexus Maven插件将构建的工件部署到Nexus,并带有" MVN CLEAN DEXPORY",例如:
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.7</version>
<extensions>true</extensions>
<configuration>
<serverId>nexus</serverId>
<nexusUrl>http://localhost:8888/nexus/</nexusUrl>
</configuration>
</plugin>
最新的文物融入了Nexus。因此,我部署了与此融合:
$FUSE_BIN/client "osgi:install -s mvn:my.package/my-service/1.0.0-SNAPSHOT"
$FUSE_BIN/client "osgi:update my-service mvn:my.package/my-service/1.0.0-SNAPSHOT"
但是,它使用" LocalRepository"中的缓存版本来更新服务,而不是下载最新版本。我应该:
1)每次我使用" MVN部署"
时,更新POM中的版本2)在使用OSGI之前清除LocalRepository:update
3)我配置错误的东西?
Local Repository不应该知道何时缓存的伪像不同于Nexus?
您正在安装使用相同版本的已经安装的伪像(我在代码中进行任何卸载)。重复使用"本地"工件是完全合法的。
如果您希望Jboss保险丝"重新加载"工件,则应告诉它。
JBossFuse:karaf@root> dev:watch 372
Watched URLs/IDs:
371
372
现在,当您部署较新的-SNAPSHOT
时,JBOSS保险丝将重新加载。
参考:https://access.redhat.com/documentation/en-us/red_hat_jboss_fuse/6.0/html/console_reference/files/files/consoledevwatch.html