You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by hb...@apache.org on 2018/08/11 22:13:54 UTC

[maven] branch master updated: improved documentation

This is an automated email from the ASF dual-hosted git repository.

hboutemy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven.git


The following commit(s) were added to refs/heads/master by this push:
     new f567471  improved documentation
f567471 is described below

commit f5674713a6b309881cd25aef64b4c31de94900d0
Author: Hervé Boutemy <hb...@apache.org>
AuthorDate: Sun Aug 12 00:01:17 2018 +0200

    improved documentation
---
 .../apache/maven/artifact/handler/ArtifactHandler.java   | 16 ++++++++++++++++
 maven-core/src/site/apt/artifact-handlers.apt            | 13 ++++++++-----
 maven-core/src/site/apt/index.apt                        |  2 +-
 3 files changed, 25 insertions(+), 6 deletions(-)

diff --git a/maven-artifact/src/main/java/org/apache/maven/artifact/handler/ArtifactHandler.java b/maven-artifact/src/main/java/org/apache/maven/artifact/handler/ArtifactHandler.java
index a9d60f2..82d4ae0 100644
--- a/maven-artifact/src/main/java/org/apache/maven/artifact/handler/ArtifactHandler.java
+++ b/maven-artifact/src/main/java/org/apache/maven/artifact/handler/ArtifactHandler.java
@@ -20,16 +20,32 @@ package org.apache.maven.artifact.handler;
  */
 
 /**
+ * An artifact handler defies for one type (defined as Plexus role):<ul>
+ * <li>extension and classifier to be able to download the file,</li>
+ * <li>information on how to use the artifact: whether to add it to the classpath, or to take into account its
+ * dependencies.</li>
+ * </ul>
+ * 
  * @author <a href="mailto:jason@maven.org">Jason van Zyl</a>
  */
 public interface ArtifactHandler
 {
     String ROLE = ArtifactHandler.class.getName();
 
+    /**
+     * Get the file extension associated to the type of artifact.
+     *
+     * @return the extension
+     */
     String getExtension();
 
     String getDirectory();
 
+    /**
+     * Get the classifier associated to the type of artifact.
+     * 
+     * @return the classifier
+     */
     String getClassifier();
 
     String getPackaging();
diff --git a/maven-core/src/site/apt/artifact-handlers.apt b/maven-core/src/site/apt/artifact-handlers.apt
index 1a4b344..f79c5a0 100644
--- a/maven-core/src/site/apt/artifact-handlers.apt
+++ b/maven-core/src/site/apt/artifact-handlers.apt
@@ -25,7 +25,10 @@
 
 Default Artifact Handlers Reference
 
-  Some artifact handlers (see {{{../maven-artifact/apidocs/org/apache/maven/artifact/handler/ArtifactHandler.html} API}})
+  Artifact handlers (see {{{../maven-artifact/apidocs/org/apache/maven/artifact/handler/ArtifactHandler.html} API}})
+  define for each {{{../maven-model/maven.html#class_dependency}dependency type}} information on the artifact.
+
+  Some artifact handlers
   are configured by default in <<<META-INF/plexus/artifact-handlers.xml>>>:
 
 *--------------------+------------+------------+---------------+-----------+---------------------+-----------------------+
@@ -35,10 +38,14 @@ Default Artifact Handlers Reference
 *--------------------+------------+------------+---------------+-----------+---------------------+-----------------------+
 | <<<jar>>>          | <= type>   | <= type>   |               | java      | <<<true>>>          |                       |
 *--------------------+------------+------------+---------------+-----------+---------------------+-----------------------+
+| <<<test-jar>>>     | <<<jar>>>  | <<<jar>>>  | <<<tests>>>   | java      | <<<true>>>          |                       |
+*--------------------+------------+------------+---------------+-----------+---------------------+-----------------------+
 | <<<maven-plugin>>> | <<<jar>>>  | <= type>   |               | java      | <<<true>>>          |                       |
 *--------------------+------------+------------+---------------+-----------+---------------------+-----------------------+
 | <<<ejb>>>          | <<<jar>>>  | <= type>   |               | java      | <<<true>>>          |                       |
 *--------------------+------------+------------+---------------+-----------+---------------------+-----------------------+
+| <<<ejb-client>>>   | <<<jar>>>  | <<<ejb>>>  | <<<client>>>  | java      | <<<true>>>          |                       |
+*--------------------+------------+------------+---------------+-----------+---------------------+-----------------------+
 | <<<war>>>          | <= type>   | <= type>   |               | java      |                     | <<<true>>>            |
 *--------------------+------------+------------+---------------+-----------+---------------------+-----------------------+
 | <<<ear>>>          | <= type>   | <= type>   |               | java      |                     | <<<true>>>            |
@@ -49,7 +56,3 @@ Default Artifact Handlers Reference
 *--------------------+------------+------------+---------------+-----------+---------------------+-----------------------+
 | <<<javadoc>>>      | <<<jar>>>  | <= type>   | <<<javadoc>>> | java      | <<<true>>>          |                       |
 *--------------------+------------+------------+---------------+-----------+---------------------+-----------------------+
-| <<<ejb-client>>>   | <<<jar>>>  | <<<ejb>>>  | <<<client>>>  | java      | <<<true>>>          |                       |
-*--------------------+------------+------------+---------------+-----------+---------------------+-----------------------+
-| <<<test-jar>>>     | <<<jar>>>  | <<<jar>>>  | <<<tests>>>   | java      | <<<true>>>          |                       |
-*--------------------+------------+------------+---------------+-----------+---------------------+-----------------------+
diff --git a/maven-core/src/site/apt/index.apt b/maven-core/src/site/apt/index.apt
index 1e7a68e..ca2e251 100644
--- a/maven-core/src/site/apt/index.apt
+++ b/maven-core/src/site/apt/index.apt
@@ -31,7 +31,7 @@ Maven Core
 
  * {{{./lifecycles.html}lifecycles}} and {{{./default-bindings.html}plugin bindings to <<<default>>> lifecycle}},
 
- * {{{./artifact-handlers.html}default artifact handlers}},
+ * {{{./artifact-handlers.html}default artifact handlers}}, to manage {{{../maven-model/maven.html#class_dependency}dependency types}},
 
  * {{{./extension.html}extension descriptor}} and {{{./core-extensions.html}core extensions}},