You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@karaf.apache.org by "Adrian Trenaman (JIRA)" <ji...@apache.org> on 2010/08/25 19:44:16 UTC

[jira] Created: (KARAF-165) A better 'feature-assembly' plugin

A better 'feature-assembly' plugin
----------------------------------

                 Key: KARAF-165
                 URL: https://issues.apache.org/jira/browse/KARAF-165
             Project: Karaf
          Issue Type: New Feature
    Affects Versions: 2.2.0
            Reporter: Adrian Trenaman




Create an improved Maven feature-assembly plugin. Right now, to make a feature I've got to add almost a hundred lines of Maven verbage to my pom.xml in order to assemble a feature. I've got to use the attach-artifact goal of the org.codehaus.mojo/build-helper-maven-plugin to deploy my features file into Maven. I've got to use the add-features-to-repo goal from the org.apache.karaf.tooling/features-maven-plugin to suck down all the dependent bundles. I've got to a whole load of other stuff to perform the packaging to .tar.gz and .zip. The problem here is that I'm using a whole load of generic plugins to do a very specific job, and I'm having to tell the plugins what to do instead of telling them what I want done. I'd prefer to have a single more declarative plugin to do this. It might look like this:  

{code:xml}
			<plugin>
				<groupId>org.apache.karaf.tooling</groupId>
				<artifactId>feature-assembly-plugin</artifactId>
				<version>2.2.0</version>
				<executions>
					<execution>
						<id>create-repo</id>
						<phase>generate-resources</phase>
						<goals>
							<goal>create-repo</goal>
						</goals>
						<configuration>
							<!-- Specify the feature file to use. -->
							<featureFile>file:${basedir}/target/classes/features.xml</featureFile>
	
							<!-- Specify what features to include. This is actually optional: if no features
								are specified, then include all features in the file by default. --> 
							<features>
								<feature>feature-a</feature>
							</features>
						</configuration>
					</execution>
				</executions>
			</plugin>
{code}

The plugin should produce a .tar.gz and .zip file, containing the feature descriptor (and all dependent descriptors) and all bundles (and dependent bundles)in a Maven-style directory, similar to the system/ directory currently used in Karaf. Note that this plugin doesn't need you to list out all the feature repositories / descriptors that your feature file may transitively include - it will detect these dependencies at runtime and work out the details.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (KARAF-165) A better 'feature-assembly' plugin

Posted by "Adrian Trenaman (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/KARAF-165?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Adrian Trenaman reassigned KARAF-165:
-------------------------------------

    Assignee: Adrian Trenaman

> A better 'feature-assembly' plugin
> ----------------------------------
>
>                 Key: KARAF-165
>                 URL: https://issues.apache.org/jira/browse/KARAF-165
>             Project: Karaf
>          Issue Type: New Feature
>    Affects Versions: 2.1.0
>            Reporter: Adrian Trenaman
>            Assignee: Adrian Trenaman
>
> Create an improved Maven feature-assembly plugin. Right now, to make a feature I've got to add almost a hundred lines of Maven verbage to my pom.xml in order to assemble a feature. I've got to use the attach-artifact goal of the org.codehaus.mojo/build-helper-maven-plugin to deploy my features file into Maven. I've got to use the add-features-to-repo goal from the org.apache.karaf.tooling/features-maven-plugin to suck down all the dependent bundles. I've got to a whole load of other stuff to perform the packaging to .tar.gz and .zip. The problem here is that I'm using a whole load of generic plugins to do a very specific job, and I'm having to tell the plugins what to do instead of telling them what I want done. I'd prefer to have a single more declarative plugin to do this. It might look like this:  
> {code:xml}
> 			<plugin>
> 				<groupId>org.apache.karaf.tooling</groupId>
> 				<artifactId>feature-assembly-plugin</artifactId>
> 				<version>2.2.0</version>
> 				<executions>
> 					<execution>
> 						<id>create-repo</id>
> 						<phase>generate-resources</phase>
> 						<goals>
> 							<goal>create-repo</goal>
> 						</goals>
> 						<configuration>
> 							<!-- Specify the feature file to use. -->
> 							<featureFile>file:${basedir}/target/classes/features.xml</featureFile>
> 	
> 							<!-- Specify what features to include. This is actually optional: if no features
> 								are specified, then include all features in the file by default. --> 
> 							<features>
> 								<feature>feature-a</feature>
> 							</features>
> 						</configuration>
> 					</execution>
> 				</executions>
> 			</plugin>
> {code}
> The plugin should produce a .tar.gz and .zip file, containing the feature descriptor (and all dependent descriptors) and all bundles (and dependent bundles)in a Maven-style directory, similar to the system/ directory currently used in Karaf. Note that this plugin doesn't need you to list out all the feature repositories / descriptors that your feature file may transitively include - it will detect these dependencies at runtime and work out the details.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (KARAF-165) A better 'feature-assembly' plugin

Posted by "Charles Moulliard (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/KARAF-165?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12903237#action_12903237 ] 

Charles Moulliard commented on KARAF-165:
-----------------------------------------

To be complete, we need also this property in the plugin

 <repository>target/features-repo</repository> 

> A better 'feature-assembly' plugin
> ----------------------------------
>
>                 Key: KARAF-165
>                 URL: https://issues.apache.org/jira/browse/KARAF-165
>             Project: Karaf
>          Issue Type: New Feature
>    Affects Versions: 2.2.0
>            Reporter: Adrian Trenaman
>
> Create an improved Maven feature-assembly plugin. Right now, to make a feature I've got to add almost a hundred lines of Maven verbage to my pom.xml in order to assemble a feature. I've got to use the attach-artifact goal of the org.codehaus.mojo/build-helper-maven-plugin to deploy my features file into Maven. I've got to use the add-features-to-repo goal from the org.apache.karaf.tooling/features-maven-plugin to suck down all the dependent bundles. I've got to a whole load of other stuff to perform the packaging to .tar.gz and .zip. The problem here is that I'm using a whole load of generic plugins to do a very specific job, and I'm having to tell the plugins what to do instead of telling them what I want done. I'd prefer to have a single more declarative plugin to do this. It might look like this:  
> {code:xml}
> 			<plugin>
> 				<groupId>org.apache.karaf.tooling</groupId>
> 				<artifactId>feature-assembly-plugin</artifactId>
> 				<version>2.2.0</version>
> 				<executions>
> 					<execution>
> 						<id>create-repo</id>
> 						<phase>generate-resources</phase>
> 						<goals>
> 							<goal>create-repo</goal>
> 						</goals>
> 						<configuration>
> 							<!-- Specify the feature file to use. -->
> 							<featureFile>file:${basedir}/target/classes/features.xml</featureFile>
> 	
> 							<!-- Specify what features to include. This is actually optional: if no features
> 								are specified, then include all features in the file by default. --> 
> 							<features>
> 								<feature>feature-a</feature>
> 							</features>
> 						</configuration>
> 					</execution>
> 				</executions>
> 			</plugin>
> {code}
> The plugin should produce a .tar.gz and .zip file, containing the feature descriptor (and all dependent descriptors) and all bundles (and dependent bundles)in a Maven-style directory, similar to the system/ directory currently used in Karaf. Note that this plugin doesn't need you to list out all the feature repositories / descriptors that your feature file may transitively include - it will detect these dependencies at runtime and work out the details.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (KARAF-165) A better 'feature-assembly' plugin

Posted by "Charles Moulliard (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/KARAF-165?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12903353#action_12903353 ] 

Charles Moulliard commented on KARAF-165:
-----------------------------------------

Hi Ade,

* You've got to recursively figure out the repositories and then add them as descriptors to this plugin configuration
* You've got to list all the features you want incuded
>>> Using recursion is interesting but means also that all the features defined in a feature file will be added even if you don't want them. Sometimes, a feature file refers to another feature repository and can potentially create cycling dependency (In this case, this is not important I think).

* You've got to specify the target repository (I'd prefer a well known name or convention)
>>> What do you want to do which is not implemented in the existing karaf tooling plugin (target repo can be what you want --> target/myProject) ?

* This plugin will put all the bundles in the target repository, but not the features file itself!
>>> This is a bit "tirer par les cheveux" but you can add the feature file in the feature file like this :

    <feature name="karaf-features" version="2.0.0">
        <bundle>file://c:/chm/repository/org/apache/karaf/apache-karaf/2.0.0/apache-karaf-2.0.0-features.xml&lt;/bundle>
    </feature>

and call using the maven plugin the feature --> <feature>karaf-features</feature>

Regards,

Charles 

> A better 'feature-assembly' plugin
> ----------------------------------
>
>                 Key: KARAF-165
>                 URL: https://issues.apache.org/jira/browse/KARAF-165
>             Project: Karaf
>          Issue Type: New Feature
>    Affects Versions: 2.2.0
>            Reporter: Adrian Trenaman
>
> Create an improved Maven feature-assembly plugin. Right now, to make a feature I've got to add almost a hundred lines of Maven verbage to my pom.xml in order to assemble a feature. I've got to use the attach-artifact goal of the org.codehaus.mojo/build-helper-maven-plugin to deploy my features file into Maven. I've got to use the add-features-to-repo goal from the org.apache.karaf.tooling/features-maven-plugin to suck down all the dependent bundles. I've got to a whole load of other stuff to perform the packaging to .tar.gz and .zip. The problem here is that I'm using a whole load of generic plugins to do a very specific job, and I'm having to tell the plugins what to do instead of telling them what I want done. I'd prefer to have a single more declarative plugin to do this. It might look like this:  
> {code:xml}
> 			<plugin>
> 				<groupId>org.apache.karaf.tooling</groupId>
> 				<artifactId>feature-assembly-plugin</artifactId>
> 				<version>2.2.0</version>
> 				<executions>
> 					<execution>
> 						<id>create-repo</id>
> 						<phase>generate-resources</phase>
> 						<goals>
> 							<goal>create-repo</goal>
> 						</goals>
> 						<configuration>
> 							<!-- Specify the feature file to use. -->
> 							<featureFile>file:${basedir}/target/classes/features.xml</featureFile>
> 	
> 							<!-- Specify what features to include. This is actually optional: if no features
> 								are specified, then include all features in the file by default. --> 
> 							<features>
> 								<feature>feature-a</feature>
> 							</features>
> 						</configuration>
> 					</execution>
> 				</executions>
> 			</plugin>
> {code}
> The plugin should produce a .tar.gz and .zip file, containing the feature descriptor (and all dependent descriptors) and all bundles (and dependent bundles)in a Maven-style directory, similar to the system/ directory currently used in Karaf. Note that this plugin doesn't need you to list out all the feature repositories / descriptors that your feature file may transitively include - it will detect these dependencies at runtime and work out the details.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (KARAF-165) A better 'feature-assembly' plugin

Posted by "Adrian Trenaman (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/KARAF-165?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12903244#action_12903244 ] 

Adrian Trenaman commented on KARAF-165:
---------------------------------------

This plugin is just the start of what I would like to see. Right now, the current feature has the following problems: 

* You've got to recursively figure out the repositories and then add them as descriptors to this plugin configuration
* You've got to list all the features you want incuded
* You've got to specify the target repository (I'd prefer a well known name or convention)
* This plugin will put all the bundles in the target repository, but not the features file itself!
* This plugin doesn't go the full distance and create a .tar.gz and .zip file, with the contents of the XML files suitably transformed for Linux/Windows ending.

As a result, you end up having to do a lot of work by hand in the POM (almost 100 lines of Maven) in order to create an assembly. I'm raising this issue because I think that this plugin could be a lot smarter, and do more, for less! 

> A better 'feature-assembly' plugin
> ----------------------------------
>
>                 Key: KARAF-165
>                 URL: https://issues.apache.org/jira/browse/KARAF-165
>             Project: Karaf
>          Issue Type: New Feature
>    Affects Versions: 2.2.0
>            Reporter: Adrian Trenaman
>
> Create an improved Maven feature-assembly plugin. Right now, to make a feature I've got to add almost a hundred lines of Maven verbage to my pom.xml in order to assemble a feature. I've got to use the attach-artifact goal of the org.codehaus.mojo/build-helper-maven-plugin to deploy my features file into Maven. I've got to use the add-features-to-repo goal from the org.apache.karaf.tooling/features-maven-plugin to suck down all the dependent bundles. I've got to a whole load of other stuff to perform the packaging to .tar.gz and .zip. The problem here is that I'm using a whole load of generic plugins to do a very specific job, and I'm having to tell the plugins what to do instead of telling them what I want done. I'd prefer to have a single more declarative plugin to do this. It might look like this:  
> {code:xml}
> 			<plugin>
> 				<groupId>org.apache.karaf.tooling</groupId>
> 				<artifactId>feature-assembly-plugin</artifactId>
> 				<version>2.2.0</version>
> 				<executions>
> 					<execution>
> 						<id>create-repo</id>
> 						<phase>generate-resources</phase>
> 						<goals>
> 							<goal>create-repo</goal>
> 						</goals>
> 						<configuration>
> 							<!-- Specify the feature file to use. -->
> 							<featureFile>file:${basedir}/target/classes/features.xml</featureFile>
> 	
> 							<!-- Specify what features to include. This is actually optional: if no features
> 								are specified, then include all features in the file by default. --> 
> 							<features>
> 								<feature>feature-a</feature>
> 							</features>
> 						</configuration>
> 					</execution>
> 				</executions>
> 			</plugin>
> {code}
> The plugin should produce a .tar.gz and .zip file, containing the feature descriptor (and all dependent descriptors) and all bundles (and dependent bundles)in a Maven-style directory, similar to the system/ directory currently used in Karaf. Note that this plugin doesn't need you to list out all the feature repositories / descriptors that your feature file may transitively include - it will detect these dependencies at runtime and work out the details.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Issue Comment Edited: (KARAF-165) A better 'feature-assembly' plugin

Posted by "Charles Moulliard (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/KARAF-165?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12903353#action_12903353 ] 

Charles Moulliard edited comment on KARAF-165 at 8/27/10 6:05 AM:
------------------------------------------------------------------

Hi Ade,

* You've got to recursively figure out the repositories and then add them as descriptors to this plugin configuration
* You've got to list all the features you want incuded
>>> Using recursion is interesting but means also that all the features defined in a feature file will be added even if you don't want them. Sometimes, a feature file refers to another feature repository and can potentially create cycling dependency (In this case, this is not important I think).

* You've got to specify the target repository (I'd prefer a well known name or convention)
>>> What do you want to do which is not implemented in the existing karaf tooling plugin (target repo can be what you want --> target/myProject) ?

* This plugin will put all the bundles in the target repository, but not the features file itself!
>>> This is a bit "tirer par les cheveux" but you can add the feature file in the feature file like this :

    <feature name="karaf-features" version="2.0.0">
        <bundle>mvn:org.apache.karaf/apache-karaf/2.0.0/xml/features</bundle>
    </feature>

and call using the maven plugin the feature --> <feature>karaf-features</feature>

Regards,

Charles 

      was (Author: cmoulliard):
    Hi Ade,

* You've got to recursively figure out the repositories and then add them as descriptors to this plugin configuration
* You've got to list all the features you want incuded
>>> Using recursion is interesting but means also that all the features defined in a feature file will be added even if you don't want them. Sometimes, a feature file refers to another feature repository and can potentially create cycling dependency (In this case, this is not important I think).

* You've got to specify the target repository (I'd prefer a well known name or convention)
>>> What do you want to do which is not implemented in the existing karaf tooling plugin (target repo can be what you want --> target/myProject) ?

* This plugin will put all the bundles in the target repository, but not the features file itself!
>>> This is a bit "tirer par les cheveux" but you can add the feature file in the feature file like this :

    <feature name="karaf-features" version="2.0.0">
        <bundle>file://c:/chm/repository/org/apache/karaf/apache-karaf/2.0.0/apache-karaf-2.0.0-features.xml&lt;/bundle>
    </feature>

and call using the maven plugin the feature --> <feature>karaf-features</feature>

Regards,

Charles 
  
> A better 'feature-assembly' plugin
> ----------------------------------
>
>                 Key: KARAF-165
>                 URL: https://issues.apache.org/jira/browse/KARAF-165
>             Project: Karaf
>          Issue Type: New Feature
>    Affects Versions: 2.2.0
>            Reporter: Adrian Trenaman
>
> Create an improved Maven feature-assembly plugin. Right now, to make a feature I've got to add almost a hundred lines of Maven verbage to my pom.xml in order to assemble a feature. I've got to use the attach-artifact goal of the org.codehaus.mojo/build-helper-maven-plugin to deploy my features file into Maven. I've got to use the add-features-to-repo goal from the org.apache.karaf.tooling/features-maven-plugin to suck down all the dependent bundles. I've got to a whole load of other stuff to perform the packaging to .tar.gz and .zip. The problem here is that I'm using a whole load of generic plugins to do a very specific job, and I'm having to tell the plugins what to do instead of telling them what I want done. I'd prefer to have a single more declarative plugin to do this. It might look like this:  
> {code:xml}
> 			<plugin>
> 				<groupId>org.apache.karaf.tooling</groupId>
> 				<artifactId>feature-assembly-plugin</artifactId>
> 				<version>2.2.0</version>
> 				<executions>
> 					<execution>
> 						<id>create-repo</id>
> 						<phase>generate-resources</phase>
> 						<goals>
> 							<goal>create-repo</goal>
> 						</goals>
> 						<configuration>
> 							<!-- Specify the feature file to use. -->
> 							<featureFile>file:${basedir}/target/classes/features.xml</featureFile>
> 	
> 							<!-- Specify what features to include. This is actually optional: if no features
> 								are specified, then include all features in the file by default. --> 
> 							<features>
> 								<feature>feature-a</feature>
> 							</features>
> 						</configuration>
> 					</execution>
> 				</executions>
> 			</plugin>
> {code}
> The plugin should produce a .tar.gz and .zip file, containing the feature descriptor (and all dependent descriptors) and all bundles (and dependent bundles)in a Maven-style directory, similar to the system/ directory currently used in Karaf. Note that this plugin doesn't need you to list out all the feature repositories / descriptors that your feature file may transitively include - it will detect these dependencies at runtime and work out the details.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Issue Comment Edited: (KARAF-165) A better 'feature-assembly' plugin

Posted by "Charles Moulliard (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/KARAF-165?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12903234#action_12903234 ] 

Charles Moulliard edited comment on KARAF-165 at 8/27/10 1:32 AM:
------------------------------------------------------------------

Hi Ade,

Is this maven plugin not doing what you want -->

{code}
            <plugin>
                <groupId>org.apache.karaf.tooling</groupId>
                <artifactId>features-maven-plugin</artifactId>
                <version>${karaf.version}</version>
                <executions>
                    <execution>
                        <id>add-features-to-repo</id>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>add-features-to-repo</goal>
                        </goals>
                        <configuration>
                            <descriptors>
                                <descriptor>mvn:org.apache.karaf/apache-karaf/${karaf.version}/xml/features</descriptor>
                                <descriptor>mvn:org.apache.servicemix.nmr/apache-servicemix-nmr/${servicemix.nmr.version}/xml/features</descriptor>
                                <descriptor>file:${basedir}/target/classes/camel-features.xml</descriptor>
                                <descriptor>file:${basedir}/target/classes/ode-features.xml</descriptor>
                                <descriptor>file:${basedir}/target/classes/features.xml</descriptor>
                            </descriptors>
                            <features>
                                <feature>jbi-cluster</feature>
                                <feature>web</feature>
                                <feature>cxf-nmr</feature>
                                <feature>cxf-osgi</feature>
                                <feature>camel-activemq</feature>  
                                <!-- ServiceMix components -->
                                <feature>servicemix-cxf-bc</feature>
                                <feature>servicemix-file</feature>
                                <feature>servicemix-ftp</feature>
                                <feature>servicemix-http</feature>
                                <feature>servicemix-jms</feature>
                                <feature>servicemix-mail</feature>
                                <feature>servicemix-bean</feature>
                                <feature>servicemix-camel</feature>
                                <feature>servicemix-cxf-se</feature>
                                <feature>servicemix-drools</feature>
                                <feature>servicemix-eip</feature>
                                <feature>servicemix-osworkflow</feature>
                                <feature>servicemix-quartz</feature>
                                <feature>servicemix-scripting</feature>
                                <feature>servicemix-validation</feature>
                                <feature>servicemix-saxon</feature>
                                <feature>servicemix-wsn2005</feature>
                                <feature>servicemix-snmp</feature>
                                <feature>servicemix-vfs</feature>
                                <feature>servicemix-smpp</feature>
                            </features>
                            <repository>target/features-repo</repository>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

