geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdil...@apache.org
Subject svn commit: r433784 - in /geronimo/trunk/m2-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/plugin/car: AbstractCarMojo.java InstallConfigMojo.java
Date Tue, 22 Aug 2006 22:40:53 GMT
Author: jdillon
Date: Tue Aug 22 15:40:52 2006
New Revision: 433784

URL: http://svn.apache.org/viewvc?rev=433784&view=rev
Log:
Need to use a different field name for the Geronimo repository artifactResolver in InstallConfigMojo
to prevent Plexus to freak out when injecting components
Pending a petter solution to inject the common bits needed to super-class helper methods

Modified:
    geronimo/trunk/m2-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/plugin/car/AbstractCarMojo.java
    geronimo/trunk/m2-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/plugin/car/InstallConfigMojo.java

Modified: geronimo/trunk/m2-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/plugin/car/AbstractCarMojo.java
URL: http://svn.apache.org/viewvc/geronimo/trunk/m2-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/plugin/car/AbstractCarMojo.java?rev=433784&r1=433783&r2=433784&view=diff
==============================================================================
--- geronimo/trunk/m2-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/plugin/car/AbstractCarMojo.java
(original)
+++ geronimo/trunk/m2-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/plugin/car/AbstractCarMojo.java
Tue Aug 22 15:40:52 2006
@@ -118,6 +118,10 @@
         return artifactRepository;
     }
 
+    //
+    // Access to Project artifacts
+    //
+
     protected Set getProjectArtifacts(final MavenProject project) {
         Set artifacts = new HashSet();
 

Modified: geronimo/trunk/m2-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/plugin/car/InstallConfigMojo.java
URL: http://svn.apache.org/viewvc/geronimo/trunk/m2-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/plugin/car/InstallConfigMojo.java?rev=433784&r1=433783&r2=433784&view=diff
==============================================================================
--- geronimo/trunk/m2-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/plugin/car/InstallConfigMojo.java
(original)
+++ geronimo/trunk/m2-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/plugin/car/InstallConfigMojo.java
Tue Aug 22 15:40:52 2006
@@ -96,12 +96,21 @@
      */
     private File explicitResolutionProperties = null;
 
-    private ArtifactResolver artifactResolver;
+    /**
+     * The Geronimo repository artifact resolver.
+     *
+     * <p>
+     * Using a custom name here to prevent problems that happen when Plexus
+     * injects the Maven resolver into the base-class.
+     */
+    private ArtifactResolver geronimoArtifactResolver;
 
     private WritableListableRepository targetRepo;
+
     private RepositoryConfigurationStore targetStore;
 
     private WritableListableRepository sourceRepo;
+
     private RepositoryConfigurationStore sourceStore;
 
     protected void doExecute() throws Exception {
@@ -120,7 +129,7 @@
 
         Artifact configId;
         ArtifactManager artifactManager = new DefaultArtifactManager();
-        artifactResolver = new ExplicitDefaultArtifactResolver(
+        geronimoArtifactResolver = new ExplicitDefaultArtifactResolver(
             explicitResolutionProperties.getPath(),
             artifactManager,
             Collections.singleton(sourceRepo),
@@ -151,7 +160,7 @@
         Set dependenciesSet = new HashSet();
 
         if (project.getArtifact() != null && project.getArtifact().getFile() != null)
{
-            dependenciesSet.add( project.getArtifact() );
+            dependenciesSet.add(project.getArtifact());
         }
 
         Set projectArtifacts = project.getArtifacts();
@@ -233,7 +242,7 @@
             dependencies = sourceRepo.getDependencies(configArtifact);
         }
         
-        dependencies = artifactResolver.resolveInClassLoader(dependencies);
+        dependencies = geronimoArtifactResolver.resolveInClassLoader(dependencies);
         for (Iterator iterator = dependencies.iterator(); iterator.hasNext();) {
             Artifact a = (Artifact)iterator.next();
             execute(a);



Mime
View raw message