groovy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pa...@apache.org
Subject groovy git commit: grab should support legacy extension method location
Date Sun, 01 Apr 2018 12:51:23 GMT
Repository: groovy
Updated Branches:
  refs/heads/GROOVY_2_5_X 8ead526c4 -> d1d875387


grab should support legacy extension method location


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

Branch: refs/heads/GROOVY_2_5_X
Commit: d1d875387759e5df633c4aa18d5e872e30121792
Parents: 8ead526
Author: Paul King <paulk@asert.com.au>
Authored: Sun Apr 1 22:51:11 2018 +1000
Committer: Paul King <paulk@asert.com.au>
Committed: Sun Apr 1 22:51:11 2018 +1000

----------------------------------------------------------------------
 src/main/groovy/groovy/grape/GrapeIvy.groovy                      | 3 +++
 .../org/codehaus/groovy/runtime/m12n/ExtensionModuleScanner.java  | 2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/groovy/blob/d1d87538/src/main/groovy/groovy/grape/GrapeIvy.groovy
----------------------------------------------------------------------
diff --git a/src/main/groovy/groovy/grape/GrapeIvy.groovy b/src/main/groovy/groovy/grape/GrapeIvy.groovy
index 6109dab..d5efa4a 100644
--- a/src/main/groovy/groovy/grape/GrapeIvy.groovy
+++ b/src/main/groovy/groovy/grape/GrapeIvy.groovy
@@ -297,6 +297,9 @@ class GrapeIvy implements GrapeEngine {
                 try {
                     JarFile jar = new JarFile(file)
                     def entry = jar.getEntry(ExtensionModuleScanner.MODULE_META_INF_FILE)
+                    if (!entry) {
+                        entry = jar.getEntry(ExtensionModuleScanner.LEGACY_MODULE_META_INF_FILE)
+                    }
                     if (entry) {
                         Properties props = new Properties()
                         props.load(jar.getInputStream(entry))

http://git-wip-us.apache.org/repos/asf/groovy/blob/d1d87538/src/main/java/org/codehaus/groovy/runtime/m12n/ExtensionModuleScanner.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/codehaus/groovy/runtime/m12n/ExtensionModuleScanner.java b/src/main/java/org/codehaus/groovy/runtime/m12n/ExtensionModuleScanner.java
index 5d59c12..deb6102 100644
--- a/src/main/java/org/codehaus/groovy/runtime/m12n/ExtensionModuleScanner.java
+++ b/src/main/java/org/codehaus/groovy/runtime/m12n/ExtensionModuleScanner.java
@@ -38,7 +38,7 @@ import static org.codehaus.groovy.runtime.DefaultGroovyMethodsSupport.closeQuiet
  * @since 2.1.2
  */
 public class ExtensionModuleScanner {
-    private static final String LEGACY_MODULE_META_INF_FILE = "META-INF/services/org.codehaus.groovy.runtime.ExtensionModule";
+    public static final String LEGACY_MODULE_META_INF_FILE = "META-INF/services/org.codehaus.groovy.runtime.ExtensionModule";
     public static final String MODULE_META_INF_FILE = "META-INF/groovy/org.codehaus.groovy.runtime.ExtensionModule";
 
     private final ExtensionModuleListener listener;


Mime
View raw message