You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by Paul Spencer <pa...@apache.org> on 2014/03/04 21:07:03 UTC

How do I configure the features-maven-plugin version 2.3.2 to include dependent features?

How do I configure the features-maven-plugin version 2.3.2 to include dependent features?

As an example, I have include the jax-ws feature which depends on http-whiteboard.  I would like to have all dependent features includes, or be notified of dependent features that are not included.

karaf@root> features:info cxf-jaxws
Description of cxf-jaxws 2.7.10 feature
----------------------------------------------------------------
Feature has no configuration
Feature has no configuration files
Feature depends on:
  cxf-core 2.7.10
  cxf-databinding-jaxb 2.7.10
  cxf-bindings-soap 2.7.10
  cxf-http 2.7.10
Feature contains followed bundles:
 mvn:org.apache.cxf/cxf-rt-frontend-simple/2.7.10 start-level=40
 mvn:org.apache.cxf/cxf-rt-frontend-jaxws/2.7.10 start-level=40

karaf@root> features:info cxf-http
Description of cxf-http 2.7.10 feature
----------------------------------------------------------------
Feature has no configuration
Feature has no configuration files
Feature depends on:
  cxf-core 2.7.10
  http-whiteboard [2,4)
Feature contains followed bundles:
 mvn:org.apache.cxf/cxf-rt-transports-http/2.7.10 start-level=40


Paul Spencer


Re: How do I configure the features-maven-plugin version 2.3.2 to include dependent features?

Posted by Freeman Fang <fr...@gmail.com>.
Hi,

I tried your configuration, it can copy all bundles from transitive feature to the target/offline-repository(as you configured)

The purpose for add-features-to-repo is download all necessary bundles for a set of certain features to a local folder, and it works as expected, 
The output is like

