diff --git a/plexus-compiler-manager/pom.xml b/plexus-compiler-manager/pom.xml
index ecf45839..243a6f0c 100644
--- a/plexus-compiler-manager/pom.xml
+++ b/plexus-compiler-manager/pom.xml
@@ -18,8 +18,8 @@
plexus-compiler-api
- org.codehaus.plexus
- plexus-component-annotations
+ javax.inject
+ javax.inject
org.junit.jupiter
diff --git a/plexus-compiler-manager/src/main/java/org/codehaus/plexus/compiler/manager/DefaultCompilerManager.java b/plexus-compiler-manager/src/main/java/org/codehaus/plexus/compiler/manager/DefaultCompilerManager.java
index 9cf25d56..3b303add 100644
--- a/plexus-compiler-manager/src/main/java/org/codehaus/plexus/compiler/manager/DefaultCompilerManager.java
+++ b/plexus-compiler-manager/src/main/java/org/codehaus/plexus/compiler/manager/DefaultCompilerManager.java
@@ -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 Trygve Laugstøl
*/
-@Component( role = CompilerManager.class )
+@Named
public class DefaultCompilerManager
implements CompilerManager
{
- @Requirement
+ @Inject
private Map compilers;
// ----------------------------------------------------------------------
diff --git a/plexus-compilers/plexus-compiler-aspectj/pom.xml b/plexus-compilers/plexus-compiler-aspectj/pom.xml
index 11278ad8..31aeefac 100644
--- a/plexus-compilers/plexus-compiler-aspectj/pom.xml
+++ b/plexus-compilers/plexus-compiler-aspectj/pom.xml
@@ -19,8 +19,8 @@
- org.codehaus.plexus
- plexus-component-annotations
+ javax.inject
+ javax.inject
org.aspectj
diff --git a/plexus-compilers/plexus-compiler-aspectj/src/main/java/org/codehaus/plexus/compiler/ajc/AspectJCompiler.java b/plexus-compilers/plexus-compiler-aspectj/src/main/java/org/codehaus/plexus/compiler/ajc/AspectJCompiler.java
index 8efcf201..b403f32a 100644
--- a/plexus-compilers/plexus-compiler-aspectj/src/main/java/org/codehaus/plexus/compiler/ajc/AspectJCompiler.java
+++ b/plexus-compilers/plexus-compiler-aspectj/src/main/java/org/codehaus/plexus/compiler/ajc/AspectJCompiler.java
@@ -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 Jason van Zyl
*/
-@Component( role = Compiler.class, hint = "aspectj")
+@Named("aspectj")
public class AspectJCompiler
extends AbstractCompiler
{
diff --git a/plexus-compilers/plexus-compiler-csharp/pom.xml b/plexus-compilers/plexus-compiler-csharp/pom.xml
index 45847e62..f8507409 100644
--- a/plexus-compilers/plexus-compiler-csharp/pom.xml
+++ b/plexus-compilers/plexus-compiler-csharp/pom.xml
@@ -15,8 +15,8 @@
- org.codehaus.plexus
- plexus-component-annotations
+ javax.inject
+ javax.inject
org.codehaus.plexus
diff --git a/plexus-compilers/plexus-compiler-csharp/src/main/java/org/codehaus/plexus/compiler/csharp/CSharpCompiler.java b/plexus-compilers/plexus-compiler-csharp/src/main/java/org/codehaus/plexus/compiler/csharp/CSharpCompiler.java
index 5837ef9d..9a232bd2 100644
--- a/plexus-compilers/plexus-compiler-csharp/src/main/java/org/codehaus/plexus/compiler/csharp/CSharpCompiler.java
+++ b/plexus-compilers/plexus-compiler-csharp/src/main/java/org/codehaus/plexus/compiler/csharp/CSharpCompiler.java
@@ -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 Matthew Pocock
* @author Chris Stevenson
*/
-@Component( role = Compiler.class, hint = "csharp" )
+@Named( "csharp" )
public class CSharpCompiler
extends AbstractCompiler
{
diff --git a/plexus-compilers/plexus-compiler-eclipse/pom.xml b/plexus-compilers/plexus-compiler-eclipse/pom.xml
index 93338780..757f4fca 100644
--- a/plexus-compilers/plexus-compiler-eclipse/pom.xml
+++ b/plexus-compilers/plexus-compiler-eclipse/pom.xml
@@ -32,8 +32,8 @@
3.33.0
- org.codehaus.plexus
- plexus-component-annotations
+ javax.inject
+ javax.inject
org.junit.jupiter
diff --git a/plexus-compilers/plexus-compiler-eclipse/src/main/java/org/codehaus/plexus/compiler/eclipse/EclipseJavaCompiler.java b/plexus-compilers/plexus-compiler-eclipse/src/main/java/org/codehaus/plexus/compiler/eclipse/EclipseJavaCompiler.java
index a94de247..305e76a1 100644
--- a/plexus-compilers/plexus-compiler-eclipse/src/main/java/org/codehaus/plexus/compiler/eclipse/EclipseJavaCompiler.java
+++ b/plexus-compilers/plexus-compiler-eclipse/src/main/java/org/codehaus/plexus/compiler/eclipse/EclipseJavaCompiler.java
@@ -24,6 +24,8 @@
* SOFTWARE.
*/
+import javax.inject.Named;
+import javax.inject.Singleton;
import javax.tools.Diagnostic;
import javax.tools.DiagnosticListener;
import javax.tools.JavaCompiler;
@@ -44,13 +46,11 @@
import java.util.Map.Entry;
import java.util.ServiceLoader;
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.StringUtils;
import org.eclipse.jdt.core.compiler.CompilationProgress;
import org.eclipse.jdt.core.compiler.batch.BatchCompiler;
@@ -58,7 +58,8 @@
/**
*
*/
-@Component( role = Compiler.class, hint = "eclipse" )
+@Named( "eclipse" )
+@Singleton
public class EclipseJavaCompiler
extends AbstractCompiler
{
diff --git a/plexus-compilers/plexus-compiler-j2objc/pom.xml b/plexus-compilers/plexus-compiler-j2objc/pom.xml
index 70b478b7..0780bdee 100644
--- a/plexus-compilers/plexus-compiler-j2objc/pom.xml
+++ b/plexus-compilers/plexus-compiler-j2objc/pom.xml
@@ -19,8 +19,8 @@
plexus-utils
- org.codehaus.plexus
- plexus-component-annotations
+ javax.inject
+ javax.inject
org.junit.jupiter
diff --git a/plexus-compilers/plexus-compiler-j2objc/src/main/java/org/codehaus/plexus/compiler/j2objc/J2ObjCCompiler.java b/plexus-compilers/plexus-compiler-j2objc/src/main/java/org/codehaus/plexus/compiler/j2objc/J2ObjCCompiler.java
index 2bb8cf9a..170caf76 100644
--- a/plexus-compilers/plexus-compiler-j2objc/src/main/java/org/codehaus/plexus/compiler/j2objc/J2ObjCCompiler.java
+++ b/plexus-compilers/plexus-compiler-j2objc/src/main/java/org/codehaus/plexus/compiler/j2objc/J2ObjCCompiler.java
@@ -17,14 +17,12 @@
*/
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.CompilerMessage.Kind;
import org.codehaus.plexus.compiler.CompilerOutputStyle;
import org.codehaus.plexus.compiler.CompilerResult;
-import org.codehaus.plexus.component.annotations.Component;
import org.codehaus.plexus.util.StringUtils;
import org.codehaus.plexus.util.cli.CommandLineException;
import org.codehaus.plexus.util.cli.CommandLineUtils;
@@ -32,6 +30,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.IOException;
@@ -51,7 +50,7 @@
* Maître
*
*/
-@Component( role = Compiler.class, hint = "j2objc")
+@Named( "j2objc" )
public class J2ObjCCompiler
extends AbstractCompiler
{
diff --git a/plexus-compilers/plexus-compiler-javac-errorprone/pom.xml b/plexus-compilers/plexus-compiler-javac-errorprone/pom.xml
index bd713710..fe25300c 100644
--- a/plexus-compilers/plexus-compiler-javac-errorprone/pom.xml
+++ b/plexus-compilers/plexus-compiler-javac-errorprone/pom.xml
@@ -36,8 +36,8 @@
${errorprone.version}
- org.codehaus.plexus
- plexus-component-annotations
+ javax.inject
+ javax.inject
diff --git a/plexus-compilers/plexus-compiler-javac-errorprone/src/main/java/org/codehaus/plexus/compiler/javac/errorprone/JavacCompilerWithErrorProne.java b/plexus-compilers/plexus-compiler-javac-errorprone/src/main/java/org/codehaus/plexus/compiler/javac/errorprone/JavacCompilerWithErrorProne.java
index 74282b67..2d206247 100644
--- a/plexus-compilers/plexus-compiler-javac-errorprone/src/main/java/org/codehaus/plexus/compiler/javac/errorprone/JavacCompilerWithErrorProne.java
+++ b/plexus-compilers/plexus-compiler-javac-errorprone/src/main/java/org/codehaus/plexus/compiler/javac/errorprone/JavacCompilerWithErrorProne.java
@@ -18,7 +18,6 @@
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;
@@ -26,8 +25,8 @@
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 Alex Eagle
*/
-@Component( role = Compiler.class, hint = "javac-with-errorprone")
+@Named("javac-with-errorprone")
public class JavacCompilerWithErrorProne
extends JavacCompiler
{
diff --git a/plexus-compilers/plexus-compiler-javac/pom.xml b/plexus-compilers/plexus-compiler-javac/pom.xml
index 7a4e9103..6d0862f3 100644
--- a/plexus-compilers/plexus-compiler-javac/pom.xml
+++ b/plexus-compilers/plexus-compiler-javac/pom.xml
@@ -19,8 +19,8 @@
plexus-utils
- org.codehaus.plexus
- plexus-component-annotations
+ javax.inject
+ javax.inject
org.junit.jupiter
diff --git a/plexus-compilers/plexus-compiler-javac/src/main/java/org/codehaus/plexus/compiler/javac/JavacCompiler.java b/plexus-compilers/plexus-compiler-javac/src/main/java/org/codehaus/plexus/compiler/javac/JavacCompiler.java
index bbad6260..718d1d5e 100644
--- a/plexus-compilers/plexus-compiler-javac/src/main/java/org/codehaus/plexus/compiler/javac/JavacCompiler.java
+++ b/plexus-compilers/plexus-compiler-javac/src/main/java/org/codehaus/plexus/compiler/javac/JavacCompiler.java
@@ -63,14 +63,11 @@
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;
@@ -78,6 +75,10 @@
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 Trygve Laugstøl
* @author Matthew Pocock
@@ -85,7 +86,8 @@
* @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> javaccClasses = new CopyOnWriteArrayList<>();
- @Requirement
+ @Inject
private InProcessCompiler inProcessCompiler;
// ----------------------------------------------------------------------
diff --git a/plexus-compilers/plexus-compiler-javac/src/main/java/org/codehaus/plexus/compiler/javac/JavaxToolsCompiler.java b/plexus-compilers/plexus-compiler-javac/src/main/java/org/codehaus/plexus/compiler/javac/JavaxToolsCompiler.java
index 68cd0563..0114c8f1 100644
--- a/plexus-compilers/plexus-compiler-javac/src/main/java/org/codehaus/plexus/compiler/javac/JavaxToolsCompiler.java
+++ b/plexus-compilers/plexus-compiler-javac/src/main/java/org/codehaus/plexus/compiler/javac/JavaxToolsCompiler.java
@@ -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 David M. Lloyd
* @since 2.0
*/
-@Component( role = InProcessCompiler.class )
+@Named
public class JavaxToolsCompiler implements InProcessCompiler
{
private final Logger log = LoggerFactory.getLogger( getClass() );
diff --git a/pom.xml b/pom.xml
index 67a08bff..85b13e5f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -88,6 +88,11 @@
plexus-component-annotations
2.1.1
+
+ javax.inject
+ javax.inject
+ 1
+
org.junit
junit-bom
@@ -100,6 +105,16 @@
plexus-testing
1.1.0
+
+ org.eclipse.sisu
+ org.eclipse.sisu.plexus
+ 0.9.0.M2
+
+
+ org.eclipse.sisu
+ org.eclipse.sisu.inject
+ 0.9.0.M2
+
org.hamcrest
hamcrest
@@ -123,6 +138,9 @@
org.apache.maven.plugins
maven-compiler-plugin
${maven.compiler.version}
+
+ none
+
org.apache.maven.plugins
@@ -154,10 +172,16 @@
plexus-component-metadata
-
- generate-metadata
- merge-metadata
-
+ process-classes
+ none
+
+
+ process-test-classes
+ none
+
+
+ default
+ none
@@ -205,6 +229,21 @@
+
+ org.eclipse.sisu
+ sisu-maven-plugin
+ 0.9.0.M2
+
+
+ index-project
+
+ main-index
+ test-index
+
+
+
+
+