From 7c55d5cfb2f6e405d0d49ef19df4c250b821ab77 Mon Sep 17 00:00:00 2001 From: Trygve Laugstol Date: Wed, 24 Aug 2005 10:27:28 +0000 Subject: [PATCH] o Adding a missing part of Rod's last patch. git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@239596 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/maven/plugin/AbstractCompilerMojo.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/maven-plugins/maven-compiler-plugin/src/main/java/org/apache/maven/plugin/AbstractCompilerMojo.java b/maven-plugins/maven-compiler-plugin/src/main/java/org/apache/maven/plugin/AbstractCompilerMojo.java index ba08959875..fc668a5c7c 100644 --- a/maven-plugins/maven-compiler-plugin/src/main/java/org/apache/maven/plugin/AbstractCompilerMojo.java +++ b/maven-plugins/maven-compiler-plugin/src/main/java/org/apache/maven/plugin/AbstractCompilerMojo.java @@ -110,6 +110,13 @@ public abstract class AbstractCompilerMojo */ private String compilerId; + /** + * Version of the compiler to use, ex. "1.3", "1.5" + * + * @parameter + */ + private String compilerVersion; + /** * Runs the compiler in a separate process. *

@@ -248,6 +255,8 @@ public abstract class AbstractCompilerMojo compilerConfiguration.setWorkingDirectory( basedir ); + compilerConfiguration.setCompilerVersion( compilerVersion ); + compilerConfiguration.setBuildDirectory( buildDirectory ); compilerConfiguration.setOutputFileName( outputFileName ); @@ -265,7 +274,7 @@ public abstract class AbstractCompilerMojo canUpdateTarget = compiler.canUpdateTarget( compilerConfiguration ); if ( compiler.getCompilerOutputStyle() == CompilerOutputStyle.ONE_OUTPUT_FILE_FOR_ALL_INPUT_FILES && - !canUpdateTarget ) + !canUpdateTarget ) { getLog().info( "RESCANNING!" ); // TODO: This second scan for source files is sub-optimal