[INFO] --- features-maven-plugin:2.3.2:add-features-to-repo (add-features-to-repo) @ apache-servicemix ---
[INFO] Copying bundle: org.apache.karaf.assemblies.features:standard:xml:features:2.3.4
[INFO] Copying bundle: org.apache.karaf.assemblies.features:enterprise:xml:features:2.3.4
[INFO] Copying bundle: org.apache.karaf.assemblies.features:enterprise:xml:features:2.3.4
[INFO] Copying bundle: org.ops4j.pax.cdi:pax-cdi-features:xml:features:0.6.0
[INFO] Copying bundle: org.apache.karaf.assemblies.features:standard:xml:features:2.3.4
[INFO] Copying bundle: org.apache.cxf.karaf:apache-cxf:xml:features:2.7.6
[INFO] Adding contents of transitive feature: cxf-http/2.7.6
[INFO] Adding contents of transitive feature: http-whiteboard/2.3.4
[INFO] Adding contents of transitive feature: cxf-databinding-jaxb/2.7.6
[INFO] Adding contents of transitive feature: jetty/7.6.9.v20130131
[INFO] Adding contents of transitive feature: http/2.3.4
[INFO] Adding contents of transitive feature: cxf-jaxws/2.7.6
[INFO] Adding contents of transitive feature: cxf-bindings-soap/2.7.6
[INFO] Adding contents of transitive feature: cxf-specs/2.7.6
[INFO] Adding contents of transitive feature: cxf-core/2.7.6
[INFO] Base repo: file:///Users/ffang/.m2/repository/
[INFO] Copying bundle: org.apache.cxf:cxf-rt-frontend-simple:jar:2.7.6
[INFO] Copying bundle: org.apache.servicemix.specs:org.apache.servicemix.specs.jaxws-api-2.2:jar:2.2.0
[INFO] Copying bundle: org.ops4j.pax.web:pax-web-spi:jar:1.1.16
[INFO] Copying bundle: org.apache.servicemix.specs:org.apache.servicemix.specs.activation-api-1.1:jar:2.2.0
[INFO] Copying bundle: org.ops4j.pax.web:pax-web-extender-whiteboard:jar:1.1.16
[INFO] Copying bundle: org.ops4j.pax.web:pax-web-runtime:jar:1.1.16
[INFO] Copying bundle: org.apache.karaf:apache-karaf:xml:jettyconfig:2.3.4
[INFO] Copying bundle: org.apache.cxf:cxf-rt-bindings-soap:jar:2.7.6
[INFO] Copying bundle: org.apache.servicemix.bundles:org.apache.servicemix.bundles.xmlresolver:jar:1.2_5
[INFO] Copying bundle: org.apache.cxf:cxf-api:jar:2.7.6
[INFO] Copying bundle: org.apache.cxf:cxf-rt-transports-http:jar:2.7.6
[INFO] Copying bundle: org.apache.servicemix.specs:org.apache.servicemix.specs.jaxb-api-2.2:jar:2.2.0
[INFO] Copying bundle: org.apache.servicemix.bundles:org.apache.servicemix.bundles.jaxb-impl:jar:2.2.1.1_2
[INFO] Copying bundle: org.apache.geronimo.specs:geronimo-annotation_1.0_spec:jar:1.1.1
[INFO] Copying bundle: org.apache.servicemix.bundles:org.apache.servicemix.bundles.wsdl4j:jar:1.6.2_6
[INFO] Copying bundle: org.eclipse.jetty:jetty-util:jar:7.6.9.v20130131
[INFO] Copying bundle: org.apache.servicemix.bundles:org.apache.servicemix.bundles.fastinfoset:jar:1.2.7_4
[INFO] Copying bundle: org.eclipse.jetty:jetty-client:jar:7.6.9.v20130131
[INFO] Copying bundle: org.apache.servicemix.specs:org.apache.servicemix.specs.stax-api-1.0:jar:2.2.0
[INFO] Copying bundle: org.apache.geronimo.specs:geronimo-osgi-registry:jar:1.1
[INFO] Copying bundle: org.eclipse.jetty:jetty-servlets:jar:7.6.9.v20130131
[INFO] Copying bundle: org.eclipse.jetty:jetty-jmx:jar:7.6.9.v20130131
[INFO] Copying bundle: org.apache.cxf:cxf-rt-frontend-jaxws:jar:2.7.6
[INFO] Copying bundle: org.ops4j.pax.web:pax-web-jetty:jar:1.1.16
[INFO] Copying bundle: org.eclipse.jetty:jetty-xml:jar:7.6.9.v20130131
[INFO] Copying bundle: org.apache.cxf:cxf-rt-core:jar:2.7.6
[INFO] Copying bundle: org.eclipse.jetty:jetty-websocket:jar:7.6.9.v20130131
[INFO] Copying bundle: org.eclipse.jetty:jetty-plus:jar:7.6.9.v20130131
[INFO] Copying bundle: org.eclipse.jetty:jetty-webapp:jar:7.6.9.v20130131
[INFO] Copying bundle: org.eclipse.jetty:jetty-security:jar:7.6.9.v20130131
[INFO] Copying bundle: org.apache.cxf:cxf-rt-management:jar:2.7.6
[INFO] Copying bundle: org.apache.servicemix.specs:org.apache.servicemix.specs.saaj-api-1.3:jar:2.2.0
[INFO] Copying bundle: org.apache.geronimo.specs:geronimo-servlet_2.5_spec:jar:1.2
[INFO] Copying bundle: org.apache.geronimo.specs:geronimo-jta_1.1_spec:jar:1.1.1
[INFO] Copying bundle: org.apache.cxf:cxf-rt-databinding-jaxb:jar:2.7.6
[INFO] Copying bundle: org.eclipse.jetty:jetty-http:jar:7.6.9.v20130131
[INFO] Copying bundle: javax.mail:mail:jar:1.4.4
[INFO] Copying bundle: javax.mail:mail:jar:1.4.5
[INFO] Copying bundle: org.eclipse.jetty:jetty-jndi:jar:7.6.9.v20130131
[INFO] Copying bundle: org.apache.servicemix.specs:org.apache.servicemix.specs.activation-api-1.1:jar:2.4.0
[INFO] Copying bundle: org.eclipse.jetty:jetty-server:jar:7.6.9.v20130131
[INFO] Copying bundle: org.apache.ws.xmlschema:xmlschema-core:jar:2.0.3
[INFO] Copying bundle: org.eclipse.jetty:jetty-io:jar:7.6.9.v20130131
[INFO] Copying bundle: org.codehaus.woodstox:stax2-api:jar:3.1.1
[INFO] Copying bundle: org.codehaus.woodstox:woodstox-core-asl:jar:4.2.0
[INFO] Copying bundle: org.apache.servicemix.specs:org.apache.servicemix.specs.jsr339-api-m10:jar:2.2.0
[INFO] Copying bundle: org.apache.cxf:cxf-rt-bindings-xml:jar:2.7.6
[INFO] Copying bundle: org.eclipse.jetty:jetty-servlet:jar:7.6.9.v20130131
[INFO] Copying bundle: org.apache.cxf.karaf:cxf-karaf-commands:jar:2.7.6
[INFO] Copying bundle: org.eclipse.jetty:jetty-continuation:jar:7.6.9.v20130131
[INFO] Copying bundle: org.ops4j.pax.web:pax-web-api:jar:1.1.16
[INFO] Copying bundle: org.apache.servicemix.bundles:org.apache.servicemix.bundles.jaxb-xjc:jar:2.2.1.1_2
-------------
Freeman(Yue) Fang

