You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by pa...@apache.org on 2018/02/14 21:39:56 UTC

[3/3] groovy git commit: GROOVY-8471: Contents of META-INF/services/org.codehaus.groovy.source.Extensions conflict with Maven/Jisaw

GROOVY-8471: Contents of META-INF/services/org.codehaus.groovy.source.Extensions conflict with Maven/Jisaw


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

Branch: refs/heads/master
Commit: e7aeae058f6d98f556f29068bbc51ec778e4cf6c
Parents: 69fc7ab
Author: paulk <pa...@asert.com.au>
Authored: Wed Feb 14 13:16:22 2018 +1000
Committer: paulk <pa...@asert.com.au>
Committed: Thu Feb 15 07:38:42 2018 +1000

----------------------------------------------------------------------
 .../groovy/control/SourceExtensionHandler.java  |  5 ++++-
 .../org.codehaus.groovy.source.Extensions       | 22 ++++++++++++++++++++
 .../org.codehaus.groovy.source.Extensions       | 22 --------------------
 3 files changed, 26 insertions(+), 23 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/groovy/blob/e7aeae05/src/main/java/org/codehaus/groovy/control/SourceExtensionHandler.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/codehaus/groovy/control/SourceExtensionHandler.java b/src/main/java/org/codehaus/groovy/control/SourceExtensionHandler.java
index a12cae1..774b128 100644
--- a/src/main/java/org/codehaus/groovy/control/SourceExtensionHandler.java
+++ b/src/main/java/org/codehaus/groovy/control/SourceExtensionHandler.java
@@ -37,7 +37,10 @@ public class SourceExtensionHandler {
         Set<String> extensions = new LinkedHashSet<String>();
         extensions.add("groovy");
         try {
-            Enumeration<URL> globalServices = loader.getResources("META-INF/services/org.codehaus.groovy.source.Extensions");
+            Enumeration<URL> globalServices = loader.getResources("META-INF/groovy/org.codehaus.groovy.source.Extensions");
+            if (!globalServices.hasMoreElements()) {
+                globalServices = loader.getResources("META-INF/services/org.codehaus.groovy.source.Extensions");
+            }
             while (globalServices.hasMoreElements()) {
                 BufferedReader svcIn = null;
                 URL service = globalServices.nextElement();

http://git-wip-us.apache.org/repos/asf/groovy/blob/e7aeae05/src/resources/META-INF/groovy/org.codehaus.groovy.source.Extensions
----------------------------------------------------------------------
diff --git a/src/resources/META-INF/groovy/org.codehaus.groovy.source.Extensions b/src/resources/META-INF/groovy/org.codehaus.groovy.source.Extensions
new file mode 100644
index 0000000..c17fe8b
--- /dev/null
+++ b/src/resources/META-INF/groovy/org.codehaus.groovy.source.Extensions
@@ -0,0 +1,22 @@
+# 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.
+
+# Format: one extension on each line without the leading "*."
+# Listed below are default groovy source file extensions.
+
+# NOTE: This implementation of supporting multiple file extensions is experimental and
+# the exact implementation details may vary when modularization gets introduced in
+# groovy 2.0. However, in terms of the behavior, this support will remain intact.
+groovy
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/groovy/blob/e7aeae05/src/resources/META-INF/services/org.codehaus.groovy.source.Extensions
----------------------------------------------------------------------
diff --git a/src/resources/META-INF/services/org.codehaus.groovy.source.Extensions b/src/resources/META-INF/services/org.codehaus.groovy.source.Extensions
deleted file mode 100644
index c17fe8b..0000000
--- a/src/resources/META-INF/services/org.codehaus.groovy.source.Extensions
+++ /dev/null
@@ -1,22 +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.
-
-# Format: one extension on each line without the leading "*."
-# Listed below are default groovy source file extensions.
-
-# NOTE: This implementation of supporting multiple file extensions is experimental and
-# the exact implementation details may vary when modularization gets introduced in
-# groovy 2.0. However, in terms of the behavior, this support will remain intact.
-groovy
\ No newline at end of file