From a786f5682d0a677bb9226a9ef939974aa840096c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 20 Mar 2022 10:57:59 +0000 Subject: [PATCH 1/2] Bump plexus-compiler-javac from 2.10.0 to 2.11.1 Bumps plexus-compiler-javac from 2.10.0 to 2.11.1. --- updated-dependencies: - dependency-name: org.codehaus.plexus:plexus-compiler-javac dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- modello-test/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modello-test/pom.xml b/modello-test/pom.xml index 65699a380..5d5becc1a 100644 --- a/modello-test/pom.xml +++ b/modello-test/pom.xml @@ -26,7 +26,7 @@ org.codehaus.plexus plexus-compiler-javac - 2.10.0 + 2.11.1 org.codehaus.plexus From bb206319f14afe35ae030b13035eaa1afd6c92fc Mon Sep 17 00:00:00 2001 From: Olivier Lamy Date: Tue, 22 Mar 2022 20:53:50 +1000 Subject: [PATCH 2/2] fix this due to recent changes in plexus-compiler Signed-off-by: Olivier Lamy --- .../modello/AbstractModelloJavaGeneratorTest.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/modello-test/src/main/java/org/codehaus/modello/AbstractModelloJavaGeneratorTest.java b/modello-test/src/main/java/org/codehaus/modello/AbstractModelloJavaGeneratorTest.java index db989c8a1..d498c6f8c 100755 --- a/modello-test/src/main/java/org/codehaus/modello/AbstractModelloJavaGeneratorTest.java +++ b/modello-test/src/main/java/org/codehaus/modello/AbstractModelloJavaGeneratorTest.java @@ -29,6 +29,7 @@ import org.codehaus.plexus.compiler.CompilerMessage; import org.codehaus.plexus.compiler.CompilerResult; import org.codehaus.plexus.compiler.javac.JavacCompiler; +import org.codehaus.plexus.component.repository.exception.ComponentLookupException; import org.codehaus.plexus.util.FileUtils; import java.io.File; @@ -227,7 +228,15 @@ private void compileGeneratedSources( String verifierId, String javaSource ) sourceDirectories = new String[]{ generatedSources.getAbsolutePath() }; } - Compiler compiler = new JavacCompiler(); + Compiler compiler; + try + { + compiler = lookup(Compiler.class, "javac"); + } + catch (ComponentLookupException e) + { + throw new RuntimeException(e.getMessage(), e); + } CompilerConfiguration configuration = new CompilerConfiguration(); configuration.setClasspathEntries( Arrays.asList( classPathElements ) );