Skip to content

Commit 40feb1c

Browse files
committed
RequireElements: allow slashes in element names
This lets you specify nested elements, such as specific properties, using xpath syntax; e.g. 'properties//package-name'. All elements are prepended with 'project//' but otherwise flexible.
1 parent 1a8f076 commit 40feb1c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/org/scijava/maven/plugin/enforcer/RequireElements.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ public void execute(final EnforcerRuleHelper helper)
9090
fail("no elements were specified");
9191
}
9292
for (final String element : elements) {
93-
if (element.matches("[^A-Za-z0-9_]")) {
93+
if (element.matches("[^A-Za-z0-9_/]")) {
9494
fail("invalid character in element name '" + element + "'");
9595
}
9696
}

0 commit comments

Comments
 (0)