mirror of https://github.com/apache/maven.git
Compile with debugging info by default
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@163298 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
cd38ae43fc
commit
ed68e4bed1
|
@ -23,12 +23,12 @@
|
|||
<dependency>
|
||||
<groupId>plexus</groupId>
|
||||
<artifactId>plexus-compiler-api</artifactId>
|
||||
<version>1.0</version>
|
||||
<version>1.2-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>plexus</groupId>
|
||||
<artifactId>plexus-compiler-javac</artifactId>
|
||||
<version>1.0</version>
|
||||
<version>1.2-SNAPSHOT</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
|
|
|
@ -1,10 +1,12 @@
|
|||
package org.apache.maven.plugin;
|
||||
|
||||
import org.codehaus.plexus.compiler.Compiler;
|
||||
import org.codehaus.plexus.compiler.CompilerConfiguration;
|
||||
import org.codehaus.plexus.compiler.CompilerError;
|
||||
import org.codehaus.plexus.compiler.javac.JavacCompiler;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.Arrays;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
|
@ -73,8 +75,17 @@ public class CompilerMojo
|
|||
{
|
||||
return;
|
||||
}
|
||||
|
||||
CompilerConfiguration compilerConfiguration = new CompilerConfiguration();
|
||||
|
||||
compilerConfiguration.setOutputLocation(outputDirectory);
|
||||
compilerConfiguration.setClasspathEntries(Arrays.asList(classpathElements));
|
||||
compilerConfiguration.setSourceLocations(Arrays.asList(new String[] {sourceDirectory}));
|
||||
|
||||
/* Compile with debugging info */
|
||||
compilerConfiguration.addCompilerOption("-g", null);
|
||||
|
||||
List messages = compiler.compile( classpathElements, new String[]{sourceDirectory}, outputDirectory );
|
||||
List messages = compiler.compile(compilerConfiguration);
|
||||
|
||||
if ( debug )
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue