You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jackrabbit.apache.org by tr...@apache.org on 2017/12/01 13:56:03 UTC

svn commit: r1816859 - /jackrabbit/commons/filevault-package-maven-plugin/trunk/src/main/java/org/apache/jackrabbit/filevault/maven/packaging/VaultMojo.java

Author: tripod
Date: Fri Dec  1 13:56:03 2017
New Revision: 1816859

URL: http://svn.apache.org/viewvc?rev=1816859&view=rev
Log:
JCRVLT-243 extend javadoc for all complex types

(this closes #6)

Modified:
    jackrabbit/commons/filevault-package-maven-plugin/trunk/src/main/java/org/apache/jackrabbit/filevault/maven/packaging/VaultMojo.java

Modified: jackrabbit/commons/filevault-package-maven-plugin/trunk/src/main/java/org/apache/jackrabbit/filevault/maven/packaging/VaultMojo.java
URL: http://svn.apache.org/viewvc/jackrabbit/commons/filevault-package-maven-plugin/trunk/src/main/java/org/apache/jackrabbit/filevault/maven/packaging/VaultMojo.java?rev=1816859&r1=1816858&r2=1816859&view=diff
==============================================================================
--- jackrabbit/commons/filevault-package-maven-plugin/trunk/src/main/java/org/apache/jackrabbit/filevault/maven/packaging/VaultMojo.java (original)
+++ jackrabbit/commons/filevault-package-maven-plugin/trunk/src/main/java/org/apache/jackrabbit/filevault/maven/packaging/VaultMojo.java Fri Dec  1 13:56:03 2017
@@ -274,7 +274,23 @@ public class VaultMojo extends AbstractM
     private String embeddedTarget;
 
     /**
-     * list of embedded bundles
+     * List of filters for artifacts to embed in the package.
+     * The {@code Embedded} class represents one or multiple embedded artifact dependencies
+     * from the project descriptor.
+     * Each {@code <embedded>} element may configure any of the following fields
+     *  <p>
+     * <table>
+     * <tr><td>groupId</td><td>String</td><td>Filter criterion against the group id of a project dependency. A pattern of format {@code &lt;filter&gt;{,&lt;filter&gt;}}. Each {@code filter} is a string which is either an exclude (if it starts with a {@code ~}) or an include otherwise. If the first {@code filter} is an include the pattern acts as whitelist, otherwise as blacklist. The last matching filter determines the outcome. Only matching group ids are being considered for being embedded.</td></tr>
+     * <tr><td>artifactId</td><td>String</td><td>Filter criterion against the artifact ids of a project dependency. A pattern of format {@code &lt;filter&gt;{,&lt;filter&gt;}}. Each {@code filter} is a string which is either an exclude (if it starts with a {@code ~}) or an include otherwise. If the first {@code filter} is an include the pattern acts as whitelist, otherwise as blacklist. The last matching filter determines the outcome. Only matching artifacts ids are being considered for being embedded.</td></tr>
+     * <tr><td>scope</td><td>ScopeArtifactFilter</td><td>Filter criterion against the <a href="https://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#Dependency_Scope">scope of a project dependency</a>. Possible values are <ul><li>{@code test}, which allows every scope</li><li>{@code compile+runtime} which allows every scope except {@code test}</li><li>{@code runtime+system} which allows every scope except {@code test} and {@code provided}</li><li>{@code compile} which allows only scope {@code compile}, {@code provided} and {@code system}</li><li>{@code runtime} which only allows scope {@code runtime} and {@code compile}.</td></tr>
+     * <tr><td>type</td><td>String</td><td>Filter criterion against the type of a project dependency. The value given here must be equal to the project dependency's type.</td></tr>
+     * <tr><td>classifier</td><td>String</td><td>Filter criterion against the classifier of a project dependency. The value given here must be equal to the project dependency's classifier.</td></tr>
+     * <tr><td>filter</td><td>Boolean</td><td>If set to {@code true} adds the embedded artifact location to the package's filter.</td></tr>
+     * <tr><td>target</td><td>String</td><td>The parent folder location in the package where to place the embedded artifact. Falls back to {@link #embeddedTarget} if not set.</td></tr>
+     * </table>
+     * </pre>
+     * All fields are optional. All filter criteria is concatenated with AND logic (i.e. every criterion must match for a specific dependency to be embedded).
+     * <i>The difference between {@link #embeddeds} and {@link #subPackages} is that for the former an explicit target is given while for the latter the target is being computed from the artifact's vault property file.</i>
      */
     @Parameter
     private Embedded[] embeddeds = new Embedded[0];
@@ -292,15 +308,15 @@ public class VaultMojo extends AbstractM
      * for example, 'application' and 'content' packages are not allowed to contain sub packages or embedded bundles.<br/>
      * Possible values:
      * <ul>
-     *   <li><code>application</code>: An application package consists purely of application content. It serializes
+     *   <li>{@code application}: An application package consists purely of application content. It serializes
      *       entire subtrees with no inclusion or exclusion filters. it does not contain any subpackages nor OSGi
      *       configuration or bundles.</li> 
-     *   <li><code>content</code>: A content package consists only of content and user defined configuration.
+     *   <li>{@code content}: A content package consists only of content and user defined configuration.
      *       It usually serializes entire subtrees but can contain inclusion or exclusion filters. it does not contain
      *       any subpackages nor OSGi configuration or bundles.</li> 
-     *   <li><code>container</code>: A container package only contains sub packages and OSGi configuration and bundles.
+     *   <li>{@code container}: A container package only contains sub packages and OSGi configuration and bundles.
      *       The container package is only used as container for deployment.</li> 
-     *   <li><code>mixed</code>: Catch all type for a combination of the above.</li> 
+     *   <li>{@code mixed}: Catch all type for a combination of the above.</li> 
      * </ul>
      */
     @Parameter(property = "vault.packageType")
@@ -342,12 +358,37 @@ public class VaultMojo extends AbstractM
 
     /**
      * Defines the list of dependencies
+     * A dependency is declared as a {@code <dependency>} element of a list
+     * style {@code <dependencies>} element:
+     * <pre>
+     * &lt;dependency&gt;
+     *     &lt;group&gt;theGroup&lt;/group&gt;
+     *     &lt;name&gt;theName&lt;/name&gt;
+     *     &lt;version&gt;1.5&lt;/version&gt;
+     * &lt;/dependency&gt;
+     * </pre>
+     * <p>
+     * The dependency can also reference a maven project dependency, this is preferred
+     * as it yields to more robust builds.
+     * <pre>
+     * &lt;dependency&gt;
+     *     &lt;groupId&gt;theGroup&lt;/groupId&gt;
+     *     &lt;artifactId&gt;theName&lt;/artifactId&gt;
+     * &lt;/dependency&gt;
+     * </pre>
+     * <p>
+     * The {@code versionRange} may be indicated as a single version, in which
+     * case the version range has no upper bound and defines the minimal version
+     * accepted. Otherwise, the version range defines a lower and upper bound of
+     * accepted versions, where the bounds are either included using parentheses
+     * {@code ()} or excluded using brackets {@code []}
      */
     @Parameter
     private Dependency[] dependencies = new Dependency[0];
 
     /**
-     * Defines the packages that define the repository structure
+     * Defines the packages that define the repository structure.
+     * For the format description look at {@link #dependencies}.
      */
     @Parameter
     private Dependency[] repositoryStructurePackages = new Dependency[0];
@@ -359,7 +400,21 @@ public class VaultMojo extends AbstractM
     private String dependenciesString;
 
     /**
-     * Defines the list of sub packages.
+     * Defines the list of sub packages to be embedded in this package.
+     * The {@code SubPackage} class represents one or multiple subpackage artifact dependencies
+     * from the project descriptor. Each {@code <subPackage>} element may configure any of the following fields
+     *  <p>
+     * <table>
+     * <tr><td>groupId</td><td>String</td><td>Filter criterion against the group id of a project dependency. A pattern of format {@code &lt;filter&gt;{,&lt;filter&gt;}}. Each {@code filter} is a string which is either an exclude (if it starts with a {@code ~}) or an include otherwise. If the first {@code filter} is an include the pattern acts as whitelist, otherwise as blacklist. The last matching filter determines the outcome. Only matching group ids are being considered for being embedded.</td></tr>
+     * <tr><td>artifactId</td><td>String</td><td>Filter criterion against the artifact ids of a project dependency. A pattern of format {@code &lt;filter&gt;{,&lt;filter&gt;}}. Each {@code filter} is a string which is either an exclude (if it starts with a {@code ~}) or an include otherwise. If the first {@code filter} is an include the pattern acts as whitelist, otherwise as blacklist. The last matching filter determines the outcome. Only matching artifacts ids are being considered for being embedded.</td></tr>
+     * <tr><td>scope</td><td>ScopeArtifactFilter</td><td>Filter criterion against the <a href="https://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#Dependency_Scope">scope of a project dependency</a>. Possible values are <ul><li>{@code test}, which allows every scope</li><li>{@code compile+runtime} which allows every scope except {@code test}</li><li>{@code runtime+system} which allows every scope except {@code test} and {@code provided}</li><li>{@code compile} which allows only scope {@code compile}, {@code provided} and {@code system}</li><li>{@code runtime} which only allows scope {@code runtime} and {@code compile}.</td></tr>
+     * <tr><td>type</td><td>String</td><td>Filter criterion against the type of a project dependency. The value given here must be equal to the project dependency's type. In most cases should be "content-package" or "zip".</td></tr>
+     * <tr><td>classifier</td><td>String</td><td>Filter criterion against the classifier of a project dependency. The value given here must be equal to the project dependency's classifier.</td></tr>
+     * <tr><td>filter</td><td>Boolean</td><td>If set to {@code true} adds the embedded artifact location to the package's filter</td></tr>
+     * </table>
+     * </pre>
+     * All fields are optional. All filter criteria is concatenated with AND logic (i.e. every criterion must match for a specific dependency to be embedded).
+     * <i>The difference between {@link #embeddeds} and {@link #subPackages} is that for the former an explicit target is given while for the latter the target is being computed from the artifact's vault property file.</i>
      */
     @Parameter
     private SubPackage[] subPackages = new SubPackage[0];