[maven] branch MNG-5577 updated (46b0f82 -> b0a0311)

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[maven] branch MNG-5577 updated (46b0f82 -> b0a0311)

slachiewicz
This is an automated email from the ASF dual-hosted git repository.

slachiewicz pushed a change to branch MNG-5577
in repository https://gitbox.apache.org/repos/asf/maven.git.


 discard 46b0f82  [MNG-5577] Migrate to JSR 300 Annotations - maven-embedder
     new b0a0311  [MNG-5577] Migrate to JSR 300 Annotations - maven-embedder

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (46b0f82)
            \
             N -- N -- N   refs/heads/MNG-5577 (b0a0311)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../maven/cli/configuration/SettingsXmlConfigurationProcessor.java    | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Reply | Threaded
Open this post in threaded view
|

[maven] 01/01: [MNG-5577] Migrate to JSR 300 Annotations - maven-embedder

slachiewicz
This is an automated email from the ASF dual-hosted git repository.

slachiewicz pushed a commit to branch MNG-5577
in repository https://gitbox.apache.org/repos/asf/maven.git

commit b0a03119d8da696b0e66e1a724639ff9b7ecf667
Author: Sylwester Lachiewicz <[hidden email]>
AuthorDate: Fri Jan 11 03:19:11 2019 +0100

    [MNG-5577] Migrate to JSR 300 Annotations - maven-embedder
---
 maven-embedder/pom.xml                                  |  8 --------
 .../SettingsXmlConfigurationProcessor.java              | 17 ++++++++++-------
 maven-embedder/src/site/apt/logging.apt                 | 15 +++++++++------
 3 files changed, 19 insertions(+), 21 deletions(-)

diff --git a/maven-embedder/pom.xml b/maven-embedder/pom.xml
index 33cbabc..7ec7de9 100644
--- a/maven-embedder/pom.xml
+++ b/maven-embedder/pom.xml
@@ -100,10 +100,6 @@ under the License.
       <artifactId>org.eclipse.sisu.plexus</artifactId>
     </dependency>
     <dependency>
-      <groupId>org.codehaus.plexus</groupId>
-      <artifactId>plexus-component-annotations</artifactId>
-    </dependency>
-    <dependency>
       <groupId>org.sonatype.plexus</groupId>
       <artifactId>plexus-sec-dispatcher</artifactId>
     </dependency>
@@ -175,10 +171,6 @@ under the License.
         <artifactId>sisu-maven-plugin</artifactId>
       </plugin>
       <plugin>
-        <groupId>org.codehaus.plexus</groupId>
-        <artifactId>plexus-component-metadata</artifactId>
-      </plugin>
-      <plugin>
         <groupId>org.codehaus.modello</groupId>
         <artifactId>modello-maven-plugin</artifactId>
         <configuration>
diff --git a/maven-embedder/src/main/java/org/apache/maven/cli/configuration/SettingsXmlConfigurationProcessor.java b/maven-embedder/src/main/java/org/apache/maven/cli/configuration/SettingsXmlConfigurationProcessor.java
index 2536a22..0f8b11e 100644
--- a/maven-embedder/src/main/java/org/apache/maven/cli/configuration/SettingsXmlConfigurationProcessor.java
+++ b/maven-embedder/src/main/java/org/apache/maven/cli/configuration/SettingsXmlConfigurationProcessor.java
@@ -43,14 +43,18 @@ import org.apache.maven.settings.building.SettingsBuildingRequest;
 import org.apache.maven.settings.building.SettingsBuildingResult;
 import org.apache.maven.settings.building.SettingsProblem;
 import org.apache.maven.settings.crypto.SettingsDecrypter;
-import org.codehaus.plexus.component.annotations.Component;
-import org.codehaus.plexus.component.annotations.Requirement;
 import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.inject.Inject;
+import javax.inject.Named;
+import javax.inject.Singleton;
 
 /**
  * SettingsXmlConfigurationProcessor
  */
-@Component( role = ConfigurationProcessor.class, hint = SettingsXmlConfigurationProcessor.HINT )
+@Named ( SettingsXmlConfigurationProcessor.HINT )
+@Singleton
 public class SettingsXmlConfigurationProcessor
     implements ConfigurationProcessor
 {
@@ -65,13 +69,12 @@ public class SettingsXmlConfigurationProcessor
     public static final File DEFAULT_GLOBAL_SETTINGS_FILE =
         new File( System.getProperty( "maven.conf" ), "settings.xml" );
 
-    @Requirement
-    private Logger logger;
+    private final Logger logger = LoggerFactory.getLogger( SettingsXmlConfigurationProcessor.class );
 
-    @Requirement
+    @Inject
     private SettingsBuilder settingsBuilder;
 
-    @Requirement
+    @Inject
     private SettingsDecrypter settingsDecrypter;
 
     @Override
diff --git a/maven-embedder/src/site/apt/logging.apt b/maven-embedder/src/site/apt/logging.apt
index 800857c..9bf8e3c 100644
--- a/maven-embedder/src/site/apt/logging.apt
+++ b/maven-embedder/src/site/apt/logging.apt
@@ -64,21 +64,24 @@ Maven Logging
 
 * Getting Logger Instance
 
- Plexus Logger and LoggerManager can be injected in Plexus component using Plexus annotations
+ Plexus Logger and LoggerManager can be injected into component using JSR 300 annotations
 
 +------+
 import org.codehaus.plexus.logging.Logger;
-import org.codehaus.plexus.component.annotations.Component;
-import org.codehaus.plexus.component.annotations.Requirement;
 
-@Component( role = MyComponent.class )
+import javax.inject.Inject;
+import javax.inject.Named;
+import javax.inject.Singleton;
+
+@Named
+@Singleton
 public class DefaultMyComponent
     implements MyComponent
 {
-    @Requirement
+    @Inject
     private Logger logger;
 
-    @Requirement
+    @Inject
     private LoggerManager loggerManager;
 }
 +------+