{code}

      was (Author: cmoulliard):
    Hi Ade,

Is this maven plugin not doign what you want -->

{code}
            <plugin>
                <groupId>org.apache.karaf.tooling</groupId>
                <artifactId>features-maven-plugin</artifactId>
                <version>${karaf.version}</version>
                <executions>
                    <execution>
                        <id>add-features-to-repo</id>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>add-features-to-repo</goal>
                        </goals>
                        <configuration>
                            <descriptors>
                                <descriptor>mvn:org.apache.karaf/apache-karaf/${karaf.version}/xml/features</descriptor>
                                <descriptor>mvn:org.apache.servicemix.nmr/apache-servicemix-nmr/${servicemix.nmr.version}/xml/features</descriptor>
                                <descriptor>file:${basedir}/target/classes/camel-features.xml</descriptor>
                                <descriptor>file:${basedir}/target/classes/ode-features.xml</descriptor>
                                <descriptor>file:${basedir}/target/classes/features.xml</descriptor>
                            </descriptors>
                            <features>
                                <feature>jbi-cluster</feature>
                                <feature>web</feature>
                                <feature>cxf-nmr</feature>
                                <feature>cxf-osgi</feature>
                                <feature>camel-activemq</feature>  
                                <!-- ServiceMix components -->
                                <feature>servicemix-cxf-bc</feature>
                                <feature>servicemix-file</feature>
                                <feature>servicemix-ftp</feature>
                                <feature>servicemix-http</feature>
                                <feature>servicemix-jms</feature>
                                <feature>servicemix-mail</feature>
                                <feature>servicemix-bean</feature>
                                <feature>servicemix-camel</feature>
                                <feature>servicemix-cxf-se</feature>
                                <feature>servicemix-drools</feature>
                                <feature>servicemix-eip</feature>
                                <feature>servicemix-osworkflow</feature>
                                <feature>servicemix-quartz</feature>
                                <feature>servicemix-scripting</feature>
                                <feature>servicemix-validation</feature>
                                <feature>servicemix-saxon</feature>
                                <feature>servicemix-wsn2005</feature>
                                <feature>servicemix-snmp</feature>
                                <feature>servicemix-vfs</feature>
                                <feature>servicemix-smpp</feature>
                            </features>
                            <repository>target/features-repo</repository>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

