-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
16 changed files
with
83 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,19 +25,19 @@ | |
*/ | ||
|
||
import org.codehaus.plexus.compiler.Compiler; | ||
import org.codehaus.plexus.component.annotations.Component; | ||
import org.codehaus.plexus.component.annotations.Requirement; | ||
|
||
import javax.inject.Inject; | ||
import javax.inject.Named; | ||
import java.util.Map; | ||
|
||
/** | ||
* @author <a href="mailto:[email protected]">Trygve Laugstøl</a> | ||
*/ | ||
@Component( role = CompilerManager.class ) | ||
@Named | ||
public class DefaultCompilerManager | ||
implements CompilerManager | ||
{ | ||
@Requirement | ||
@Inject | ||
private Map<String, Compiler> compilers; | ||
|
||
// ---------------------------------------------------------------------- | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,15 +10,15 @@ | |
import org.aspectj.org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants; | ||
import org.aspectj.tools.ajc.Main; | ||
import org.codehaus.plexus.compiler.AbstractCompiler; | ||
import org.codehaus.plexus.compiler.Compiler; | ||
import org.codehaus.plexus.compiler.CompilerConfiguration; | ||
import org.codehaus.plexus.compiler.CompilerException; | ||
import org.codehaus.plexus.compiler.CompilerMessage; | ||
import org.codehaus.plexus.compiler.CompilerOutputStyle; | ||
import org.codehaus.plexus.compiler.CompilerResult; | ||
import org.codehaus.plexus.component.annotations.Component; | ||
import org.codehaus.plexus.util.DirectoryScanner; | ||
|
||
import javax.inject.Named; | ||
import javax.inject.Singleton; | ||
import java.io.File; | ||
import java.io.IOException; | ||
import java.net.MalformedURLException; | ||
|
@@ -287,7 +287,7 @@ | |
* | ||
* @author <a href="mailto:[email protected]">Jason van Zyl</a> | ||
*/ | ||
@Component( role = Compiler.class, hint = "aspectj") | ||
@Named("aspectj") | ||
public class AspectJCompiler | ||
extends AbstractCompiler | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,13 +17,11 @@ | |
*/ | ||
|
||
import org.codehaus.plexus.compiler.AbstractCompiler; | ||
import org.codehaus.plexus.compiler.Compiler; | ||
import org.codehaus.plexus.compiler.CompilerConfiguration; | ||
import org.codehaus.plexus.compiler.CompilerException; | ||
import org.codehaus.plexus.compiler.CompilerMessage; | ||
import org.codehaus.plexus.compiler.CompilerOutputStyle; | ||
import org.codehaus.plexus.compiler.CompilerResult; | ||
import org.codehaus.plexus.component.annotations.Component; | ||
import org.codehaus.plexus.util.DirectoryScanner; | ||
import org.codehaus.plexus.util.IOUtil; | ||
import org.codehaus.plexus.util.Os; | ||
|
@@ -34,6 +32,7 @@ | |
import org.codehaus.plexus.util.cli.StreamConsumer; | ||
import org.codehaus.plexus.util.cli.WriterStreamConsumer; | ||
|
||
import javax.inject.Named; | ||
import java.io.BufferedReader; | ||
import java.io.File; | ||
import java.io.FileWriter; | ||
|
@@ -57,7 +56,7 @@ | |
* @author <a href="mailto:[email protected]">Matthew Pocock</a> | ||
* @author <a href="mailto:[email protected]">Chris Stevenson</a> | ||
*/ | ||
@Component( role = Compiler.class, hint = "csharp" ) | ||
@Named( "csharp" ) | ||
public class CSharpCompiler | ||
extends AbstractCompiler | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,16 +18,15 @@ | |
|
||
import com.google.errorprone.ErrorProneJavaCompiler; | ||
|
||
import org.codehaus.plexus.compiler.Compiler; | ||
import org.codehaus.plexus.compiler.CompilerConfiguration; | ||
import org.codehaus.plexus.compiler.CompilerException; | ||
import org.codehaus.plexus.compiler.CompilerMessage; | ||
import org.codehaus.plexus.compiler.CompilerResult; | ||
import org.codehaus.plexus.compiler.javac.InProcessCompiler; | ||
import org.codehaus.plexus.compiler.javac.JavacCompiler; | ||
import org.codehaus.plexus.compiler.javac.JavaxToolsCompiler; | ||
import org.codehaus.plexus.component.annotations.Component; | ||
|
||
import javax.inject.Named; | ||
import javax.tools.JavaCompiler; | ||
|
||
import java.net.MalformedURLException; | ||
|
@@ -40,7 +39,7 @@ | |
* | ||
* @author <a href="mailto:[email protected]">Alex Eagle</a> | ||
*/ | ||
@Component( role = Compiler.class, hint = "javac-with-errorprone") | ||
@Named("javac-with-errorprone") | ||
public class JavacCompilerWithErrorProne | ||
extends JavacCompiler | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -63,29 +63,31 @@ | |
import java.util.concurrent.CopyOnWriteArrayList; | ||
|
||
import org.codehaus.plexus.compiler.AbstractCompiler; | ||
import org.codehaus.plexus.compiler.Compiler; | ||
import org.codehaus.plexus.compiler.CompilerConfiguration; | ||
import org.codehaus.plexus.compiler.CompilerException; | ||
import org.codehaus.plexus.compiler.CompilerMessage; | ||
import org.codehaus.plexus.compiler.CompilerOutputStyle; | ||
import org.codehaus.plexus.compiler.CompilerResult; | ||
import org.codehaus.plexus.component.annotations.Component; | ||
import org.codehaus.plexus.component.annotations.Requirement; | ||
import org.codehaus.plexus.util.FileUtils; | ||
import org.codehaus.plexus.util.Os; | ||
import org.codehaus.plexus.util.StringUtils; | ||
import org.codehaus.plexus.util.cli.CommandLineException; | ||
import org.codehaus.plexus.util.cli.CommandLineUtils; | ||
import org.codehaus.plexus.util.cli.Commandline; | ||
|
||
import javax.inject.Inject; | ||
import javax.inject.Named; | ||
import javax.inject.Singleton; | ||
|
||
/** | ||
* @author <a href="mailto:[email protected]">Trygve Laugstøl</a> | ||
* @author <a href="mailto:[email protected]">Matthew Pocock</a> | ||
* @author <a href="mailto:[email protected]">Jörg Waßmer</a> | ||
* @author Others | ||
* | ||
*/ | ||
@Component( role = Compiler.class, hint = "javac" ) | ||
@Named("javac") | ||
@Singleton | ||
public class JavacCompiler | ||
extends AbstractCompiler | ||
{ | ||
|
@@ -107,7 +109,7 @@ public class JavacCompiler | |
|
||
private final List<Class<?>> javaccClasses = new CopyOnWriteArrayList<>(); | ||
|
||
@Requirement | ||
@Inject | ||
private InProcessCompiler inProcessCompiler; | ||
|
||
// ---------------------------------------------------------------------- | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,10 +22,10 @@ | |
import org.codehaus.plexus.compiler.CompilerMessage; | ||
import org.codehaus.plexus.compiler.CompilerException; | ||
import org.codehaus.plexus.compiler.CompilerResult; | ||
import org.codehaus.plexus.component.annotations.Component; | ||
import org.slf4j.Logger; | ||
import org.slf4j.LoggerFactory; | ||
|
||
import javax.inject.Named; | ||
import javax.tools.Diagnostic; | ||
import javax.tools.DiagnosticCollector; | ||
import javax.tools.JavaCompiler; | ||
|
@@ -45,7 +45,7 @@ | |
* @author <a href="mailto:[email protected]">David M. Lloyd</a> | ||
* @since 2.0 | ||
*/ | ||
@Component( role = InProcessCompiler.class ) | ||
@Named | ||
public class JavaxToolsCompiler implements InProcessCompiler | ||
{ | ||
private final Logger log = LoggerFactory.getLogger( getClass() ); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters