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

Benjamin Reed commented on KARAF-1514:
--------------------------------------

OK, there's one other thing that's an issue that I talked about in IRC a bit 
before we started our latest conversation; I've updated the test-cases to 
reflect it:

https://github.com/RangerRick/karaf-test-cases/tree/67d6856af095a990d7bce480f4b4de5d2117f2de

The problem is with things that are to be provided by the container, for 
example, servlet-api.  In the "features/01" project, I've updated it so that it 
uses a template features.xml which depends on karaf's built-in "http" feature, 
and the resultant features.xml generates like so:

{code}<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<features xmlns="http://karaf.apache.org/xmlns/features/v1.0.0"; 
name="feature-01">
    <feature description="Feature Test Case 01 (3rd-Party Dependencies)" 
version="1.0-SNAPSHOT" name="feature-01">
        <feature version="[2.2.7,3)">http</feature>
        <bundle>mvn:org.apache.commons/commons-exec/1.1</bundle>
        <bundle>wrap:mvn:javax.servlet/servlet-api/2.5</bundle>
    </feature>
</features>{code}

The problem is that the karaf "http" feature already provides the equivalent 
servlet-api, so it shouldn't be included here.  I've set the servlet-api 
dependency as scope "provided" in the pom (which should mean in maven-speak, 
"use this to compile, but do not treat it as a dependency, I will make sure the 
container provides this") but it's still being included in the generated 
features.xml.
                
> Improve feature file generation to be able to create features out of special 
> feature poms
> -----------------------------------------------------------------------------------------
>
>                 Key: KARAF-1514
>                 URL: https://issues.apache.org/jira/browse/KARAF-1514
>             Project: Karaf
>          Issue Type: Improvement
>            Reporter: Christian Schneider
>
> Currently we have no way to describe several features without having a 
> template feature file.
> To improve that we could describe a single feature as a pom which can depend 
> on other poms and jars. We could then create another pom for the feature file 
> which depends on the feature poms with scope feature. So the plugin would 
> know to create a feature for each pom of scope feature. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to