Repository: karaf
Updated Branches:
  refs/heads/master a8c8a7eac -> 4e95614c6


KARAF-3963: add some more sauce to the documentation of the feature generation 
mojo.


Project: http://git-wip-us.apache.org/repos/asf/karaf/repo
Commit: http://git-wip-us.apache.org/repos/asf/karaf/commit/f02f4d4b
Tree: http://git-wip-us.apache.org/repos/asf/karaf/tree/f02f4d4b
Diff: http://git-wip-us.apache.org/repos/asf/karaf/diff/f02f4d4b

Branch: refs/heads/master
Commit: f02f4d4bbb8ffeb2311f2031cef0a59677f2b3d6
Parents: 92626bb
Author: Benson Margulies <[email protected]>
Authored: Sun Aug 30 20:27:13 2015 -0400
Committer: Benson Margulies <[email protected]>
Committed: Sun Aug 30 20:27:13 2015 -0400

----------------------------------------------------------------------
 .../features/GenerateDescriptorMojo.java        | 33 +++++++++++++++-----
 .../apache/karaf/tooling/utils/MojoSupport.java |  2 +-
 2 files changed, 26 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/karaf/blob/f02f4d4b/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/features/GenerateDescriptorMojo.java
----------------------------------------------------------------------
diff --git 
a/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/features/GenerateDescriptorMojo.java
 
b/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/features/GenerateDescriptorMojo.java
index 154ddb0..408a336 100644
--- 
a/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/features/GenerateDescriptorMojo.java
+++ 
b/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/features/GenerateDescriptorMojo.java
@@ -82,7 +82,9 @@ import static 
org.apache.karaf.deployer.kar.KarArtifactInstaller.FEATURE_CLASSIF
 public class GenerateDescriptorMojo extends MojoSupport {
 
     /**
-     * An (optional) input feature file to extend.  This is highly recommended 
as it is the only way to add <code>&lt;feature/&gt;</code>
+     * An (optional) input feature file to extend. The plugin reads this file, 
and uses it as a template
+     * to create the output.
+     * This is highly recommended as it is the only way to add 
<code>&lt;feature/&gt;</code>
      * elements to the individual features that are generated.  Note that this 
file is filtered using standard Maven
      * resource interpolation, allowing attributes of the input file to be set 
with information such as ${project.version}
      * from the current build.
@@ -101,13 +103,16 @@ public class GenerateDescriptorMojo extends MojoSupport {
     private File filteredInputFile;
 
     /**
-     * (wrapper) The file to generate.  This file is attached as a project 
output artifact.
+     * The file to generate.  This file is attached as a project output 
artifact with the classifier specified by
+     * <code>attachmentArtifactClassifier</code>.
      */
     @Parameter(defaultValue = "${project.build.directory}/feature/feature.xml")
     private File outputFile;
 
     /**
-     * (wrapper) Exclude some artifacts from the generated feature.
+     * Exclude some artifacts from the generated feature.
+     * See addBundlesToPrimaryFeature for more details.
+     *
      */
     @Parameter
     private List<String> excludedArtifactIds = new ArrayList<String>();
@@ -119,7 +124,7 @@ public class GenerateDescriptorMojo extends MojoSupport {
     private String resolver;
 
     /**
-     * (wrapper) The artifact type for attaching the generated file to the 
project
+     * The artifact type for attaching the generated file to the project
      */
     @Parameter(defaultValue = "xml")
     private String attachmentArtifactType = "xml";
@@ -131,9 +136,9 @@ public class GenerateDescriptorMojo extends MojoSupport {
     private String attachmentArtifactClassifier = "features";
 
     /**
-     * Specifies whether features dependencies of this project will be 
included inline of the the
-     * final output (<code>true</code>) or simply referenced as output 
artifact dependencies (<code>false</code>).
-     * If <code>true</code>, feature dependencies xml descriptors are read and 
their contents added to the features descriptor under assembly.
+     * Specifies whether features dependencies of this project will be 
included inline in the
+     * final output (<code>true</code>), or simply referenced as output 
artifact dependencies (<code>false</code>).
+     * If <code>true</code>, feature dependencies' xml descriptors are read 
and their contents added to the features descriptor under assembly.
      * If <code>false</code>, feature dependencies are added to the assembled 
feature as dependencies.
      * Setting this value to <code>true</code> is especially helpful in 
multiproject builds where subprojects build their own features
      * using <code>aggregateFeatures = false</code>, then combined with 
<code>aggregateFeatures = true</code> in an
@@ -174,6 +179,15 @@ public class GenerateDescriptorMojo extends MojoSupport {
     /**
      * The standard behavior is to add dependencies as 
<code>&lt;bundle&gt;</code> elements to a <code>&lt;feature&gt;</code>
      * with the same name as the artifactId of the project.  This flag 
disables that behavior.
+     * If this parameter is <code>true</code>, then two other parameters 
refine the list of bundles added to the primary feature:
+     * <code>excludedArtifactIds</code> and <code>ignoreScopeProvided</code>. 
Each of these specifies dependent artifacts
+     * that should <strong>not</strong> be added to the primary feature.
+     * <p>
+     *     Note that you may tune the <code>bundle</code> elements by 
including them in the <code>inputFile</code>.
+     *     If the <code>inputFile</code> has a <code>feature</code> element 
for the primary feature, the plugin will
+     *     respect it, so that you can, for example, set the 
<code>startLevel</code> or <code>start</code> attribute.
+     * </p>
+     *
      */
     @Parameter(defaultValue = "true")
     private boolean addBundlesToPrimaryFeature;
@@ -181,13 +195,16 @@ public class GenerateDescriptorMojo extends MojoSupport {
     /**
      * The standard behavior is to add any dependencies other than those in 
the <code>runtime</code> scope to the feature bundle.
      * Setting this flag to "true" disables adding any dependencies (transient 
or otherwise) that are in
-     * <code>&lt;scope&gt;provided&lt;/scope&gt;</code>.
+     * <code>&lt;scope&gt;provided&lt;/scope&gt;</code>. See 
<code>addBundlesToPrimaryFeature</code> for more details.
      */
     @Parameter(defaultValue = "false")
     private boolean ignoreScopeProvided;
 
     /**
      * Flag indicating whether the main project artifact should be included 
(<code>true</code>) or not (<code>false</code>).
+     * This parameter is useful when you add an execution of this plugin to a 
project with some packaging that is <strong>not</strong>
+     * <code>feature</code>. If you don't set this, then you will get a 
feature that contains the dependencies but
+     * not the primary artifact itself.
      * <p/>
      * Assumes the main project artifact is a bundle and the feature will be 
attached alongside using <code>attachmentArtifactClassifier</code>.
      */

http://git-wip-us.apache.org/repos/asf/karaf/blob/f02f4d4b/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/utils/MojoSupport.java
----------------------------------------------------------------------
diff --git 
a/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/utils/MojoSupport.java
 
b/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/utils/MojoSupport.java
index 0126180..9648da1 100644
--- 
a/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/utils/MojoSupport.java
+++ 
b/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/utils/MojoSupport.java
@@ -93,7 +93,7 @@ public abstract class MojoSupport extends AbstractMojo {
     protected ArtifactFactory factory;
     
     /**
-     * The artifact type of a feature
+     * The artifact type of a feature.
      */
     @Parameter(defaultValue = "xml")
     private String featureArtifactType = "xml";

Reply via email to