This is an automated email from the ASF dual-hosted git repository. elharo pushed a commit to branch fix-resource-ref-constant in repository https://gitbox.apache.org/repos/asf/maven-ear-plugin.git
commit 45a0be873c33161933e20fb562a841839bed13af Author: Elliotte Rusty Harold <[email protected]> AuthorDate: Thu Jul 9 10:38:06 2026 +0000 fix: use RESOURCE_REF constant in error messages Lines 73 and 75 of ResourceRef constructor used RESOURCE_REF_NAME ("res-ref-name") where they should use RESOURCE_REF ("resource-ref") for the element name in error messages. --- src/main/java/org/apache/maven/plugins/ear/ResourceRef.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/apache/maven/plugins/ear/ResourceRef.java b/src/main/java/org/apache/maven/plugins/ear/ResourceRef.java index 4dde094..8e50030 100644 --- a/src/main/java/org/apache/maven/plugins/ear/ResourceRef.java +++ b/src/main/java/org/apache/maven/plugins/ear/ResourceRef.java @@ -69,10 +69,9 @@ public class ResourceRef { */ public ResourceRef(String name, String type, String auth, String lookupName) { if (name == null || name.isEmpty()) { - throw new IllegalArgumentException( - RESOURCE_REF_NAME + " in " + RESOURCE_REF_NAME + " element cannot be null."); + throw new IllegalArgumentException(RESOURCE_REF_NAME + " in " + RESOURCE_REF + " element cannot be null."); } else if ((type == null || type.isEmpty()) && (auth == null || auth.isEmpty())) { - throw new IllegalArgumentException(RESOURCE_TYPE + " in " + RESOURCE_REF_NAME + " element cannot be null "); + throw new IllegalArgumentException(RESOURCE_TYPE + " in " + RESOURCE_REF + " element cannot be null "); } this.name = name;
