[
https://issues.apache.org/activemq/browse/SMX4KNL-217?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=50198#action_50198
]
Edell Nolan commented on SMX4KNL-217:
-------------------------------------
Attaching a patch - you will need the latest of the features maven plugin or
change the version in the generated pom
It depends on
<features.maven.plugin.version>1.1-SNAPSHOT</features.maven.plugin.version>
<servicemix.kernel.version>1.1.0-SNAPSHOT</servicemix.kernel.version>
Example here : if you run
Step1 :
C:\edell-features>mvn archetype:create
-DarchetypeGroupId=org.apache.servicemix.tooling
-DarchetypeArtifactId=servicemix-features-descriptor
-DgroupId=org.apache.servicemix.edell
-DartifactId=org.apache.servicemix.testCamel.features
-DarchetypeVersion=2008.01-SNAPSHOT -DremoteRepositories=REPO_LOCATION
This will generate the following directory structure
org.apache.servicemix.testCamel.features
-> pom.xml
-> src/main/resources/bundle.properties
If you run mvn install => this will result in a features.xml file with nothing
in it.
<?xml version="1.0" encoding="UTF-8"?>
<features>
</features>
Step 2:
Your next step is to add your dependencies into the pom.xml file
so if I added
<dependencies>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-core</artifactId>
<version>1.5.0</version>
</dependency>
</dependencies>
This will result in target/classes/feature.xml file
<?xml version="1.0" encoding="UTF-8"?>
<features>
<feature name='camel-core'>
<bundle>mvn:org.apache.camel/camel-core/1.5.0</bundle>
</feature>
</features>
But it will also hint in the output about dependant bundles
eg.
[WARNING] Unable to find suitable bundle for dependency javax.activation (0.0.
0) (required by camel-core)
[WARNING] Unable to find suitable bundle for dependency javax.xml.bind (0.0.0)
(required by camel-core)
[WARNING] Unable to find suitable bundle for dependency javax.xml.bind.annotat
ion (0.0.0) (required by camel-core)
Step 3:
You can add the dependant bundles to your bundle.properties file
So you get a resulting feature.xml file
<?xml version="1.0" encoding="UTF-8"?>
<features>
<feature name='camel-core'>
<bundle>mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.jaxb-api-2.1/1.2.0</bundle>
<bundle>mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.activation-api-1.1/1.2.0</bundle>
<bundle>mvn:org.apache.camel/camel-core/1.5.0</bundle>
</feature>
</features>
> Enhance features maven plugin to support deployment / undeployment of
> features, html generation and create a few archetypes
> ---------------------------------------------------------------------------------------------------------------------------
>
> Key: SMX4KNL-217
> URL: https://issues.apache.org/activemq/browse/SMX4KNL-217
> Project: ServiceMix Kernel
> Issue Type: New Feature
> Reporter: Charles Moulliard
> Assignee: Edell Nolan
> Attachments: SMXKNL-217-feature.patch
>
>
> Enhance the features maven plugin
> (http://svn.apache.org/repos/asf/servicemix/maven-plugins/features-maven-plugin)
> to support :
> 1) Deployment / undeployment of features,
> 2) Generate html page about features : see
> http://fusesource.com/forums/message.jspa?messageID=2005#2005 for the
> suggestion
> 3) Creation a few archetypes:
> - one for creating a custom smx kernel distribution + a set of
> features (like what we do for our distributions).
> - one for creating a feature descriptor automatically generated
> using the maven plugin we already have + upload in the maven repo. Ideally,
> the descriptor should be created from the user pom.xml profile file or
> (pom.xml files if the user has created a parent pom.xml with modules)
> - one for creating a manually written feature descriptor + upload in
> the maven repo
> The two last archetypes should reference our maven plugin so that they
> could be easily installed / uninstalled to a running (or not) smx4
> kernel instance using maven.
> Remark : this ticket has been created following discussions exchanged in the
> forum of SMX : http://www.nabble.com/forum/ViewPost.jtp?post=22285345&framed=y
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.