incubator-nmaven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sisb...@apache.org
Subject svn commit: r537113 - in /incubator/nmaven/branches/SI_XPT: components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/ components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/impl/ plugins/maven-compile-plugin/src/main...
Date Fri, 11 May 2007 06:23:59 GMT
Author: sisbell
Date: Thu May 10 23:23:58 2007
New Revision: 537113

URL: http://svn.apache.org/viewvc?view=rev&rev=537113
Log:
Refactored assembly resolver to accept lists of remote repos.

Modified:
    incubator/nmaven/branches/SI_XPT/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/AssemblyResolver.java
    incubator/nmaven/branches/SI_XPT/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/impl/ArtifactInstallerImpl.java
    incubator/nmaven/branches/SI_XPT/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/impl/AssemblyResolverImpl.java
    incubator/nmaven/branches/SI_XPT/plugins/maven-compile-plugin/src/main/java/org/apache/maven/dotnet/plugin/compile/ComponentInitializerMojo.java

Modified: incubator/nmaven/branches/SI_XPT/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/AssemblyResolver.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_XPT/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/AssemblyResolver.java?view=diff&rev=537113&r1=537112&r2=537113
==============================================================================
--- incubator/nmaven/branches/SI_XPT/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/AssemblyResolver.java
(original)
+++ incubator/nmaven/branches/SI_XPT/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/AssemblyResolver.java
Thu May 10 23:23:58 2007
@@ -21,6 +21,7 @@
 import org.apache.maven.project.MavenProject;
 import org.apache.maven.model.Dependency;
 import org.apache.maven.artifact.Artifact;
+import org.apache.maven.artifact.repository.ArtifactRepository;
 import org.apache.maven.artifact.resolver.ArtifactResolutionException;
 import org.apache.maven.artifact.resolver.ArtifactNotFoundException;
 
@@ -46,6 +47,7 @@
      * @param project             the maven project
      * @param sourceArtifact      the artifact to which the resolved dependencies belong
      * @param dependencies        the list of dependencies of the specified artifact
+     * @param remoteArtifactRepositories
      * @param localRepositoryPath the path of the local Maven repository
      * @param addResolvedDependenciesToProject
      *                            true, if the resolved dependencies should be added the
the specified
@@ -57,6 +59,7 @@
      * @throws ArtifactNotFoundException
      */
     void resolveTransitivelyFor( MavenProject project, Artifact sourceArtifact, List<Dependency>
dependencies,
-                                 String localRepositoryPath, boolean addResolvedDependenciesToProject
)
+                                 List<ArtifactRepository> remoteArtifactRepositories,
String localRepositoryPath,
+                                 boolean addResolvedDependenciesToProject )
         throws ArtifactResolutionException, ArtifactNotFoundException;
 }

Modified: incubator/nmaven/branches/SI_XPT/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/impl/ArtifactInstallerImpl.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_XPT/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/impl/ArtifactInstallerImpl.java?view=diff&rev=537113&r1=537112&r2=537113
==============================================================================
--- incubator/nmaven/branches/SI_XPT/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/impl/ArtifactInstallerImpl.java
(original)
+++ incubator/nmaven/branches/SI_XPT/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/impl/ArtifactInstallerImpl.java
Thu May 10 23:23:58 2007
@@ -159,7 +159,7 @@
         dependencies.addAll( repository.getDependenciesFor( matchPolicies ) );
 
         assemblyResolver.resolveTransitivelyFor( project, project.getArtifact(), dependencies,
-                                                 localRepository.getAbsolutePath(), false
);
+                                                 remoteArtifactRepositories, localRepository.getAbsolutePath(),
false );
 
         //Do Library Installs for Net Dependencies
         matchPolicies = new ArrayList<NetDependencyMatchPolicy>();

Modified: incubator/nmaven/branches/SI_XPT/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/impl/AssemblyResolverImpl.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_XPT/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/impl/AssemblyResolverImpl.java?view=diff&rev=537113&r1=537112&r2=537113
==============================================================================
--- incubator/nmaven/branches/SI_XPT/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/impl/AssemblyResolverImpl.java
(original)
+++ incubator/nmaven/branches/SI_XPT/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/impl/AssemblyResolverImpl.java
Thu May 10 23:23:58 2007
@@ -38,7 +38,6 @@
 
 import org.codehaus.plexus.logging.LogEnabled;
 import org.codehaus.plexus.logging.Logger;