Red Hat, Inc. 
FuseSource is now part of Red Hat



On 2014-3-5, at 下午9:07, Paul Spencer wrote:

> Below is from the pom that fails to include the dependent feature http-whiteboard. The feature is a dependency of cxf-jaxws.
> 
>      <plugin>
>         <groupId>org.apache.karaf.tooling</groupId>
>            <artifactId>features-maven-plugin</artifactId>
>            <version>2.3.2</version>
> 
>            <executions>
>               <execution>
>                  <id>add-features-to-repo</id>
>                  <phase>generate-resources</phase>
>                  <goals>
>                     <goal>add-features-to-repo</goal>
>                  </goals>
>                  <configuration>
>                  <descriptors>
>                     <!--  Feature Descriptor Files -->
>                     <descriptor>
>                        mvn:org.apache.cxf.karaf/apache-cxf/2.7.6/xml/features
>                     </descriptor> 
>                  </descriptors>
>                  <features>
>                     <!--  Features to add to offline respository -->
>                     <feature>http</feature>
>                     <feature>cxf-jaxws</feature>
>                  </features>
>                  <repository>target/offline-repository</repository>
>                  <karafVersion>2.3.4</karafVersion>
>                  </configuration>
>              </execution>
>            </executions>
>          </plugin>
> 
> Paul Spencer
> 
> On Mar 4, 2014, at 10:33 PM, Freeman Fang <fr...@gmail.com> wrote:
> 
>> Hi,
>> 
>> By default it will have all dependent features included, what's the exact problem you encounter?
>> If your features.xml have multiple cxf version, you may encounter a issue[1] get fixed very recently
>> [1]https://issues.apache.org/jira/browse/KARAF-2791
>> -------------
>> Freeman(Yue) Fang
>> 
>> Red Hat, Inc. 
>> FuseSource is now part of Red Hat
>> 
>> 
>> 
>> On 2014-3-5, at 上午4:07, Paul Spencer wrote:
>> 
>>> How do I configure the features-maven-plugin version 2.3.2 to include dependent features?
>>> 
>>> As an example, I have include the jax-ws feature which depends on http-whiteboard.  I would like to have all dependent features includes, or be notified of dependent features that are not included.
>>> 
>>> karaf@root> features:info cxf-jaxws
>>> Description of cxf-jaxws 2.7.10 feature
>>> ----------------------------------------------------------------
>>> Feature has no configuration
>>> Feature has no configuration files
>>> Feature depends on:
>>> cxf-core 2.7.10
>>> cxf-databinding-jaxb 2.7.10
>>> cxf-bindings-soap 2.7.10
>>> cxf-http 2.7.10
>>> Feature contains followed bundles:
>>> mvn:org.apache.cxf/cxf-rt-frontend-simple/2.7.10 start-level=40
>>> mvn:org.apache.cxf/cxf-rt-frontend-jaxws/2.7.10 start-level=40
>>> 
>>> karaf@root> features:info cxf-http
>>> Description of cxf-http 2.7.10 feature
>>> ----------------------------------------------------------------
>>> Feature has no configuration
>>> Feature has no configuration files
>>> Feature depends on:
>>> cxf-core 2.7.10
>>> http-whiteboard [2,4)
>>> Feature contains followed bundles:
>>> mvn:org.apache.cxf/cxf-rt-transports-http/2.7.10 start-level=40
>>> 
>>> 
>>> Paul Spencer
>>> 
>> 
> 


Re: How do I configure the features-maven-plugin version 2.3.2 to include dependent features?

