Repository: groovy Updated Branches: refs/heads/GROOVY_2_6_X 6e3e62c6a -> d069260aa
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/d069260a Tree: http://git-wip-us.apache.org/repos/asf/groovy/tree/d069260a Diff: http://git-wip-us.apache.org/repos/asf/groovy/diff/d069260a Branch: refs/heads/GROOVY_2_6_X Commit: d069260aa439f2517bfdf8b1c9ed19b8f006859a Parents: ba811fd 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 12:49:36 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/d069260a/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/d069260a/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/d069260a/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