incubator-nmaven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sisb...@apache.org
Subject svn commit: r563352 - in /incubator/nmaven/trunk/components/dotnet-artifact: ./ src/main/java/org/apache/maven/dotnet/artifact/ src/main/java/org/apache/maven/dotnet/artifact/impl/ src/main/resources/META-INF/nmaven/ src/main/resources/META-INF/plexus/
Date Tue, 07 Aug 2007 00:06:17 GMT
Author: sisbell
Date: Mon Aug  6 17:06:16 2007
New Revision: 563352

URL: http://svn.apache.org/viewvc?view=rev&rev=563352
Log:
Code cleanup and expanded javadocs.

Removed:
    incubator/nmaven/trunk/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/DummyResolver.java
    incubator/nmaven/trunk/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/impl/ArtifactMetadataImpl.java
Modified:
    incubator/nmaven/trunk/components/dotnet-artifact/pom.xml
    incubator/nmaven/trunk/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/ApplicationConfig.java
    incubator/nmaven/trunk/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/ArtifactContext.java
    incubator/nmaven/trunk/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/ArtifactInstaller.java
    incubator/nmaven/trunk/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/AssemblyResolver.java
    incubator/nmaven/trunk/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/impl/ArtifactContextImpl.java
    incubator/nmaven/trunk/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/impl/ArtifactInstallerImpl.java
    incubator/nmaven/trunk/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/impl/AssemblyResolverImpl.java
    incubator/nmaven/trunk/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/impl/NetDependenciesRepositoryImpl.java
    incubator/nmaven/trunk/components/dotnet-artifact/src/main/resources/META-INF/nmaven/artifact-registry.xml
    incubator/nmaven/trunk/components/dotnet-artifact/src/main/resources/META-INF/plexus/components.xml

Modified: incubator/nmaven/trunk/components/dotnet-artifact/pom.xml
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/components/dotnet-artifact/pom.xml?view=diff&rev=563352&r1=563351&r2=563352
==============================================================================
--- incubator/nmaven/trunk/components/dotnet-artifact/pom.xml (original)
+++ incubator/nmaven/trunk/components/dotnet-artifact/pom.xml Mon Aug  6 17:06:16 2007
@@ -20,7 +20,7 @@
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
   <parent>
     <groupId>org.apache.maven.dotnet</groupId>
-    <version>0.14</version>
+    <version>0.14-SNAPSHOT</version>
     <artifactId>dotnet-components</artifactId>
   </parent>
   <modelVersion>4.0.0</modelVersion>

Modified: incubator/nmaven/trunk/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/ApplicationConfig.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/ApplicationConfig.java?view=diff&rev=563352&r1=563351&r2=563352
==============================================================================
--- incubator/nmaven/trunk/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/ApplicationConfig.java
(original)
+++ incubator/nmaven/trunk/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/ApplicationConfig.java
Mon Aug  6 17:06:16 2007
@@ -20,7 +20,6 @@
 package org.apache.maven.dotnet.artifact;
 
 import org.apache.maven.artifact.Artifact;
-import org.apache.maven.project.MavenProject;
 
 import java.io.File;
 
@@ -63,7 +62,8 @@
          * exe.config is located within the project's src/main/config directory. Neither
parameter value may be null.
          *
          * @param artifact the executable artifact to which the exe.config file is associated