Posted by Paul Spencer <pa...@apache.org>.
Below is from the pom that fails to include the dependent feature http-whiteboard. The feature is a dependency of cxf-jaxws.

      <plugin>
         <groupId>org.apache.karaf.tooling</groupId>
            <artifactId>features-maven-plugin</artifactId>
            <version>2.3.2</version>

            <executions>
               <execution>
                  <id>add-features-to-repo</id>
                  <phase>generate-resources</phase>
                  <goals>
                     <goal>add-features-to-repo</goal>
                  </goals>
                  <configuration>
                  <descriptors>
                     <!--  Feature Descriptor Files -->
                     <descriptor>
                        mvn:org.apache.cxf.karaf/apache-cxf/2.7.6/xml/features
                     </descriptor> 
                  </descriptors>
                  <features>
                     <!--  Features to add to offline respository -->
                     <feature>http</feature>
                     <feature>cxf-jaxws</feature>
                  </features>
                  <repository>target/offline-repository</repository>
                  <karafVersion>2.3.4</karafVersion>
                  </configuration>
              </execution>
            </executions>
          </plugin>

Paul Spencer

On Mar 4, 2014, at 10:33 PM, Freeman Fang <fr...@gmail.com> wrote:

> Hi,
> 
> By default it will have all dependent features included, what's the exact problem you encounter?
> If your features.xml have multiple cxf version, you may encounter a issue[1] get fixed very recently
> [1]https://issues.apache.org/jira/browse/KARAF-2791
> -------------
> Freeman(Yue) Fang
> 
> Red Hat, Inc. 
> FuseSource is now part of Red Hat
> 
> 
> 
> On 2014-3-5, at 上午4:07, Paul Spencer wrote:
> 
>> How do I configure the features-maven-plugin version 2.3.2 to include dependent features?
>> 
>> As an example, I have include the jax-ws feature which depends on http-whiteboard.  I would like to have all dependent features includes, or be notified of dependent features that are not included.
>> 
>> karaf@root> features:info cxf-jaxws
>> Description of cxf-jaxws 2.7.10 feature
>> ----------------------------------------------------------------
>> Feature has no configuration
>> Feature has no configuration files
>> Feature depends on:
>>  cxf-core 2.7.10
>>  cxf-databinding-jaxb 2.7.10
>>  cxf-bindings-soap 2.7.10
>>  cxf-http 2.7.10
>> Feature contains followed bundles:
>> mvn:org.apache.cxf/cxf-rt-frontend-simple/2.7.10 start-level=40
>> mvn:org.apache.cxf/cxf-rt-frontend-jaxws/2.7.10 start-level=40
>> 
>> karaf@root> features:info cxf-http
>> Description of cxf-http 2.7.10 feature
>> ----------------------------------------------------------------
>> Feature has no configuration
>> Feature has no configuration files
>> Feature depends on:
>>  cxf-core 2.7.10
>>  http-whiteboard [2,4)
>> Feature contains followed bundles:
>> mvn:org.apache.cxf/cxf-rt-transports-http/2.7.10 start-level=40
>> 
>> 
>> Paul Spencer
>> 
> 


Re: How do I configure the features-maven-plugin version 2.3.2 to include dependent features?

Posted by Freeman Fang <fr...@gmail.com>.
Hi,

By default it will have all dependent features included, what's the exact problem you encounter?
If your features.xml have multiple cxf version, you may encounter a issue[1] get fixed very recently
[1]https://issues.apache.org/jira/browse/KARAF-2791
-------------
Freeman(Yue) Fang

Red Hat, Inc. 
FuseSource is now part of Red Hat



On 2014-3-5, at 上午4:07, Paul Spencer wrote:

> How do I configure the features-maven-plugin version 2.3.2 to include dependent features?
> 
> As an example, I have include the jax-ws feature which depends on http-whiteboard.  I would like to have all dependent features includes, or be notified of dependent features that are not included.
> 
> karaf@root> features:info cxf-jaxws
> Description of cxf-jaxws 2.7.10 feature
> ----------------------------------------------------------------
> Feature has no configuration
> Feature has no configuration files
> Feature depends on:
>  cxf-core 2.7.10
>  cxf-databinding-jaxb 2.7.10
>  cxf-bindings-soap 2.7.10
>  cxf-http 2.7.10
> Feature contains followed bundles:
> mvn:org.apache.cxf/cxf-rt-frontend-simple/2.7.10 start-level=40
> mvn:org.apache.cxf/cxf-rt-frontend-jaxws/2.7.10 start-level=40
> 
> karaf@root> features:info cxf-http
> Description of cxf-http 2.7.10 feature
> ----------------------------------------------------------------
> Feature has no configuration
> Feature has no configuration files
> Feature depends on:
>  cxf-core 2.7.10
>  http-whiteboard [2,4)
> Feature contains followed bundles:
> mvn:org.apache.cxf/cxf-rt-transports-http/2.7.10 start-level=40
> 
> 
> Paul Spencer
>