-import org.codehaus.plexus.util.FileUtils;
 
 import java.util.Set;
 import java.util.HashSet;
@@ -46,7 +45,6 @@
 import java.util.ArrayList;
 
 import java.io.File;
-import java.io.IOException;
 
 /**
  * Provides a way to resolve transitive assemblies that do not have versions within their
file name.
@@ -101,12 +99,10 @@
      * @see AssemblyResolver#resolveTransitivelyFor
      */
     public void resolveTransitivelyFor( MavenProject project, Artifact sourceArtifact, List<Dependency>
dependencies,
-                                        String localRepositoryPath, boolean addResolvedDependenciesToProject
)
+                                        List<ArtifactRepository> remoteArtifactRepositories,
String localRepositoryPath,
+                                        boolean addResolvedDependenciesToProject )
         throws ArtifactResolutionException, ArtifactNotFoundException
     {
-        //ArtifactMetadataImpl meta = new ArtifactMetadataImpl( sourceArtifact, pomFile );
-        //sourceArtifact.addMetadata( meta );
-
         Set<Artifact> artifactDependencies = new HashSet<Artifact>();
         Set<Artifact> gacDependencies = new HashSet<Artifact>();
         ArtifactFilter gacFilter = new GacFilter();
@@ -132,17 +128,17 @@
                 artifactDependencies.add( artifact );
             }
         }
-        ArtifactRepository remoteArtifactRepository = new DefaultArtifactRepository( "nmaven",
-                                                                                     "http://localhost:8080/repository",
-                                                                                     new
DefaultRepositoryLayout() );
-        ArrayList remoteReps = new ArrayList();
-        remoteReps.add( remoteArtifactRepository );
+        //ArtifactRepository remoteArtifactRepository = new DefaultArtifactRepository( "nmaven",
+          //                                                                           "http://localhost:8080/repository",
+            //                                                                         new
DefaultRepositoryLayout() );
+    //    ArrayList remoteReps = new ArrayList();
+      //  remoteReps.add( remoteArtifactRepository );
 
         ArtifactRepository localArtifactRepository =
             new DefaultArtifactRepository( "local", "file://" + localRepositoryPath, new
AssemblyRepositoryLayout() );
         ArtifactResolutionResult result = resolver.resolveTransitively( artifactDependencies,
sourceArtifact,
                                                                         localArtifactRepository,
-                                                                        remoteReps,
+                                                                        remoteArtifactRepositories,
                                                                         metadata, gacFilter
);
         Set<Artifact> resolvedDependencies = result.getArtifacts();
         AssemblyRepositoryLayout layout = new AssemblyRepositoryLayout();

Modified: incubator/nmaven/branches/SI_XPT/plugins/maven-compile-plugin/src/main/java/org/apache/maven/dotnet/plugin/compile/ComponentInitializerMojo.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_XPT/plugins/maven-compile-plugin/src/main/java/org/apache/maven/dotnet/plugin/compile/ComponentInitializerMojo.java?view=diff&rev=537113&r1=537112&r2=537113
==============================================================================
--- incubator/nmaven/branches/SI_XPT/plugins/maven-compile-plugin/src/main/java/org/apache/maven/dotnet/plugin/compile/ComponentInitializerMojo.java
(original)
+++ incubator/nmaven/branches/SI_XPT/plugins/maven-compile-plugin/src/main/java/org/apache/maven/dotnet/plugin/compile/ComponentInitializerMojo.java
Thu May 10 23:23:58 2007
@@ -94,7 +94,7 @@
 
         try
         {
-            assemblyResolver.resolveTransitivelyFor( project, project.getArtifact(), project.getDependencies(),
+            assemblyResolver.resolveTransitivelyFor( project, project.getArtifact(), project.getDependencies(),
project.getRemoteArtifactRepositories(),
                                                      localRepository, true );
         }
         catch ( ArtifactResolutionException e )



Mime
View raw message