dev:watch does not reload bundles on JBoss Fuse 6.3.0

人走茶凉 提交于 2019-12-12 18:43:01

问题


I am porting my code from JBoss Fuse 6.2.1 to JBoss Fuse 6.3.0.

On my development environment I used Maven to build -SNAPSHOTS of my Java projects, and have them automatically deployed using dev:watch command.

I installed my bundle with install mvn:my.groupid/my-artifactid/version-SNAPSHOT and then dev:watch ID.
Following mvn install builds do not get automatically loaded inside JBoss Fuse, no messages in any log.

What could be the cause?


回答1:


A default configuration has changed between versions.
Property org.ops4j.pax.url.mvn.localRepository was not defined in 6.2.1 (thus defaulting to ~/.m2/repository), now defaults to ${karaf.data}/repository on 6.3.0

So to reenable previous behaviour, set the property to

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

Property is defined in etc/org.ops4j.pax.url.mvn.cfg

version 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=

version 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


来源:https://stackoverflow.com/questions/40743113/devwatch-does-not-reload-bundles-on-jboss-fuse-6-3-0

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!