Got it to work as follows:
<features xmlns="http://karaf.apache.org/xmlns/features/v1.4.0"
name="enterprise-4.0.5">
<repository>mvn:org.apache.karaf.features/standard/${karaf-version}/xml/features</repository>
I didn't have a namespace in the <features> tag and I hadn't added the
Karaf standard repository descriptor.
That's all it took,
/Bengt
2016-06-29 16:08 GMT+02:00 Bengt Rodehav <[email protected]>:
> Did you ever get an answer to this?
>
> I get the same problem when upgrading from Karaf 2.4.1 to 4.0.5 and would
> like to know how you solved it.
>
> /Bengt
>
> 2013-09-27 14:55 GMT+02:00 A. Rothman <[email protected]>:
>
>> Hi,
>>
>> I'm trying to create an offline installation of karaf 2.3.3 containing
>> the dosgi and activemq features. The following configuration worked (when
>> adding the springsource release and ops4j sonatype snapshot repositories):
>>
>>
>> <plugin>
>> <groupId>org.apache.karaf.tooling</groupId>
>> <artifactId>features-maven-plugin</artifactId>
>> <version>2.3.3</version>
>> <executions>
>> <execution>
>> <id>add-features-to-repo</id>
>> <phase>generate-resources</phase>
>> <goals>
>> <goal>add-features-to-repo</goal>
>> </goals>
>> <configuration>
>> <karafVersion>2.3.3</karafVersion>
>> <addTransitiveFeatures>true</addTransitiveFeatures>
>> <descriptors>
>>
>> <descriptor>mvn:org.apache.activemq/activemq-karaf/5.8.0/xml/features</descriptor>
>>
>> <descriptor>mvn:org.apache.cxf.dosgi/cxf-dosgi/1.6-SNAPSHOT/xml/features</descriptor>
>> </descriptors>
>> <features>
>> <feature>cxf-dosgi-discovery-distributed</feature>
>> <feature>activemq-broker</feature>
>> </features>
>> <repository>target/features-repo</repository>
>> </configuration>
>> </execution>
>> </executions>
>> </plugin>
>>
>>
>> Next I tried upgrading to the new karaf-maven-plugin 3.0.0-SNAPSHOT: I
>> changed the plugin name and version to the new ones, and the goal name to
>> features-add-to-repository, so now it should be working with the new
>> plugin. However now the build fails:
>>
>>
>> [INFO] --- karaf-maven-plugin:3.0.0-SNAPSHOT:features-add-to-repository
>> (features-add-to-repository) @ com.intellitradegroup.custom-karaf ---
>> [INFO] Copying artifact:
>> org.apache.karaf.features:enterprise:xml:features:2.3.3
>> [WARNING] Can't add
>> mvn:org.apache.karaf.features/enterprise/2.3.3/xml/features in the
>> descriptors set
>> [INFO] Copying artifact:
>> org.apache.karaf.features:standard:xml:features:2.3.3
>> [WARNING] Can't add
>> mvn:org.apache.karaf.features/standard/2.3.3/xml/features in the
>> descriptors set
>> [INFO] Copying artifact:
>> org.apache.karaf.features:standard:xml:features:2.3.3
>> [WARNING] Can't add
>> mvn:org.apache.karaf.features/standard/2.3.3/xml/features in the
>> descriptors set
>> [INFO] Copying artifact:
>> org.apache.activemq:activemq-karaf:xml:features:5.8.0
>> [INFO] Copying artifact:
>> org.apache.cxf.dosgi:cxf-dosgi:xml:features:1.6-SNAPSHOT
>> [INFO] Copying artifact:
>> org.apache.cxf.karaf:apache-cxf:xml:features:2.7.6
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] BUILD FAILURE
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] Total time: 7.156s
>> [INFO] Finished at: Fri Sep 27 15:46:59 IDT 2013
>> [INFO] Final Memory: 26M/527M
>> [INFO]
>> ------------------------------------------------------------------------
>> [ERROR] Failed to execute goal
>> org.apache.karaf.tooling:karaf-maven-plugin:3.0.0-SNAPSHOT:features-add-to-repository
>> (features-add-to-repository) on project example.custom-karaf: Error
>> populating repository: Unable to find the feature 'http-whiteboard' ->
>> [Help 1]
>>
>>
>> I also tried removing the addTransitiveFeatures option (docs don't
>> mention it, though it seems to still be supported) and also changing the
>> karafVersion option to 3.0.0-SNAPSHOT (in case there's an issue with
>> cross-version repo creation), but the error persists.
>>
>> What else needs to be updated for the new plugin to work?
>>
>> Thanks,
>>
>> Amichai
>>
>>
>>
>