dev:watch 不会在 JBoss Fuse 6.3.0 上重新加载包

dev:watch does not reload bundles on JBoss Fuse 6.3.0

我正在将我的代码从 JBoss Fuse 6.2.1 移植到 JBoss Fuse 6.3.0。

在我的开发环境中,我使用 Maven 为我的 Java 项目构建 -SNAPSHOTS,并使用 dev:watch 命令自动部署它们。

我用 install mvn:my.groupid/my-artifactid/version-SNAPSHOT 安装了我的包,然后 dev:watch ID
以下 mvn install 构建不会自动加载到 JBoss Fuse 中,任何日志中都没有消息。

可能是什么原因?

版本之间的默认配置已更改。
属性 org.ops4j.pax.url.mvn.localRepository 未在 6.2.1 中定义(因此默认为 ~/.m2/repository),现在在 6.3.0

上默认为 ${karaf.data}/repository

因此,要重新启用以前的行为,请将 属性 设置为

#Linux
org.ops4j.pax.url.mvn.localRepository=~/.m2/repository  
#Windows
org.ops4j.pax.url.mvn.localRepository=/Users/alessandro/.m2/repository

属性 定义在 etc/org.ops4j.pax.url.mvn.cfg

版本 6.2.1

# Path to the local maven repository which is used to avoid downloading
# artifacts when they already exist locally.
# The value of this property will be extracted from the settings.xml file
# above, or defaulted to:
#     System.getProperty( "user.home" ) + "/.m2/repository"
#
#org.ops4j.pax.url.mvn.localRepository=

版本 6.3.0

# Path to the local Maven repository which is used to avoid downloading
# artifacts when they already exist locally.
# The value of this property will be extracted from the settings.xml file
# above, or defaulted to:
#     System.getProperty( "user.home" ) + "/.m2/repository"
# leaving this option commented makes the system dependent on external configuration, which is not always desired
# "localRepository" is the target location for artifacts downloaded from "remote repositories", it's not
# searched for already available artifacts, unless added explicitly to "defaultRepositories"
# by default internal local repository is used to have behavior independent of the content of ~/.m2/repository
org.ops4j.pax.url.mvn.localRepository = ${karaf.data}/repository