You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by sl...@apache.org on 2020/03/28 22:06:34 UTC

[maven] 01/01: [MNG-5567] Zip files are not included in classpaths at all

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

slachiewicz pushed a commit to branch MNG-5567
in repository https://gitbox.apache.org/repos/asf/maven.git

commit 6969b2a518ac100650b1b734f229478cc856bb54
Author: Michael Osipov <mi...@apache.org>
AuthorDate: Mon May 16 21:18:04 2016 +0200

    [MNG-5567] Zip files are not included in classpaths at all
    
    By definition of the classpath [1], JAR and Zip files are valid
    compressed files. Zips are likely to contain resources shared
    around. This totally relieves of unpacking stuff and readding
    to the classpath and support what the JVM provided by defeault.
    Sharing resources will just work.
    
    [1] http://docs.oracle.com/javase/8/docs/technotes/tools/windows/classpath.html#A1100592
---
 .../main/resources/META-INF/plexus/artifact-handlers.xml    | 13 +++++++++++++
 maven-core/src/site/apt/artifact-handlers.apt               |  2 ++
 2 files changed, 15 insertions(+)

diff --git a/maven-core/src/main/resources/META-INF/plexus/artifact-handlers.xml b/maven-core/src/main/resources/META-INF/plexus/artifact-handlers.xml
index 2f26ce2..92ddaec 100644
--- a/maven-core/src/main/resources/META-INF/plexus/artifact-handlers.xml
+++ b/maven-core/src/main/resources/META-INF/plexus/artifact-handlers.xml
@@ -190,5 +190,18 @@ Artifact handlers are required by the dependency resolution mechanism.
       </configuration>
     </component>
 
+    <!--
+     | ZIP
+     |-->
+    <component>
+      <role>org.apache.maven.artifact.handler.ArtifactHandler</role>
+      <role-hint>zip</role-hint>
+      <implementation>org.apache.maven.artifact.handler.DefaultArtifactHandler</implementation>
+      <configuration>
+        <type>zip</type>
+        <addedToClasspath>true</addedToClasspath>
+      </configuration>
+    </component>
+
   </components>
 </component-set>
diff --git a/maven-core/src/site/apt/artifact-handlers.apt b/maven-core/src/site/apt/artifact-handlers.apt
index 299d7d8..9475ef7 100644
--- a/maven-core/src/site/apt/artifact-handlers.apt
+++ b/maven-core/src/site/apt/artifact-handlers.apt
@@ -57,3 +57,5 @@ Default Artifact Handlers Reference
 *--------------------+---------------+------------+------------+-----------+---------------------+-----------------------+
 | <<<javadoc>>>      | <<<javadoc>>> | <<<jar>>>  | <= type>   | java      | <<<true>>>          |                       |
 *--------------------+---------------+------------+------------+-----------+---------------------+-----------------------+
+| <<<zip>>>          | <= type>   | <= type>   |               | none      | <<<true>>>          |                       |
+*--------------------+------------+------------+---------------+-----------+---------------------+-----------------------+