Skip to content

Commit

Permalink
Still set Maven compiler plugin Java version when using default group…
Browse files Browse the repository at this point in the history
…Id (#321)
  • Loading branch information
timtebeek authored Oct 18, 2023
1 parent 8332541 commit a99ae36
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ public Xml.Tag visitTag(Xml.Tag tag, ExecutionContext ctx) {
}
Optional<Xml.Tag> maybeCompilerPlugin = t.getChildren().stream()
.filter(plugin -> "plugin".equals(plugin.getName())
&& "org.apache.maven.plugins".equals(plugin.getChildValue("groupId").orElse(null))
&& "maven-compiler-plugin".equals(plugin.getChildValue("artifactId").orElse(null)))
&& "org.apache.maven.plugins".equals(plugin.getChildValue("groupId").orElse("org.apache.maven.plugins"))
&& "maven-compiler-plugin".equals(plugin.getChildValue("artifactId").orElse(null)))
.findAny();
Optional<Xml.Tag> maybeCompilerPluginConfig = maybeCompilerPlugin
.flatMap(it -> it.getChild("configuration"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,6 @@ void reusesJavaVersionVariableIfAvailable() {
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<configuration>
Expand Down Expand Up @@ -240,7 +239,6 @@ void reusesJavaVersionVariableIfAvailable() {
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<configuration>
Expand Down

0 comments on commit a99ae36

Please sign in to comment.