This is an automated email from the ASF dual-hosted git repository.
jdaugherty pushed a commit to branch corrupt-jar-fixes
in repository https://gitbox.apache.org/repos/asf/grails-core.git
The following commit(s) were added to refs/heads/corrupt-jar-fixes by this push:
new 34c0bbd5f5 Enhance error message to determine which plugin is a problem
34c0bbd5f5 is described below
commit 34c0bbd5f5c0b5e60b7bbf721806dcec19936f2d
Author: James Daugherty <[email protected]>
AuthorDate: Thu May 15 17:40:27 2025 -0400
Enhance error message to determine which plugin is a problem
---
.../org/grails/plugins/AbstractGrailsPlugin.java | 34 ++++++++++++----------
1 file changed, 18 insertions(+), 16 deletions(-)
diff --git
a/grails-core/src/main/groovy/org/grails/plugins/AbstractGrailsPlugin.java
b/grails-core/src/main/groovy/org/grails/plugins/AbstractGrailsPlugin.java
index 96b2c11281..7a53964559 100644
--- a/grails-core/src/main/groovy/org/grails/plugins/AbstractGrailsPlugin.java
+++ b/grails-core/src/main/groovy/org/grails/plugins/AbstractGrailsPlugin.java
@@ -1,20 +1,18 @@
/*
- * 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
+ * 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
*
- * https://www.apache.org/licenses/LICENSE-2.0
+ * https://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.
+ * 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.
*/
package org.grails.plugins;
@@ -40,7 +38,11 @@ import org.springframework.util.Assert;
import java.io.IOException;
import java.net.URL;
-import java.util.*;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
/**
* Abstract implementation that provides some default behaviours
@@ -130,7 +132,7 @@ public abstract class AbstractGrailsPlugin extends
GroovyObjectSupport implement
if(ymlResource != null && ymlResource.exists()) {
if (groovyResourceExists) {
- throw new RuntimeException("A plugin may define a plugin.yml
or a plugin.groovy, but not both");
+ throw new RuntimeException("A plugin [" +
pluginClass.getName() + "] may define a plugin.yml or a plugin.groovy, but not
both");
}
return ymlResource;
}