maven - 开发者 :watch does not reload bundles on JBoss Fuse 6. 3.0

标签 maven jbossfuse karaf

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

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

我使用 install mvn:my.groupid/my-artifactid/version-SNAPSHOTdev:watch ID 安装了我的 bundle 。
以下 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

关于maven - 开发者 :watch does not reload bundles on JBoss Fuse 6. 3.0,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40743113/

相关文章:

java - 通过 hudson 制作耳朵和构建

java - 由于 pom.xml 中的相对路径错误,Keycloak Authenticator SPI 示例无法工作

java - 读取包含键值对的文件内容,无需正常解析

mysql - 如何使用 CAMEL 批量处理 SQL 查询的结果?

osgi - Osgi 环境中出现 NoClassDefFoundError

maven - 无法在 build.gradle 的发布 block 中定义任何内容

java - 无法使用hibernate将数据库保存到h2数据库

java - 无法获取 JMX 服务 URL

java - 在 karaf 中,有没有办法通过 JMX 获取 bundle 的 spring 框架状态?

java - 需要帮助将脚本引擎加载到 Karaf 中