maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hbout...@apache.org
Subject [02/23] maven git commit: [MNG-6084] Support JSR 250 annotations
Date Mon, 25 Sep 2017 22:21:42 GMT
[MNG-6084] Support JSR 250 annotations


Project: http://git-wip-us.apache.org/repos/asf/maven/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven/commit/a7dddcb8
Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/a7dddcb8
Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/a7dddcb8

Branch: refs/heads/MNG-6196_slf4j
Commit: a7dddcb87626fec256f1b8ccbe957f94cdf401e4
Parents: 66fc74d
Author: Dan Tran <dantran@apache.org>
Authored: Sun Sep 11 21:07:39 2016 -0700
Committer: Michael Osipov <michaelo@apache.org>
Committed: Thu May 25 20:05:35 2017 +0200

----------------------------------------------------------------------
 maven-core/src/main/resources/META-INF/maven/extension.xml    | 3 +++
 maven-embedder/pom.xml                                        | 4 ++++
 .../src/main/java/org/apache/maven/cli/MavenCli.java          | 7 ++++---
 pom.xml                                                       | 5 +++++
 4 files changed, 16 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/a7dddcb8/maven-core/src/main/resources/META-INF/maven/extension.xml
----------------------------------------------------------------------
diff --git a/maven-core/src/main/resources/META-INF/maven/extension.xml b/maven-core/src/main/resources/META-INF/maven/extension.xml
index 1d24d92..1f0b95f 100644
--- a/maven-core/src/main/resources/META-INF/maven/extension.xml
+++ b/maven-core/src/main/resources/META-INF/maven/extension.xml
@@ -98,6 +98,8 @@ under the License.
     <exportedPackage>javax.enterprise.util.*</exportedPackage>
     <exportedPackage>javax.enterprise.inject.*</exportedPackage>
 
+    <!-- javax.annotation (JSR-250) -->
+    <exportedPackage>javax.annotation.*</exportedPackage>
 
     <!-- 
       | We may potentially want to export these, but right now I'm not sure that anything
Guice specific needs
@@ -157,6 +159,7 @@ under the License.
     <exportedArtifact>org.apache.maven.resolver:maven-resolver-impl</exportedArtifact>
 
     <exportedArtifact>javax.inject:javax.inject</exportedArtifact>
+    <exportedArtifact>javax.annotation:jsr250-api</exportedArtifact>
     <exportedArtifact>org.slf4j:slf4j-api</exportedArtifact>
     <exportedArtifact>org.fusesource.jansi:jansi</exportedArtifact>
 

http://git-wip-us.apache.org/repos/asf/maven/blob/a7dddcb8/maven-embedder/pom.xml
----------------------------------------------------------------------
diff --git a/maven-embedder/pom.xml b/maven-embedder/pom.xml
index 52e9c82..7bd2650 100644
--- a/maven-embedder/pom.xml
+++ b/maven-embedder/pom.xml
@@ -88,6 +88,10 @@ under the License.
       <artifactId>javax.inject</artifactId>
     </dependency>
     <dependency>
+      <groupId>javax.annotation</groupId>
+      <artifactId>jsr250-api</artifactId>
+    </dependency>
+    <dependency>
       <groupId>org.codehaus.plexus</groupId>
       <artifactId>plexus-utils</artifactId>
     </dependency>

http://git-wip-us.apache.org/repos/asf/maven/blob/a7dddcb8/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java
----------------------------------------------------------------------
diff --git a/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java b/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java
index e1e58c8..641a2a9 100644
--- a/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java
+++ b/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java
@@ -601,9 +601,9 @@ public class MavenCli
 
         ClassRealm containerRealm = setupContainerRealm( cliRequest.classWorld, coreRealm,
extClassPath, extensions );
 
-        ContainerConfiguration cc = new DefaultContainerConfiguration().setClassWorld( cliRequest.classWorld
).setRealm(
-            containerRealm ).setClassPathScanning( PlexusConstants.SCANNING_INDEX ).setAutoWiring(
true ).setName(
-            "maven" );
+        ContainerConfiguration cc = new DefaultContainerConfiguration().setClassWorld( cliRequest.classWorld
)
+            .setRealm( containerRealm ).setClassPathScanning( PlexusConstants.SCANNING_INDEX
).setAutoWiring( true )
+            .setJSR250Lifecycle( true ).setName( "maven" );
 
         Set<String> exportedArtifacts = new HashSet<>( coreEntry.getExportedArtifacts()
);
         Set<String> exportedPackages = new HashSet<>( coreEntry.getExportedPackages()
);
@@ -697,6 +697,7 @@ public class MavenCli
                 .setRealm( containerRealm ) //
                 .setClassPathScanning( PlexusConstants.SCANNING_INDEX ) //
                 .setAutoWiring( true ) //
+                .setJSR250Lifecycle( true ) //
                 .setName( "maven" );
 
             DefaultPlexusContainer container = new DefaultPlexusContainer( cc, new AbstractModule()

http://git-wip-us.apache.org/repos/asf/maven/blob/a7dddcb8/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 5e12e36..d6f165c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -259,6 +259,11 @@ under the License.
         <version>1</version>
       </dependency>
       <dependency>
+        <groupId>javax.annotation</groupId>
+        <artifactId>jsr250-api</artifactId>
+        <version>1.0</version>
+      </dependency>
+      <dependency>
         <groupId>org.codehaus.plexus</groupId>
         <artifactId>plexus-component-annotations</artifactId>
         <version>${plexusVersion}</version>


Mime
View raw message