You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@karaf.apache.org by "Freeman Fang (JIRA)" <ji...@apache.org> on 2015/04/16 12:24:59 UTC
[jira] [Comment Edited] (KARAF-3601) karaf-maven-plugin - support
feature
[ https://issues.apache.org/jira/browse/KARAF-3601?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14497877#comment-14497877 ]
Freeman Fang edited comment on KARAF-3601 at 4/16/15 10:24 AM:
---------------------------------------------------------------
Hi Martin,
Seems you are still use "features-add-to-repository" from Karaf 2.x of features-maven-plugin, but start from karaf 3 we have "install-kars" and "instance-create-archive" which is similar as "features-add-to-repository" but we suggest to use those goals in karaf 3.
so with configuration like
{code}
<plugin>
<groupId>org.apache.karaf.tooling</groupId>
<artifactId>karaf-maven-plugin</artifactId>
<executions>
<execution>
<id>install-kar</id>
<phase>compile</phase>
<goals>
<goal>install-kars</goal>
</goals>
</execution>
<execution>
<id>package</id>
<goals>
<goal>instance-create-archive</goal>
</goals>
</execution>
</executions>
<configuration>
<installedFeatures>
<feature>wrapper</feature>
</installedFeatures>
<bootFeatures>
<feature>webconsole</feature>
<feature>standard</feature>
<feature>management</feature>
<feature>ssh</feature>
<feature>config</feature>
<feature>region</feature>
<feature>package</feature>
<feature>kar</feature>
</bootFeatures>
</configuration>
</plugin>
{code}
you can see the webconsole related bundle get added
{code}
[INFO] = Installing configuration files from standard feature
[INFO] = Installing conditional [webconsole_split_for_name_and_version_0.0.0]
[INFO] == Installing bundle mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.instance/3.0.4-SNAPSHOT
[INFO] == Installing bundle mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.features/3.0.4-SNAPSHOT
[INFO] == Installing bundle mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.gogo/3.0.4-SNAPSHOT
[INFO] == Installing bundle mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.http/3.0.4-SNAPSHOT
{code}
You can get more details from
assemblies/apache-karaf/pom.xml
Freeman
was (Author: ffang):
Hi Martin,
Seems you are still use "features-add-to-repository" from Karaf 2.x of features-maven-plugin, but start from karaf 3 we have "install-kars" and "instance-create-archive" which is similar as "features-add-to-repository" but we suggest to use those goals in karaf 3.
so with configuration like
{code}
<plugin>
<groupId>org.apache.karaf.tooling</groupId>
<artifactId>karaf-maven-plugin</artifactId>
<executions>
<execution>
<id>install-kar</id>
<phase>compile</phase>
<goals>
<goal>install-kars</goal>
</goals>
</execution>
<execution>
<id>package</id>
<goals>
<goal>instance-create-archive</goal>
</goals>
</execution>
</executions>
<configuration>
<installedFeatures>
<feature>wrapper</feature>
</installedFeatures>
<bootFeatures>
<feature>webconsole</feature>
<feature>standard</feature>
<feature>management</feature>
<feature>ssh</feature>
<feature>config</feature>
<feature>region</feature>
<feature>package</feature>
<feature>kar</feature>
</bootFeatures>
</configuration>
</plugin>
{code}
you can see the webconsole related bundle get added
{code}
[INFO] = Installing configuration files from standard feature
[INFO] = Installing conditional [webconsole_split_for_name_and_version_0.0.0]
[INFO] == Installing bundle mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.instance/3.0.4-SNAPSHOT
[INFO] == Installing bundle mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.features/3.0.4-SNAPSHOT
[INFO] == Installing bundle mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.gogo/3.0.4-SNAPSHOT
[INFO] == Installing bundle mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.http/3.0.4-SNAPSHOT
{code}
> karaf-maven-plugin - support feature <conditional>
> --------------------------------------------------
>
> Key: KARAF-3601
> URL: https://issues.apache.org/jira/browse/KARAF-3601
> Project: Karaf
> Issue Type: Improvement
> Affects Versions: 3.0.3
> Reporter: Martin Lichtin
> Assignee: Freeman Fang
>
> This is a followup on http://karaf.922171.n3.nabble.com/How-does-conditional-work-in-feature-files-tp4038880p4038888.html
> When configuring the plugin with:
> {noformat}
> <descriptors>
> <descriptor>mvn:org.apache.karaf.features/spring/3.0.3/xml/features</descriptor>
> <descriptor>mvn:org.apache.karaf.features/standard/3.0.3/xml/features</descriptor>
> </descriptors>
> <features>
> <feature>webconsole</feature>
> ...
> {noformat}
> karaf-maven-plugin will not include the bundles that are inside the "webconsole" conditional of "standard".
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)