Skip to content

Commit

Permalink
Revert indent changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Laurens-W committed Oct 16, 2024
1 parent 03dd8d6 commit a11feb3
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions rewrite-maven/src/main/java/org/openrewrite/maven/AddPlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@ public class AddPlugin extends Recipe {

@Option(displayName = "File pattern",
description = "A glob expression that can be used to constrain which directories or source files should be searched. " +
"Multiple patterns may be specified, separated by a semicolon `;`. " +
"If multiple patterns are supplied any of the patterns matching will be interpreted as a match. " +
"When not set, all source files are searched. ",
"Multiple patterns may be specified, separated by a semicolon `;`. " +
"If multiple patterns are supplied any of the patterns matching will be interpreted as a match. " +
"When not set, all source files are searched. ",
required = false,
example = "**/*-parent/grpc-*/pom.xml")
@Nullable
Expand Down Expand Up @@ -159,8 +159,8 @@ public Xml.Tag visitTag(Xml.Tag tag, ExecutionContext ctx) {
Optional<Xml.Tag> maybePlugin = plugins.getChildren().stream()
.filter(plugin ->
"plugin".equals(plugin.getName()) &&
groupId.equals(plugin.getChildValue("groupId").orElse(null)) &&
artifactId.equals(plugin.getChildValue("artifactId").orElse(null))
groupId.equals(plugin.getChildValue("groupId").orElse(null)) &&
artifactId.equals(plugin.getChildValue("artifactId").orElse(null))
)
.findAny();

Expand All @@ -173,13 +173,13 @@ public Xml.Tag visitTag(Xml.Tag tag, ExecutionContext ctx) {
}
} else {
Xml.Tag pluginTag = Xml.Tag.build("<plugin>\n" +
"<groupId>" + groupId + "</groupId>\n" +
"<artifactId>" + artifactId + "</artifactId>\n" +
(version != null ? "<version>" + version + "</version>\n" : "") +
(executions != null ? executions.trim() + "\n" : "") +
(configuration != null ? configuration.trim() + "\n" : "") +
(dependencies != null ? dependencies.trim() + "\n" : "") +
"</plugin>");
"<groupId>" + groupId + "</groupId>\n" +
"<artifactId>" + artifactId + "</artifactId>\n" +
(version != null ? "<version>" + version + "</version>\n" : "") +
(executions != null ? executions.trim() + "\n" : "") +
(configuration != null ? configuration.trim() + "\n" : "") +
(dependencies != null ? dependencies.trim() + "\n" : "") +
"</plugin>");
t = (Xml.Tag) new AddToTagVisitor<>(plugins, pluginTag).visitNonNull(t, ctx, getCursor().getParentOrThrow());
}
}
Expand Down

0 comments on commit a11feb3

Please sign in to comment.