Repository: groovy
Updated Branches:
  refs/heads/GROOVY_2_6_X eeff2a4d4 -> 139d3ade9


GROOVY-8480: org.codehaus.groovy.runtime.ExtensionModule should move to 
META-INF/groovy (closes #666)


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

Branch: refs/heads/GROOVY_2_6_X
Commit: 139d3ade976441673f011ca19c1429a080728f52
Parents: eeff2a4
Author: paulk <pa...@asert.com.au>
Authored: Fri Feb 23 15:14:00 2018 +1000
Committer: paulk <pa...@asert.com.au>
Committed: Sat Feb 24 10:52:23 2018 +1000

----------------------------------------------------------------------
 .../gradle/WriteExtensionDescriptorTask.groovy  |  4 +---
 gradle/pomconfigurer.gradle                     |  3 +++
 gradle/test.gradle                              |  2 +-
 src/main/groovy/groovy/grape/GrapeIvy.groovy    |  7 +++---
 .../runtime/m12n/ExtensionModuleScanner.java    |  7 ++++--
 .../metaclass/MetaClassRegistryImpl.java        |  7 ------
 src/spec/doc/core-metaprogramming.adoc          |  4 ++--
 .../org.codehaus.groovy.runtime.ExtensionModule | 25 ++++++++++++++++++++
 ....codehaus.groovy.runtime.ExtensionModuleSpec | 21 ++++++++++++++++
 .../org.codehaus.groovy.runtime.ExtensionModule | 21 ----------------
 ....codehaus.groovy.runtime.ExtensionModuleSpec | 21 ----------------
 .../org.codehaus.groovy.runtime.ExtensionModule | 20 ++++++++++++++++
 .../org.codehaus.groovy.runtime.ExtensionModule | 20 ----------------
 .../org.codehaus.groovy.runtime.ExtensionModule | 24 +++++++++++++++++++
 .../org.codehaus.groovy.runtime.ExtensionModule | 20 ----------------
 .../org.codehaus.groovy.source.Extensions       |  1 +
 .../stc/STCExtensionMethodsTest.groovy          |  2 +-
 .../runtime/m12n/ExtensionModuleTest.groovy     | 16 ++++++-------
 .../org.codehaus.groovy.runtime.ExtensionModule | 21 ++++++++++++++++
 .../org.codehaus.groovy.runtime.ExtensionModule | 17 -------------
 20 files changed, 136 insertions(+), 127 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/groovy/blob/139d3ade/buildSrc/src/main/groovy/org/codehaus/groovy/gradle/WriteExtensionDescriptorTask.groovy
----------------------------------------------------------------------
diff --git 
a/buildSrc/src/main/groovy/org/codehaus/groovy/gradle/WriteExtensionDescriptorTask.groovy
 
b/buildSrc/src/main/groovy/org/codehaus/groovy/gradle/WriteExtensionDescriptorTask.groovy
index 679b083..2e16102 100644
--- 
a/buildSrc/src/main/groovy/org/codehaus/groovy/gradle/WriteExtensionDescriptorTask.groovy
+++ 
b/buildSrc/src/main/groovy/org/codehaus/groovy/gradle/WriteExtensionDescriptorTask.groovy
@@ -25,8 +25,6 @@ import org.gradle.api.tasks.OutputFile
 
 /**
  * A Gradle task to generate module descriptor files for Groovy extension 
modules.
- *
- * @author Cedric Champeau
  */
 class WriteExtensionDescriptorTask extends DefaultTask {
     String description = 'Generates the 
org.codehaus.groovy.runtime.ExtensionModule descriptor file of a module'
@@ -36,7 +34,7 @@ class WriteExtensionDescriptorTask extends DefaultTask {
 
 
     private File computeDescriptorFile() {
-        def metaInfDir = new 
File("${project.buildDir}/resources/main/META-INF/services")
+        def metaInfDir = new 
File("${project.buildDir}/resources/main/META-INF/groovy")
         return new File(metaInfDir, 
"org.codehaus.groovy.runtime.ExtensionModule")
     }
 

http://git-wip-us.apache.org/repos/asf/groovy/blob/139d3ade/gradle/pomconfigurer.gradle
----------------------------------------------------------------------
diff --git a/gradle/pomconfigurer.gradle b/gradle/pomconfigurer.gradle
index 51faca2..1234fbb 100644
--- a/gradle/pomconfigurer.gradle
+++ b/gradle/pomconfigurer.gradle
@@ -600,6 +600,9 @@ project.ext.pomConfigureClosureWithoutTweaks = {
             contributor {
                 name 'Vladimir Vivien'
             }
+            contributor {
+                name 'Graeme Rocher'
+            }
         }
         mailingLists {
             mailingList {

http://git-wip-us.apache.org/repos/asf/groovy/blob/139d3ade/gradle/test.gradle
----------------------------------------------------------------------
diff --git a/gradle/test.gradle b/gradle/test.gradle
index fe228f3..9870bef 100644
--- a/gradle/test.gradle
+++ b/gradle/test.gradle
@@ -145,7 +145,7 @@ task testExtensionModuleJar(type: Jar) {
     description = 'Builds a sample extension module used in tests'
     dependsOn compileTestExtensionModule
     baseName = 'module-test'
-    version = '1.3'
+    version = '1.4'
     from { compileTestExtensionModule.destinationDir }
     from files("$extModuleFixtureDir/src/main/resources")
     // emulate Maven repo format for output

http://git-wip-us.apache.org/repos/asf/groovy/blob/139d3ade/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 a2c22a8..5d7c5c2 100644
--- a/src/main/groovy/groovy/grape/GrapeIvy.groovy
+++ b/src/main/groovy/groovy/grape/GrapeIvy.groovy
@@ -46,6 +46,7 @@ import org.apache.ivy.util.Message
 import org.codehaus.groovy.reflection.CachedClass
 import org.codehaus.groovy.reflection.ClassInfo
 import org.codehaus.groovy.reflection.ReflectionUtils
+import org.codehaus.groovy.runtime.m12n.ExtensionModuleScanner
 import org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl
 
 import javax.xml.parsers.DocumentBuilderFactory
@@ -56,9 +57,7 @@ import java.util.zip.ZipException
 import java.util.zip.ZipFile
 
 /**
- * @author Danno Ferrin
- * @author Paul King
- * @author Roshan Dawrani (roshandawrani)
+ * Implementation suppoting {@code @Grape} and {@code @Grab} annotations based 
on Ivy.
  */
 class GrapeIvy implements GrapeEngine {
 
@@ -297,7 +296,7 @@ class GrapeIvy implements GrapeEngine {
             if (mcRegistry instanceof MetaClassRegistryImpl) {
                 try {
                     JarFile jar = new JarFile(file)
-                    def entry = 
jar.getEntry(MetaClassRegistryImpl.MODULE_META_INF_FILE)
+                    def entry = 
jar.getEntry(ExtensionModuleScanner.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/139d3ade/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 d27ea88..5d59c12 100644
--- a/src/main/java/org/codehaus/groovy/runtime/m12n/ExtensionModuleScanner.java
+++ b/src/main/java/org/codehaus/groovy/runtime/m12n/ExtensionModuleScanner.java
@@ -35,11 +35,11 @@ import static 
org.codehaus.groovy.runtime.DefaultGroovyMethodsSupport.closeQuiet
  *
  * This class was introduced as a fix for GROOVY-6008
  *
- * @author Cedric Champeau
  * @since 2.1.2
  */
 public class ExtensionModuleScanner {
-    public static final String MODULE_META_INF_FILE = 
"META-INF/services/org.codehaus.groovy.runtime.ExtensionModule";
+    private 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;
     private final ClassLoader classLoader;
@@ -52,6 +52,9 @@ public class ExtensionModuleScanner {
     public void scanClasspathModules() {
         try {
             Enumeration<URL> resources = 
classLoader.getResources(MODULE_META_INF_FILE);
+            if (!resources.hasMoreElements()) {
+                resources = 
classLoader.getResources(LEGACY_MODULE_META_INF_FILE);
+            }
             while (resources.hasMoreElements()) {
                 URL url = resources.nextElement();
                 scanExtensionModuleFromMetaInf(url);

http://git-wip-us.apache.org/repos/asf/groovy/blob/139d3ade/src/main/java/org/codehaus/groovy/runtime/metaclass/MetaClassRegistryImpl.java
----------------------------------------------------------------------
diff --git 
a/src/main/java/org/codehaus/groovy/runtime/metaclass/MetaClassRegistryImpl.java
 
b/src/main/java/org/codehaus/groovy/runtime/metaclass/MetaClassRegistryImpl.java
index ff33081..ff30a2b 100644
--- 
a/src/main/java/org/codehaus/groovy/runtime/metaclass/MetaClassRegistryImpl.java
+++ 
b/src/main/java/org/codehaus/groovy/runtime/metaclass/MetaClassRegistryImpl.java
@@ -56,13 +56,6 @@ import java.util.Properties;
  * A registry of MetaClass instances which caches introspection &
  * reflection information and allows methods to be dynamically added to
  * existing classes at runtime
- *
- * @author <a href="mailto:ja...@coredevelopers.net";>James Strachan</a>
- * @author John Wilson
- * @author <a href="mailto:blackd...@gmx.org";>Jochen Theodorou</a>
- * @author Graeme Rocher
- * @author Alex Tkachman
- *
  */
 public class MetaClassRegistryImpl implements MetaClassRegistry{
     /**

http://git-wip-us.apache.org/repos/asf/groovy/blob/139d3ade/src/spec/doc/core-metaprogramming.adoc
----------------------------------------------------------------------
diff --git a/src/spec/doc/core-metaprogramming.adoc 
b/src/spec/doc/core-metaprogramming.adoc
index 888bed9..960e98a 100644
--- a/src/spec/doc/core-metaprogramming.adoc
+++ b/src/spec/doc/core-metaprogramming.adoc
@@ -677,11 +677,11 @@ 
include::{projectdir}/src/spec/test/ExtensionModuleSpecTest.groovy[tags=static_e
 For Groovy to be able to load your extension methods, you must declare
 your extension helper classes. You must create a file named
 `org.codehaus.groovy.runtime.ExtensionModule` into the
-`META-INF/services` directory:
+`META-INF/groovy` directory:
 
 .org.codehaus.groovy.runtime.ExtensionModule
 --------------------------------------------------------
-include::{projectdir}/src/spec/test-resources/META-INF/services/org.codehaus.groovy.runtime.ExtensionModuleSpec[tags=extension_descriptor,indent=0]
+include::{projectdir}/src/spec/test-resources/META-INF/groovy/org.codehaus.groovy.runtime.ExtensionModuleSpec[tags=extension_descriptor,indent=0]
 --------------------------------------------------------
 
 The module descriptor requires 4 keys:

http://git-wip-us.apache.org/repos/asf/groovy/blob/139d3ade/src/spec/test-resources/META-INF/groovy/org.codehaus.groovy.runtime.ExtensionModule
----------------------------------------------------------------------
diff --git 
a/src/spec/test-resources/META-INF/groovy/org.codehaus.groovy.runtime.ExtensionModule
 
b/src/spec/test-resources/META-INF/groovy/org.codehaus.groovy.runtime.ExtensionModule
new file mode 100644
index 0000000..b731a1d
--- /dev/null
+++ 
b/src/spec/test-resources/META-INF/groovy/org.codehaus.groovy.runtime.ExtensionModule
@@ -0,0 +1,25 @@
+#
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you under the Apache License, Version 2.0 (the
+#  "License"); you may not use this file except in compliance
+#  with the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing,
+#  software distributed under the License is distributed on an
+#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+#  KIND, either express or implied.  See the License for the
+#  specific language governing permissions and limitations
+#  under the License.
+#
+
+# DO NOT REMOVE BELOW!
+# IT IS A WORKAROUND FOR 2 DESCRIPTORS ON CLASSPATH!
+moduleName=Test module
+moduleVersion=1.0-test
+extensionClasses=support.MaxRetriesExtension,org.codehaus.groovy.runtime.m12n.TestStringExtension,org.codehaus.groovy.runtime.m12n.Groovy6496Extension,org.codehaus.groovy.runtime.m12n.TestPrimitiveWrapperExtension
+staticExtensionClasses=support.StaticStringExtension,org.codehaus.groovy.runtime.m12n.TestStaticStringExtension

http://git-wip-us.apache.org/repos/asf/groovy/blob/139d3ade/src/spec/test-resources/META-INF/groovy/org.codehaus.groovy.runtime.ExtensionModuleSpec
----------------------------------------------------------------------
diff --git 
a/src/spec/test-resources/META-INF/groovy/org.codehaus.groovy.runtime.ExtensionModuleSpec
 
b/src/spec/test-resources/META-INF/groovy/org.codehaus.groovy.runtime.ExtensionModuleSpec
new file mode 100644
index 0000000..4737a3e
--- /dev/null
+++ 
b/src/spec/test-resources/META-INF/groovy/org.codehaus.groovy.runtime.ExtensionModuleSpec
@@ -0,0 +1,21 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# tag::extension_descriptor[]
+moduleName=Test module for specifications
+moduleVersion=1.0-test
+extensionClasses=support.MaxRetriesExtension
+staticExtensionClasses=support.StaticStringExtension
+# end::extension_descriptor[]

http://git-wip-us.apache.org/repos/asf/groovy/blob/139d3ade/src/spec/test-resources/META-INF/services/org.codehaus.groovy.runtime.ExtensionModule
----------------------------------------------------------------------
diff --git 
a/src/spec/test-resources/META-INF/services/org.codehaus.groovy.runtime.ExtensionModule
 
b/src/spec/test-resources/META-INF/services/org.codehaus.groovy.runtime.ExtensionModule
deleted file mode 100644
index 4926633..0000000
--- 
a/src/spec/test-resources/META-INF/services/org.codehaus.groovy.runtime.ExtensionModule
+++ /dev/null
@@ -1,21 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-# DO NOT REMOVE BELOW!
-# IT IS A WORKAROUND FOR 2 DESCRIPTORS ON CLASSPATH!
-moduleName=Test module
-moduleVersion=1.0-test
-extensionClasses=support.MaxRetriesExtension,org.codehaus.groovy.runtime.m12n.TestStringExtension,org.codehaus.groovy.runtime.m12n.Groovy6496Extension,org.codehaus.groovy.runtime.m12n.TestPrimitiveWrapperExtension
-staticExtensionClasses=support.StaticStringExtension,org.codehaus.groovy.runtime.m12n.TestStaticStringExtension

http://git-wip-us.apache.org/repos/asf/groovy/blob/139d3ade/src/spec/test-resources/META-INF/services/org.codehaus.groovy.runtime.ExtensionModuleSpec
----------------------------------------------------------------------
diff --git 
a/src/spec/test-resources/META-INF/services/org.codehaus.groovy.runtime.ExtensionModuleSpec
 
b/src/spec/test-resources/META-INF/services/org.codehaus.groovy.runtime.ExtensionModuleSpec
deleted file mode 100644
index 4737a3e..0000000
--- 
a/src/spec/test-resources/META-INF/services/org.codehaus.groovy.runtime.ExtensionModuleSpec
+++ /dev/null
@@ -1,21 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-# tag::extension_descriptor[]
-moduleName=Test module for specifications
-moduleVersion=1.0-test
-extensionClasses=support.MaxRetriesExtension
-staticExtensionClasses=support.StaticStringExtension
-# end::extension_descriptor[]

http://git-wip-us.apache.org/repos/asf/groovy/blob/139d3ade/src/test-fixtures/extmodule/src/main/resources/META-INF/groovy/org.codehaus.groovy.runtime.ExtensionModule
----------------------------------------------------------------------
diff --git 
a/src/test-fixtures/extmodule/src/main/resources/META-INF/groovy/org.codehaus.groovy.runtime.ExtensionModule
 
b/src/test-fixtures/extmodule/src/main/resources/META-INF/groovy/org.codehaus.groovy.runtime.ExtensionModule
new file mode 100644
index 0000000..047f2ed
--- /dev/null
+++ 
b/src/test-fixtures/extmodule/src/main/resources/META-INF/groovy/org.codehaus.groovy.runtime.ExtensionModule
@@ -0,0 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+// This file is used to test the extension module framework
+moduleName=Test module for Grab
+moduleVersion=1.4
+extensionClasses=org.codehaus.groovy.runtime.m12n.TestStringExtension2,org.codehaus.groovy.runtime.m12n.TestMapExtension,org.codehaus.groovy.runtime.m12n.Groovy7225Extension
+staticExtensionClasses=org.codehaus.groovy.runtime.m12n.TestStaticStringExtension2
+

http://git-wip-us.apache.org/repos/asf/groovy/blob/139d3ade/src/test-fixtures/extmodule/src/main/resources/META-INF/services/org.codehaus.groovy.runtime.ExtensionModule
----------------------------------------------------------------------
diff --git 
a/src/test-fixtures/extmodule/src/main/resources/META-INF/services/org.codehaus.groovy.runtime.ExtensionModule
 
b/src/test-fixtures/extmodule/src/main/resources/META-INF/services/org.codehaus.groovy.runtime.ExtensionModule
deleted file mode 100644
index 587f7ff..0000000
--- 
a/src/test-fixtures/extmodule/src/main/resources/META-INF/services/org.codehaus.groovy.runtime.ExtensionModule
+++ /dev/null
@@ -1,20 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-// This file is used to test the extension module framework
-moduleName=Test module for Grab
-moduleVersion=1.3
-extensionClasses=org.codehaus.groovy.runtime.m12n.TestStringExtension2,org.codehaus.groovy.runtime.m12n.TestMapExtension,org.codehaus.groovy.runtime.m12n.Groovy7225Extension
-staticExtensionClasses=org.codehaus.groovy.runtime.m12n.TestStaticStringExtension2
-

http://git-wip-us.apache.org/repos/asf/groovy/blob/139d3ade/src/test-resources/META-INF/groovy/org.codehaus.groovy.runtime.ExtensionModule
----------------------------------------------------------------------
diff --git 
a/src/test-resources/META-INF/groovy/org.codehaus.groovy.runtime.ExtensionModule
 
b/src/test-resources/META-INF/groovy/org.codehaus.groovy.runtime.ExtensionModule
new file mode 100644
index 0000000..1abb6c5
--- /dev/null
+++ 
b/src/test-resources/META-INF/groovy/org.codehaus.groovy.runtime.ExtensionModule
@@ -0,0 +1,24 @@
+#
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you under the Apache License, Version 2.0 (the
+#  "License"); you may not use this file except in compliance
+#  with the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing,
+#  software distributed under the License is distributed on an
+#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+#  KIND, either express or implied.  See the License for the
+#  specific language governing permissions and limitations
+#  under the License.
+#
+
+// This file is used to test the extension module framework
+moduleName=Test module
+moduleVersion=1.0-test
+extensionClasses=org.codehaus.groovy.runtime.m12n.TestStringExtension,org.codehaus.groovy.runtime.m12n.Groovy6496Extension,org.codehaus.groovy.runtime.m12n.TestPrimitiveWrapperExtension
+staticExtensionClasses=org.codehaus.groovy.runtime.m12n.TestStaticStringExtension

http://git-wip-us.apache.org/repos/asf/groovy/blob/139d3ade/src/test-resources/META-INF/services/org.codehaus.groovy.runtime.ExtensionModule
----------------------------------------------------------------------
diff --git 
a/src/test-resources/META-INF/services/org.codehaus.groovy.runtime.ExtensionModule
 
b/src/test-resources/META-INF/services/org.codehaus.groovy.runtime.ExtensionModule
deleted file mode 100644
index 7287001..0000000
--- 
a/src/test-resources/META-INF/services/org.codehaus.groovy.runtime.ExtensionModule
+++ /dev/null
@@ -1,20 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-// This file is used to test the extension module framework
-moduleName=Test module
-moduleVersion=1.0-test
-extensionClasses=org.codehaus.groovy.runtime.m12n.TestStringExtension,org.codehaus.groovy.runtime.m12n.Groovy6496Extension,org.codehaus.groovy.runtime.m12n.TestPrimitiveWrapperExtension
-staticExtensionClasses=org.codehaus.groovy.runtime.m12n.TestStaticStringExtension

http://git-wip-us.apache.org/repos/asf/groovy/blob/139d3ade/src/test-resources/META-INF/services/org.codehaus.groovy.source.Extensions
----------------------------------------------------------------------
diff --git 
a/src/test-resources/META-INF/services/org.codehaus.groovy.source.Extensions 
b/src/test-resources/META-INF/services/org.codehaus.groovy.source.Extensions
index f92ac95..2425c7d 100644
--- a/src/test-resources/META-INF/services/org.codehaus.groovy.source.Extensions
+++ b/src/test-resources/META-INF/services/org.codehaus.groovy.source.Extensions
@@ -15,4 +15,5 @@
 
 # Format: one extension on each line without the leading "*."
 # groovy source file extensions to test GROOVY-4393
+# intentionally left in legacy directory to test fallback capability for 
GROOVY-8471
 foogroovy

http://git-wip-us.apache.org/repos/asf/groovy/blob/139d3ade/src/test/groovy/transform/stc/STCExtensionMethodsTest.groovy
----------------------------------------------------------------------
diff --git a/src/test/groovy/transform/stc/STCExtensionMethodsTest.groovy 
b/src/test/groovy/transform/stc/STCExtensionMethodsTest.groovy
index 4e8a818..a45a989 100644
--- a/src/test/groovy/transform/stc/STCExtensionMethodsTest.groovy
+++ b/src/test/groovy/transform/stc/STCExtensionMethodsTest.groovy
@@ -52,7 +52,7 @@ class STCExtensionMethodsTest extends 
StaticTypeCheckingTestCase {
         def resolver = "@GrabResolver(name='local',root='$jarURL')"
 
         assertScript resolver + """
-        @Grab('module-test:module-test:1.3')
+        @Grab('module-test:module-test:1.4')
         import org.codehaus.groovy.runtime.m12n.*
 
         // the following methods are added by the Grab test module

http://git-wip-us.apache.org/repos/asf/groovy/blob/139d3ade/src/test/org/codehaus/groovy/runtime/m12n/ExtensionModuleTest.groovy
----------------------------------------------------------------------
diff --git 
a/src/test/org/codehaus/groovy/runtime/m12n/ExtensionModuleTest.groovy 
b/src/test/org/codehaus/groovy/runtime/m12n/ExtensionModuleTest.groovy
index 1a17dbf..a7f7ca1 100644
--- a/src/test/org/codehaus/groovy/runtime/m12n/ExtensionModuleTest.groovy
+++ b/src/test/org/codehaus/groovy/runtime/m12n/ExtensionModuleTest.groovy
@@ -41,7 +41,7 @@ class ExtensionModuleTest extends GroovyTestCase {
         ExtensionModuleHelperForTests.doInFork '''
             ExtensionModuleRegistry registry = 
GroovySystem.metaClassRegistry.moduleRegistry
             // ensure that the module isn't loaded
-            assert !registry.modules.any { it.name == 'Test module for Grab' 
&& it.version == '1.3' }
+            assert !registry.modules.any { it.name == 'Test module for Grab' 
&& it.version == '1.4' }
 
             // find jar resource
             def jarURL = this.class.getResource("/jars")
@@ -50,12 +50,12 @@ class ExtensionModuleTest extends GroovyTestCase {
             def resolver = "@GrabResolver('$jarURL')"
 
             assertScript resolver + """
-            @Grab(value='module-test:module-test:1.3', changing='true')
+            @Grab(value='module-test:module-test:1.4', changing='true')
             import org.codehaus.groovy.runtime.m12n.*
 
             // ensure that the module is now loaded
             ExtensionModuleRegistry registry = 
GroovySystem.metaClassRegistry.moduleRegistry
-            assert registry.modules.any { it.name == 'Test module for Grab' && 
it.version == '1.3' }
+            assert registry.modules.any { it.name == 'Test module for Grab' && 
it.version == '1.4' }
 
             // the following methods are added by the 'Test module for Grab' 
module
             def str = 'This is a string'
@@ -64,7 +64,7 @@ class ExtensionModuleTest extends GroovyTestCase {
             """
 
             // the module should still be available
-            assert registry.modules.any { it.name == 'Test module for Grab' && 
it.version == '1.3' }
+            assert registry.modules.any { it.name == 'Test module for Grab' && 
it.version == '1.4' }
         '''
     }
 
@@ -72,7 +72,7 @@ class ExtensionModuleTest extends GroovyTestCase {
         ExtensionModuleHelperForTests.doInFork '''
             ExtensionModuleRegistry registry = 
GroovySystem.metaClassRegistry.moduleRegistry
             // ensure that the module isn't loaded
-            assert !registry.modules.any { it.name == 'Test module for Grab' 
&& it.version == '1.3' }
+            assert !registry.modules.any { it.name == 'Test module for Grab' 
&& it.version == '1.4' }
 
             // find jar resource
             def jarURL = this.class.getResource("/jars")
@@ -81,7 +81,7 @@ class ExtensionModuleTest extends GroovyTestCase {
             def resolver = "@GrabResolver('$jarURL')"
 
             assertScript resolver + """
-            @Grab(value='module-test:module-test:1.3', changing='true')
+            @Grab(value='module-test:module-test:1.4', changing='true')
             import org.codehaus.groovy.runtime.m12n.*
 
             def map = [:]
@@ -98,7 +98,7 @@ class ExtensionModuleTest extends GroovyTestCase {
         ExtensionModuleHelperForTests.doInFork '''
             ExtensionModuleRegistry registry = 
GroovySystem.metaClassRegistry.moduleRegistry
             // ensure that the module isn't loaded
-            assert !registry.modules.any { it.name == 'Test module for Grab' 
&& it.version == '1.3' }
+            assert !registry.modules.any { it.name == 'Test module for Grab' 
&& it.version == '1.4' }
 
             // find jar resource
             def jarURL = this.class.getResource("/jars")
@@ -106,7 +106,7 @@ class ExtensionModuleTest extends GroovyTestCase {
 
             assertScript """
             @GrabResolver('$jarURL')
-            @Grab(value='module-test:module-test:1.3', changing='true')
+            @Grab(value='module-test:module-test:1.4', changing='true')
             import org.codehaus.groovy.runtime.m12n.*
 
             assert 'test'.groovy7225() == 'test: ok'

http://git-wip-us.apache.org/repos/asf/groovy/blob/139d3ade/subprojects/groovy-macro/src/test/resources/META-INF/groovy/org.codehaus.groovy.runtime.ExtensionModule
----------------------------------------------------------------------
diff --git 
a/subprojects/groovy-macro/src/test/resources/META-INF/groovy/org.codehaus.groovy.runtime.ExtensionModule
 
b/subprojects/groovy-macro/src/test/resources/META-INF/groovy/org.codehaus.groovy.runtime.ExtensionModule
new file mode 100644
index 0000000..bbca02c
--- /dev/null
+++ 
b/subprojects/groovy-macro/src/test/resources/META-INF/groovy/org.codehaus.groovy.runtime.ExtensionModule
@@ -0,0 +1,21 @@
+#
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you under the Apache License, Version 2.0 (the
+#  "License"); you may not use this file except in compliance
+#  with the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing,
+#  software distributed under the License is distributed on an
+#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+#  KIND, either express or implied.  See the License for the
+#  specific language governing permissions and limitations
+#  under the License.
+#
+moduleName=macro-module
+moduleVersion=1.0
+extensionClasses=org.codehaus.groovy.macro.ExampleMacroMethods

http://git-wip-us.apache.org/repos/asf/groovy/blob/139d3ade/subprojects/groovy-macro/src/test/resources/META-INF/services/org.codehaus.groovy.runtime.ExtensionModule
----------------------------------------------------------------------
diff --git 
a/subprojects/groovy-macro/src/test/resources/META-INF/services/org.codehaus.groovy.runtime.ExtensionModule
 
b/subprojects/groovy-macro/src/test/resources/META-INF/services/org.codehaus.groovy.runtime.ExtensionModule
deleted file mode 100644
index 45c87ed..0000000
--- 
a/subprojects/groovy-macro/src/test/resources/META-INF/services/org.codehaus.groovy.runtime.ExtensionModule
+++ /dev/null
@@ -1,17 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-moduleName=macro-module
-moduleVersion=1.0
-extensionClasses=org.codehaus.groovy.macro.ExampleMacroMethods

Reply via email to