[ 
https://issues.apache.org/jira/browse/KARAF-6601?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17018567#comment-17018567
 ] 

Thomas Driessen commented on KARAF-6601:
----------------------------------------

Maybe I should detail the idea in general and talk about what the command 
should do instead of how I would call it, so that you could point us in the 
right direction and maybe point out possible problems with it:

(I'm pretty new to Karaf, so maybe I got some things wrong. Correct me if 
that's the case ;))

When I am developing a feature, then I create a feature.xml that defines all 
the bundles/features/repositories upon which my feature relies like this 

 
{code:java}
<features name="features" 
xmlns="http://karaf.apache.org/xmlns/features/v1.4.0";>    
<repository>somerepo</repository>
 <feature name="feature-impl" description="${project.name}" 
version="${project.version}">
 <feature>http-whiteboard</feature>
 <bundle dependency="true">dependency1</bundle>
 <bundle 
dependency="true">wrap:wrappedDependency$Bundle-SymbolicName=mydep.${dep.version}</bundle>
 <bundle>bundleUnderDevelopment</bundle>
 </feature>
</features>
{code}
 

During development I would love to just set a watch on this file, as well as on 
all bundles under development (probably those within the feature and with a 
snapshot version), so that I don't have to reload anything in Karaf when I'm 
doing one of the following actions:
 * adding/removing/changing a repository in feature.xml
 * adding/removing/changing a feature in feature.xml
 * adding/removing/changing a (wrapped) dependency in feature.xml
 * adding/removing/changing a bundle in feature.xml or in local .m2 repo

Of course this would still lead to resolver errors when I'm defining an 
inconsistent setup within my feature.xml, but as long as that setup is correct 
I would not need to deal with resolver errors at all and probably would have a 
better streamlined development workflow.

WDYT?

 

> New Command - feature:watch
> ---------------------------
>
>                 Key: KARAF-6601
>                 URL: https://issues.apache.org/jira/browse/KARAF-6601
>             Project: Karaf
>          Issue Type: New Feature
>          Components: karaf
>            Reporter: Thomas Driessen
>            Priority: Trivial
>              Labels: features
>
> A new command that should be added to the karaf console: feature:watch
> It's the feature counterpart to bundle:watch and watches not only one bundle, 
> but a whole feature for updates.
> Rational: When adding a new dependency to a bundle that is watched by karaf, 
> then usually the resolver complains about a missing dependency. The usual 
> workflow for a developer is then:
>  * refresh feature repositories
>  * refresh feature
> In order to streamline this workflow there should be a command that, given a 
> feature, watches all bundles/resources of it and if something changes 
> executes those two commands.
>  
> Benefit: One is not confronted with ugly resolver error messages ;) , faster 
> development workflow.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to