{code
  
> A better 'feature-assembly' plugin
> ----------------------------------
>
>                 Key: KARAF-165
>                 URL: https://issues.apache.org/jira/browse/KARAF-165
>             Project: Karaf
>          Issue Type: New Feature
>    Affects Versions: 2.2.0
>            Reporter: Adrian Trenaman
>
> Create an improved Maven feature-assembly plugin. Right now, to make a feature I've got to add almost a hundred lines of Maven verbage to my pom.xml in order to assemble a feature. I've got to use the attach-artifact goal of the org.codehaus.mojo/build-helper-maven-plugin to deploy my features file into Maven. I've got to use the add-features-to-repo goal from the org.apache.karaf.tooling/features-maven-plugin to suck down all the dependent bundles. I've got to a whole load of other stuff to perform the packaging to .tar.gz and .zip. The problem here is that I'm using a whole load of generic plugins to do a very specific job, and I'm having to tell the plugins what to do instead of telling them what I want done. I'd prefer to have a single more declarative plugin to do this. It might look like this:  
> {code:xml}
> 			<plugin>
> 				<groupId>org.apache.karaf.tooling</groupId>
> 				<artifactId>feature-assembly-plugin</artifactId>
> 				<version>2.2.0</version>
> 				<executions>
> 					<execution>
> 						<id>create-repo</id>
> 						<phase>generate-resources</phase>
> 						<goals>
> 							<goal>create-repo</goal>
> 						</goals>
> 						<configuration>
> 							<!-- Specify the feature file to use. -->
> 							<featureFile>file:${basedir}/target/classes/features.xml</featureFile>
> 	
> 							<!-- Specify what features to include. This is actually optional: if no features
> 								are specified, then include all features in the file by default. --> 
> 							<features>
> 								<feature>feature-a</feature>
> 							</features>
> 						</configuration>
> 					</execution>
> 				</executions>
> 			</plugin>
> {code}
> The plugin should produce a .tar.gz and .zip file, containing the feature descriptor (and all dependent descriptors) and all bundles (and dependent bundles)in a Maven-style directory, similar to the system/ directory currently used in Karaf. Note that this plugin doesn't need you to list out all the feature repositories / descriptors that your feature file may transitively include - it will detect these dependencies at runtime and work out the details.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (KARAF-165) A better 'feature-assembly' plugin

Posted by "Adrian Trenaman (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/KARAF-165?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12903395#action_12903395 ] 

Adrian Trenaman commented on KARAF-165:
---------------------------------------

Thanks for the input Charles! 

I actually do want to be able to recursively pull down whatever dependencies I need: I just want to pull down the features in my own feature file, and then just dependent features from any other repositories. So, if I have a camel route in a bundle that needs camel-core and camel-jms, then I'd like to pull down these features as well with ease. 

I get your point that, right now, I have full control over naming my repository. Thing is, my goal is to make this REALLY SIMPLE. So, if we can get away without having to ask that the developer makes a decision about naming, but instead uses a well known convention by default, then I'm all for it. 

Love the hack about adding the feature repository as a feature! Still though, for me, it is a hack and our user shouldn't have to do it. 

Please understand my motivations. I know that right now I can do everything I want to with a whole load of Maven plugins! That's exactly the problem though: I just want this assembly packaging to be easier, and not require screenfuls of Maven to acheive.  


> A better 'feature-assembly' plugin
> ----------------------------------
>
>                 Key: KARAF-165
>                 URL: https://issues.apache.org/jira/browse/KARAF-165
>             Project: Karaf
>          Issue Type: New Feature
>    Affects Versions: 2.2.0
>            Reporter: Adrian Trenaman
>
> Create an improved Maven feature-assembly plugin. Right now, to make a feature I've got to add almost a hundred lines of Maven verbage to my pom.xml in order to assemble a feature. I've got to use the attach-artifact goal of the org.codehaus.mojo/build-helper-maven-plugin to deploy my features file into Maven. I've got to use the add-features-to-repo goal from the org.apache.karaf.tooling/features-maven-plugin to suck down all the dependent bundles. I've got to a whole load of other stuff to perform the packaging to .tar.gz and .zip. The problem here is that I'm using a whole load of generic plugins to do a very specific job, and I'm having to tell the plugins what to do instead of telling them what I want done. I'd prefer to have a single more declarative plugin to do this. It might look like this:  
> {code:xml}
> 			<plugin>
> 				<groupId>org.apache.karaf.tooling</groupId>
> 				<artifactId>feature-assembly-plugin</artifactId>
> 				<version>2.2.0</version>
> 				<executions>
> 					<execution>
> 						<id>create-repo</id>
> 						<phase>generate-resources</phase>
> 						<goals>
> 							<goal>create-repo</goal>
> 						</goals>
> 						<configuration>
> 							<!-- Specify the feature file to use. -->
> 							<featureFile>file:${basedir}/target/classes/features.xml</featureFile>
> 	
> 							<!-- Specify what features to include. This is actually optional: if no features
> 								are specified, then include all features in the file by default. --> 
> 							<features>
> 								<feature>feature-a</feature>
> 							</features>
> 						</configuration>
> 					</execution>
> 				</executions>
> 			</plugin>
> {code}
> The plugin should produce a .tar.gz and .zip file, containing the feature descriptor (and all dependent descriptors) and all bundles (and dependent bundles)in a Maven-style directory, similar to the system/ directory currently used in Karaf. Note that this plugin doesn't need you to list out all the feature repositories / descriptors that your feature file may transitively include - it will detect these dependencies at runtime and work out the details.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (KARAF-165) A better 'feature-assembly' plugin

Posted by "Charles Moulliard (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/KARAF-165?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12903234#action_12903234 ] 

Charles Moulliard commented on KARAF-165:
-----------------------------------------

Hi Ade,

Is this maven plugin not doign what you want -->

{code}
            <plugin>
                <groupId>org.apache.karaf.tooling</groupId>
                <artifactId>features-maven-plugin</artifactId>
                <version>${karaf.version}</version>
                <executions>
                    <execution>
                        <id>add-features-to-repo</id>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>add-features-to-repo</goal>
                        </goals>
                        <configuration>
                            <descriptors>
                                <descriptor>mvn:org.apache.karaf/apache-karaf/${karaf.version}/xml/features</descriptor>
                                <descriptor>mvn:org.apache.servicemix.nmr/apache-servicemix-nmr/${servicemix.nmr.version}/xml/features</descriptor>
                                <descriptor>file:${basedir}/target/classes/camel-features.xml</descriptor>
                                <descriptor>file:${basedir}/target/classes/ode-features.xml</descriptor>
                                <descriptor>file:${basedir}/target/classes/features.xml</descriptor>
                            </descriptors>
                            <features>
                                <feature>jbi-cluster</feature>
                                <feature>web</feature>
                                <feature>cxf-nmr</feature>
                                <feature>cxf-osgi</feature>
                                <feature>camel-activemq</feature>  
                                <!-- ServiceMix components -->
                                <feature>servicemix-cxf-bc</feature>
                                <feature>servicemix-file</feature>
                                <feature>servicemix-ftp</feature>
                                <feature>servicemix-http</feature>
                                <feature>servicemix-jms</feature>
                                <feature>servicemix-mail</feature>
                                <feature>servicemix-bean</feature>
                                <feature>servicemix-camel</feature>
                                <feature>servicemix-cxf-se</feature>
                                <feature>servicemix-drools</feature>
                                <feature>servicemix-eip</feature>
                                <feature>servicemix-osworkflow</feature>
                                <feature>servicemix-quartz</feature>
                                <feature>servicemix-scripting</feature>
                                <feature>servicemix-validation</feature>
                                <feature>servicemix-saxon</feature>
                                <feature>servicemix-wsn2005</feature>
                                <feature>servicemix-snmp</feature>
                                <feature>servicemix-vfs</feature>
                                <feature>servicemix-smpp</feature>
                            </features>
                            <repository>target/features-repo</repository>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

{code

> A better 'feature-assembly' plugin
> ----------------------------------
>
>                 Key: KARAF-165
>                 URL: https://issues.apache.org/jira/browse/KARAF-165
>             Project: Karaf
>          Issue Type: New Feature
>    Affects Versions: 2.2.0
>            Reporter: Adrian Trenaman
>
> Create an improved Maven feature-assembly plugin. Right now, to make a feature I've got to add almost a hundred lines of Maven verbage to my pom.xml in order to assemble a feature. I've got to use the attach-artifact goal of the org.codehaus.mojo/build-helper-maven-plugin to deploy my features file into Maven. I've got to use the add-features-to-repo goal from the org.apache.karaf.tooling/features-maven-plugin to suck down all the dependent bundles. I've got to a whole load of other stuff to perform the packaging to .tar.gz and .zip. The problem here is that I'm using a whole load of generic plugins to do a very specific job, and I'm having to tell the plugins what to do instead of telling them what I want done. I'd prefer to have a single more declarative plugin to do this. It might look like this:  
> {code:xml}
> 			<plugin>
> 				<groupId>org.apache.karaf.tooling</groupId>
> 				<artifactId>feature-assembly-plugin</artifactId>
> 				<version>2.2.0</version>
> 				<executions>
> 					<execution>
> 						<id>create-repo</id>
> 						<phase>generate-resources</phase>
> 						<goals>
> 							<goal>create-repo</goal>
> 						</goals>
> 						<configuration>
> 							<!-- Specify the feature file to use. -->
> 							<featureFile>file:${basedir}/target/classes/features.xml</featureFile>
> 	
> 							<!-- Specify what features to include. This is actually optional: if no features
> 								are specified, then include all features in the file by default. --> 
> 							<features>
> 								<feature>feature-a</feature>
> 							</features>
> 						</configuration>
> 					</execution>
> 				</executions>
> 			</plugin>
> {code}
> The plugin should produce a .tar.gz and .zip file, containing the feature descriptor (and all dependent descriptors) and all bundles (and dependent bundles)in a Maven-style directory, similar to the system/ directory currently used in Karaf. Note that this plugin doesn't need you to list out all the feature repositories / descriptors that your feature file may transitively include - it will detect these dependencies at runtime and work out the details.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.