-         * @param project  the maven project
+         * @param projectBaseDirectory the base directory of the build (which contains the
pom.xml file)
+         * @param projectBuildDirectory the target directory of the build
          * @return the application config for the specified artifact
          */
         public static ApplicationConfig createDefaultApplicationConfig( final Artifact artifact,

Modified: incubator/nmaven/trunk/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/ArtifactContext.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/ArtifactContext.java?view=diff&rev=563352&r1=563351&r2=563352
==============================================================================
--- incubator/nmaven/trunk/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/ArtifactContext.java
(original)
+++ incubator/nmaven/trunk/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/ArtifactContext.java
Mon Aug  6 17:06:16 2007
@@ -114,7 +114,7 @@
      * Initializes this artifact context. Neither parameter value should be null.
      *
      * @param mavenProject               the maven project
-     * @param remoteArtifactRepositories
+     * @param remoteArtifactRepositories the remote artifact repositories
      * @param localRepository            the file location of the local maven repository
      * @throws NullPointerException if localRepository parameter is null
      */

Modified: incubator/nmaven/trunk/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/ArtifactInstaller.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/ArtifactInstaller.java?view=diff&rev=563352&r1=563351&r2=563352
==============================================================================
--- incubator/nmaven/trunk/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/ArtifactInstaller.java
(original)
+++ incubator/nmaven/trunk/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/ArtifactInstaller.java
Mon Aug  6 17:06:16 2007
@@ -20,10 +20,7 @@
 
 import org.apache.maven.artifact.Artifact;
 import org.apache.maven.artifact.repository.ArtifactRepository;
-import org.apache.maven.artifact.resolver.ArtifactNotFoundException;
-import org.apache.maven.artifact.resolver.ArtifactResolutionException;
 import org.apache.maven.artifact.installer.ArtifactInstallationException;
-import org.apache.maven.project.MavenProject;
 import org.apache.maven.model.Dependency;
 
 import java.io.File;
@@ -75,10 +72,29 @@
     void installFileWithoutPom( String groupId, String artifactId, String version, String
packaging, File artifactFile )
         throws ArtifactInstallationException;
 
-    void resolveAndInstallNetDependenciesForProfile( String profile, List<Dependency>
dependencies,
+    /**
+     * Resolves and installs the .NET artifacts (as given in the net-dependencies.xml file)
and the
+     * specified .NET and java dependencies. If a profile is specified, this method will
includes dependencies
+     * with that profile.
+     *
+     * @param profile          the specified profile to resolve. This value may be null.
+     * @param netDependencies  additional .NET artifacts to resolve and install.
+     * @param javaDependencies the Java Dependencies to resolve. Typically these should be
the java bindings for the
+     *                         .NET plugins.
+     * @throws IOException if there is a problem with installation
+     */
+    void resolveAndInstallNetDependenciesForProfile( String profile, List<Dependency>
netDependencies,
                                                      List<Dependency> javaDependencies
)
         throws IOException;
 
+    /**
+     * Installs both the artifact and all of its dependencies into the private application
base.
+     *
+     * @param applicationBase the root directory of the private application base
+     * @param artifact        the artifact to install
+     * @param dependencies    the dependencies to install
+     * @throws IOException if there is a problem installing any of the artifacts into the
private application base
+     */
     void installArtifactAndDependenciesIntoPrivateApplicationBase( File applicationBase,
Artifact artifact,
                                                                    List<Dependency>
dependencies )
         throws IOException;
@@ -87,7 +103,7 @@
      * Initializes the installer.
      *
      * @param artifactContext            the artifact context associated with this installer
-     * @param remoteArtifactRepositories
+     * @param remoteArtifactRepositories the list of remote artifact repositories
      * @param localRepository            the location of the local maven repository
      */
     void init( ArtifactContext artifactContext, List<ArtifactRepository> remoteArtifactRepositories,

Modified: incubator/nmaven/trunk/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/AssemblyResolver.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/AssemblyResolver.java?view=diff&rev=563352&r1=563351&r2=563352
==============================================================================
--- incubator/nmaven/trunk/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/AssemblyResolver.java
(original)
+++ incubator/nmaven/trunk/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/AssemblyResolver.java
Mon Aug  6 17:06:16 2007
@@ -20,10 +20,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;
 
 import java.util.List;
 import java.io.File;
@@ -45,18 +42,17 @@
     /**
      * Resolves transitive dependencies for the project.
      *
-     * @param mavenProject
-     * @param dependencies        the list of dependencies of the specified artifact
-     * @param remoteArtifactRepositories
-     * @param localArtifactRepository
+     * @param mavenProject                the maven project
+     * @param dependencies                the list of dependencies of the specified artifact
+     * @param remoteArtifactRepositories  the list of remote artifact repositories to use
in resolving
+     * @param localArtifactRepository     the local artifact repository to use in resolving
      * @param addResolvedDependenciesToProject
      *                            true, if the resolved dependencies should be added the
the specified
      *                            maven project, otherwise false. This value should be set
to false if it is resolving
      *                            .NET executables that are intended to be executed as an
external process. If it is
      *                            resolving assemblies that the source artifact needs to
compile against, this value
      *                            should be set to true.
-     * @throws ArtifactResolutionException
-     * @throws ArtifactNotFoundException
+     * @throws IOException
      */
     void resolveTransitivelyFor( MavenProject mavenProject, List<Dependency> dependencies,
                                  List<ArtifactRepository> remoteArtifactRepositories,
File localArtifactRepository,

Modified: incubator/nmaven/trunk/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/impl/ArtifactContextImpl.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/impl/ArtifactContextImpl.java?view=diff&rev=563352&r1=563351&r2=563352
==============================================================================
--- incubator/nmaven/trunk/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/impl/ArtifactContextImpl.java
(original)
+++ incubator/nmaven/trunk/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/impl/ArtifactContextImpl.java
Mon Aug  6 17:06:16 2007
@@ -31,7 +31,6 @@
 import org.apache.maven.artifact.handler.manager.ArtifactHandlerManager;
 import org.apache.maven.artifact.factory.ArtifactFactory;
 import org.apache.maven.artifact.repository.ArtifactRepository;
-import org.apache.maven.artifact.metadata.ArtifactMetadataSource;
 import org.apache.maven.project.MavenProject;
 
 /**
@@ -44,11 +43,6 @@
 {
 
     /**
-     * Metadata component used by the <code>ArtifactResolver</code>.
-     */
-    private ArtifactMetadataSource metadata;
-
-    /**
      * A factory component for creating artifacts
      */
     private ArtifactFactory artifactFactory;
@@ -116,7 +110,7 @@
         if ( repository == null )
         {
             logger.warn(
-                "NMAVEN-000-009: Could not locate artifact (net dependencies repository not
found): Group ID = " +
+                "NMAVEN-000-001: Could not locate artifact (net dependencies repository not
found): Group ID = " +
                     groupId + ", Artifact ID = " + artifactId + ", Version = " + version
+ ", Type = " + type );
             return new ArrayList<Artifact>();
         }
@@ -166,7 +160,7 @@
     {
         if ( artifact == null )
         {
-            throw new ArtifactException( "NMAVEN-000-007: Cannot get .NET modules dependencies
of a null artifact" );
+            throw new ArtifactException( "NMAVEN-000-002: Cannot get .NET modules dependencies
of a null artifact" );
         }
         List<ArtifactMatchPolicy> matchPolicies = new ArrayList<ArtifactMatchPolicy>();
         matchPolicies.add( new NetModuleMatchPolicy() );
@@ -200,6 +194,12 @@
         artifactHandlerManager.addHandlers( map );
     }
 
+    /**
+     * Returns true if the artifact handler can handle the dotnet types, otherwise returns
false
+     *
+     * @param artifactHandler the artifact handler to check
+     * @return true if the artifact handler can handle the dotnet types, otherwise returns
false
+     */
     private boolean isDotNetHandler( ArtifactHandler artifactHandler )
     {
         String extension = artifactHandler.getExtension();
@@ -228,8 +228,6 @@
 
     /*
     * Matches .NET module artifacts.
-    *
-    * @author Shane Isbell
     */
     private static class NetModuleMatchPolicy
         implements ArtifactMatchPolicy

Modified: incubator/nmaven/trunk/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/impl/ArtifactInstallerImpl.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/impl/ArtifactInstallerImpl.java?view=diff&rev=563352&r1=563351&r2=563352
==============================================================================
--- incubator/nmaven/trunk/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/impl/ArtifactInstallerImpl.java
(original)
+++ incubator/nmaven/trunk/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/impl/ArtifactInstallerImpl.java
Mon Aug  6 17:06:16 2007
@@ -37,7 +37,6 @@
 import org.apache.maven.artifact.resolver.ArtifactResolver;
 import org.apache.maven.artifact.resolver.ArtifactNotFoundException;
 import org.apache.maven.artifact.resolver.ArtifactResolutionException;
-import org.apache.maven.artifact.metadata.ArtifactMetadataSource;
 import org.apache.maven.artifact.factory.ArtifactFactory;
 import org.apache.maven.artifact.installer.ArtifactInstallationException;
 import org.apache.maven.artifact.repository.ArtifactRepository;
@@ -72,11 +71,6 @@
 {
 
     /**
-     * An installer component for installing artifacts into a local Maven repository.
-     */
-    private org.apache.maven.artifact.installer.ArtifactInstaller mavenInstaller;
-
-    /**
      * Root path of the local Maven repository
      */
     private File localRepository;
@@ -88,11 +82,6 @@
     private ArtifactContext artifactContext;
 
     /**
-     * An artifact repository that handles .NET artifacts
-     */
-    private ArtifactRepository artifactRepository;
-
-    /**
      * A logger for writing log messages
      */
     private Logger logger;
@@ -104,25 +93,30 @@
     private ArtifactResolver resolver;
 
     /**
-     * Metadata component used by the <code>ArtifactResolver</code>.
-     */
-    private ArtifactMetadataSource metadata;
-
-    /**
      * The artifact factory component, which is used for creating artifacts.
      */
     private ArtifactFactory artifactFactory;
 
+    /**
+     * The assembler resolver for resolving .NET artifacts
+     */
     private AssemblyResolver assemblyResolver;
 
+    /**
+     * Registry for finding repositories of configuration information
+     */
     private RepositoryRegistry repositoryRegistry;
 
+    /**
+     * List of remote artifact repositories to use in resolving artifacts
+     */
     private List<ArtifactRepository> remoteArtifactRepositories;
 
+    /**
+     * Registry used for finding DAOs
+     */
     private org.apache.maven.dotnet.registry.DataAccessObjectRegistry daoRegistry;
 
-    private org.apache.maven.artifact.manager.WagonManager wagonManager;
-
 
     /**
      * Constructor. This method is intended to by invoked by the plexus-container, not by
the application developer.
@@ -145,6 +139,9 @@
         this.logger = logger;
     }
 
+    /**
+     * @see org.apache.maven.dotnet.artifact.ArtifactInstaller#resolveAndInstallNetDependenciesForProfile(String,
java.util.List<org.apache.maven.model.Dependency>, java.util.List<org.apache.maven.model.Dependency>)
+     */
     public void resolveAndInstallNetDependenciesForProfile( String profile, List<Dependency>
netDependencies,
                                                             List<Dependency> javaDependencies
)
         throws IOException
@@ -196,11 +193,13 @@
                 }
                 catch ( ArtifactResolutionException e )
                 {
-                    throw new IOException( e.getMessage() );
+                    throw new IOException(
+                        "NMAVEN-001-000: Problem resolving artifact for java binding: Message
= " + e.getMessage() );
                 }
                 catch ( ArtifactNotFoundException e )
                 {
-                    throw new IOException( e.getMessage() );
+                    throw new IOException(
+                        "NMAVEN-001-001: Could not find artifact for java binding: Message
=" + e.getMessage() );
                 }
             }
         }
@@ -217,11 +216,13 @@
             }
             catch ( ArtifactResolutionException e )
             {
-                throw new IOException( e.getMessage() );
+                throw new IOException(
+                    "NMAVEN-001-002: Problem resolving java dependency artifact: Message
= " + e.getMessage() );
             }
             catch ( ArtifactNotFoundException e )
             {
-                throw new IOException( e.getMessage() );
+                throw new IOException(
+                    "NMAVEN-001-003: Could not find java dependency artifact: Message = "
+ e.getMessage() );
             }
         }
 
@@ -246,6 +247,9 @@
         dao.closeConnection();
     }
 
+    /**
+     * @see org.apache.maven.dotnet.artifact.ArtifactInstaller#installArtifactAndDependenciesIntoPrivateApplicationBase(java.io.File,
org.apache.maven.artifact.Artifact, java.util.List<org.apache.maven.model.Dependency>)
+     */
     public void installArtifactAndDependenciesIntoPrivateApplicationBase( File localRepository,
Artifact artifact,
                                                                           List<Dependency>
dependencies )
         throws IOException
@@ -272,7 +276,7 @@
 
             if ( artifactDependencyFile == null || !artifactDependencyFile.exists() )
             {
-                throw new IOException( "NMAVEN-000-000: Could not find artifact dependency:
Artifact ID = " +
+                throw new IOException( "NMAVEN-001-004: Could not find artifact dependency:
Artifact ID = " +
                     artifactDependency.getArtifactId() + ", Path = " + (
                     ( artifactDependencyFile != null && !artifactDependencyFile.exists()
)
                         ? artifactDependencyFile.getAbsolutePath() : null ) );
@@ -290,7 +294,7 @@
         {
             if ( !artifactDependency.getType().startsWith( "gac" ) )
             {
-                logger.info( "NMAVEN-002-018c: Installing file into repository: File = "
+
+                logger.info( "NMAVEN-001-005: Installing file into repository: File = " +
                     artifactDependency.getFile().getAbsolutePath() );
                 FileUtils.copyFileToDirectory( artifactDependency.getFile(), installDirectory
);
             }
@@ -314,7 +318,7 @@
             }
             catch ( IOException e )
             {
-                throw new ArtifactInstallationException( "NMAVEN-002-003b: Failed to install
artifact: ID = " +
+                throw new ArtifactInstallationException( "NMAVEN-001-006: Failed to install
artifact: ID = " +
                     artifact.getId() + ", File = " +
                     ( ( artifact.getFile() != null ) ? artifact.getFile().getAbsolutePath()
: "" ), e );
             }
@@ -325,7 +329,7 @@
             if ( artifact.getFile() != null && artifact.getFile().exists() )//maybe
just a test compile and no install
             {
                 logger.info(
-                    "NMAVEN-002-018: Installing file into repository: File = " + artifact.getFile().getAbsolutePath()
);
+                    "NMAVEN-001-007: Installing file into repository: File = " + artifact.getFile().getAbsolutePath()
);
                 File artifactFile = artifact.getFile();
                 try
                 {
@@ -334,20 +338,20 @@
                 }
                 catch ( IOException e )
                 {
-                    throw new ArtifactInstallationException( "NMAVEN-002-003a: Failed to
install artifact: ID = " +
+                    throw new ArtifactInstallationException( "NMAVEN-001-008: Failed to install
artifact: ID = " +
                         artifact.getId() + ", File = " +
                         ( ( artifact.getFile() != null ) ? artifact.getFile().getAbsolutePath()
: "" ), e );
                 }
             }
             else
             {
-                logger.info( "NMAVEN-002-019: Artifact does not exist. Nothing to install:
Artifact = " +
+                logger.info( "NMAVEN-001-010: Artifact does not exist. Nothing to install:
Artifact = " +
                     artifact.getGroupId() + ":" + artifact.getArtifactId() + ":" + artifact.getVersion()
);
             }
         }
         catch ( ArtifactInstallationException e )
         {
-            throw new ArtifactInstallationException( "NMAVEN-002-003: Failed to install artifact:
ID = " +
+            throw new ArtifactInstallationException( "NMAVEN-001-011: Failed to install artifact:
ID = " +
                 artifact.getId() + ", File = " +
                 ( ( artifact.getFile() != null ) ? artifact.getFile().getAbsolutePath() :
"" ), e );
         }
@@ -371,11 +375,11 @@
             }
             catch ( XmlPullParserException e )
             {
-                throw new ArtifactInstallationException( "NMAVEN-002-013: Unable to read
pom file" );
+                throw new ArtifactInstallationException( "NMAVEN-001-012: Unable to read
pom file" );
             }
             catch ( IOException e )
             {
-                throw new ArtifactInstallationException( "NMAVEN-002-013: Unable to read
pom file" );
+                throw new ArtifactInstallationException( "NMAVEN-001-013: Unable to read
pom file" );
             }
 
             ProjectDao dao = (ProjectDao) daoRegistry.find( "dao:project" );
@@ -387,7 +391,8 @@
             }
             catch ( java.io.IOException e )
             {
-                throw new ArtifactInstallationException( e.getMessage() );
+                throw new ArtifactInstallationException(
+                    "NMAVEN-001-014: Unable to store model: Message = " + e.getMessage()
);
             }
             finally
             {
@@ -422,12 +427,16 @@
         }
         catch ( IOException e )
         {
-            throw new ArtifactInstallationException( e.getMessage() );
+            throw new ArtifactInstallationException(
+                "NMAVEN-001-015: Unable to read model: Message =" + e.getMessage() );
         }
         IOUtil.close( fileWriter );
         installArtifactWithPom( artifact, tempFile, false );
     }
 
+    /**
+     * @see org.apache.maven.dotnet.artifact.ArtifactInstaller#init(org.apache.maven.dotnet.artifact.ArtifactContext,
java.util.List<org.apache.maven.artifact.repository.ArtifactRepository>, java.io.File)
+     */
     public void init( ArtifactContext artifactContext, List<ArtifactRepository> remoteArtifactRepositories,
                       File localRepository )
     {

Modified: incubator/nmaven/trunk/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/impl/AssemblyResolverImpl.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/impl/AssemblyResolverImpl.java?view=diff&rev=563352&r1=563351&r2=563352
==============================================================================
--- incubator/nmaven/trunk/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/impl/AssemblyResolverImpl.java
(original)
+++ incubator/nmaven/trunk/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/impl/AssemblyResolverImpl.java
Mon Aug  6 17:06:16 2007
@@ -24,9 +24,7 @@
 import org.apache.maven.dotnet.dao.ProjectDependency;
 import org.apache.maven.project.MavenProject;
 import org.apache.maven.artifact.Artifact;
-import org.apache.maven.artifact.DefaultArtifact;
 import org.apache.maven.artifact.factory.ArtifactFactory;
-import org.apache.maven.artifact.resolver.ArtifactResolutionException;
 import org.apache.maven.artifact.repository.ArtifactRepository;
 import org.apache.maven.artifact.repository.ArtifactRepositoryFactory;
 import org.apache.maven.model.Dependency;
@@ -63,8 +61,14 @@
      */
     private Logger logger;
 
+    /**
+     * Registry used for finding DAOs
+     */
     private org.apache.maven.dotnet.registry.DataAccessObjectRegistry daoRegistry;
 
+    /**
+     * Manager used to download artifacts.
+     */
     private org.apache.maven.artifact.manager.WagonManager wagonManager;
 
     /**
@@ -82,75 +86,8 @@
         this.logger = logger;
     }
 
-    private Set<ProjectDependency> subtractProjectDependencies( List<Dependency>
b, Set<ProjectDependency> a )
-    {
-        Set<Dependency> d = new HashSet<Dependency>( b );
-
-        for ( Dependency dependency : b )
-        {
-            if ( containsDependency( a, dependency ) )
-            {
-                d.remove( dependency );
-            }
-        }
-        Set<ProjectDependency> projectDependencies = new HashSet<ProjectDependency>();
-        for ( Dependency dependency : d )
-        {
-            ProjectDependency projectDependency = new ProjectDependency();
-            projectDependency.setGroupId( dependency.getGroupId() );
-            projectDependency.setArtifactId( dependency.getArtifactId() );
-            projectDependency.setVersion( dependency.getVersion() );
-            projectDependencies.add( projectDependency );
-        }
-        return projectDependencies;
-    }
-
-    private Set<ProjectDependency> substractDependencies( Set<ProjectDependency>
a, List<Dependency> b )
-    {
-        Set<ProjectDependency> pd = new HashSet<ProjectDependency>( a );
-        for ( ProjectDependency projectDependency : a )
-        {
-            if ( containsProjectDependency( b, projectDependency ) )
-            {
-                pd.remove( projectDependency );
-            }
-        }
-        return pd;
-    }
-
-    private boolean containsProjectDependency( List<Dependency> dependencies, ProjectDependency
projectDependency )
-    {
-        for ( Dependency dependency : dependencies )
-        {
-            if ( isEqual( projectDependency, dependency ) )
-            {
-                return true;
-            }
-        }
-        return false;
-    }
-
-    private boolean containsDependency( Set<ProjectDependency> projectDependencies,
Dependency dependency )
-    {
-        for ( ProjectDependency projectDependency : projectDependencies )
-        {
-            if ( isEqual( projectDependency, dependency ) )
-            {
-                return true;
-            }
-        }
-        return false;
-    }
-
-    private boolean isEqual( ProjectDependency projectDependency, Dependency dependency )
-    {
-        return ( projectDependency.getArtifactId().equals( dependency.getArtifactId() ) &&
-            projectDependency.getGroupId().equals( dependency.getGroupId() ) &&
-            projectDependency.getVersion().equals( dependency.getVersion() ) );
-    }
-
     /**
-     * @see AssemblyResolver#resolveTransitivelyFor
+     * @see AssemblyResolver#resolveTransitivelyFor(org.apache.maven.project.MavenProject,
java.util.List<org.apache.maven.model.Dependency>, java.util.List<org.apache.maven.artifact.repository.ArtifactRepository>,
java.io.File, boolean)
      */
     public void resolveTransitivelyFor( MavenProject mavenProject, List<Dependency>
dependencies,
                                         List<ArtifactRepository> remoteArtifactRepositories,
@@ -181,15 +118,6 @@
             project.addProjectDependency( projectDependency );
         }
 
-        //Set<ProjectDependency> projectDependencies = project.getProjectDependencies();
-
-        /*
-                Set<ProjectDependency> pd = new HashSet<ProjectDependency>( CollectionUtils.subtract(
projectDependencies,
-                                                                                        
             substractDependencies(
-                                                                                        
                 projectDependencies,
-                                                                                        
                 dependencies ) ) );
-                pd.addAll( subtractProjectDependencies( dependencies, projectDependencies
) );
-        */
         ProjectDao dao = (ProjectDao) daoRegistry.find( "dao:project" );
         dao.init( artifactFactory, wagonManager );
         dao.openConnection();

Modified: incubator/nmaven/trunk/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/impl/NetDependenciesRepositoryImpl.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/impl/NetDependenciesRepositoryImpl.java?view=diff&rev=563352&r1=563351&r2=563352
==============================================================================
--- incubator/nmaven/trunk/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/impl/NetDependenciesRepositoryImpl.java
(original)
+++ incubator/nmaven/trunk/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/impl/NetDependenciesRepositoryImpl.java
Mon Aug  6 17:06:16 2007
@@ -83,7 +83,7 @@
         catch ( XmlPullParserException e )
         {
             e.printStackTrace();
-            throw new IOException( "NMAVEN-062-000: Could not read net-dependencies.xml"
);
+            throw new IOException( "NMAVEN-003-000: Could not read net-dependencies.xml"
);
         }
         netDependencies = model.getNetDependencies();
         String nmavenVersion = (String) properties.get( "nmaven.version" );

Modified: incubator/nmaven/trunk/components/dotnet-artifact/src/main/resources/META-INF/nmaven/artifact-registry.xml
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/components/dotnet-artifact/src/main/resources/META-INF/nmaven/artifact-registry.xml?view=diff&rev=563352&r1=563351&r2=563352
==============================================================================
--- incubator/nmaven/trunk/components/dotnet-artifact/src/main/resources/META-INF/nmaven/artifact-registry.xml
(original)
+++ incubator/nmaven/trunk/components/dotnet-artifact/src/main/resources/META-INF/nmaven/artifact-registry.xml
Mon Aug  6 17:06:16 2007
@@ -1,5 +1,4 @@
 <?xml version="1.0"?>
-
 <registry-config>
   <repositories>
     <repository>

Modified: incubator/nmaven/trunk/components/dotnet-artifact/src/main/resources/META-INF/plexus/components.xml
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/components/dotnet-artifact/src/main/resources/META-INF/plexus/components.xml?view=diff&rev=563352&r1=563351&r2=563352
==============================================================================
--- incubator/nmaven/trunk/components/dotnet-artifact/src/main/resources/META-INF/plexus/components.xml
(original)
+++ incubator/nmaven/trunk/components/dotnet-artifact/src/main/resources/META-INF/plexus/components.xml
Mon Aug  6 17:06:16 2007
@@ -103,9 +103,6 @@
       <implementation>org.apache.maven.dotnet.artifact.impl.ArtifactContextImpl</implementation>
       <requirements>
         <requirement>
-          <role>org.apache.maven.artifact.metadata.ArtifactMetadataSource</role>
-        </requirement>
-        <requirement>
           <role>org.apache.maven.artifact.factory.ArtifactFactory</role>
         </requirement>
         <requirement>
@@ -131,13 +128,7 @@
           <role>org.apache.maven.artifact.factory.ArtifactFactory</role>
         </requirement>
         <requirement>
-          <role>org.apache.maven.artifact.installer.ArtifactInstaller</role>
-        </requirement>
-        <requirement>
           <role>org.apache.maven.artifact.resolver.ArtifactResolver</role>
-        </requirement>
-        <requirement>
-          <role>org.apache.maven.artifact.metadata.ArtifactMetadataSource</role>
         </requirement>
         <requirement>
           <role>org.apache.maven.dotnet.artifact.AssemblyResolver</role>



Mime
View raw message