incubator-nmaven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sisb...@apache.org
Subject svn commit: r560497 - in /incubator/nmaven/trunk: assemblies/NMaven.Model/Pom/ components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/ components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/impl/ components/dotnet-...
Date Sat, 28 Jul 2007 04:58:36 GMT
Author: sisbell
Date: Fri Jul 27 21:58:34 2007
New Revision: 560497

URL: http://svn.apache.org/viewvc?view=rev&rev=560497
Log:
NUmerous bug fixes around classifiers and resolving.

Modified:
    incubator/nmaven/trunk/assemblies/NMaven.Model/Pom/pom.xml
    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/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/test/java/org/apache/maven/dotnet/artifact/impl/ArtifactInstallerImplTest.java
    incubator/nmaven/trunk/components/dotnet-core/src/main/java/org/apache/maven/dotnet/PathUtil.java
    incubator/nmaven/trunk/components/dotnet-core/src/main/resources/META-INF/nmaven/net-dependencies.xml
    incubator/nmaven/trunk/components/dotnet-dao/project/src/main/java/org/apache/maven/dotnet/dao/ProjectFactory.java
    incubator/nmaven/trunk/components/dotnet-dao/project/src/main/java/org/apache/maven/dotnet/dao/impl/ProjectDaoImpl.java
    incubator/nmaven/trunk/components/dotnet-repository/src/main/java/org/apache/maven/dotnet/repository/impl/RepositoryConverterImpl.java
    incubator/nmaven/trunk/misc/dotnet-repository-builder/pom.xml
    incubator/nmaven/trunk/plugins/maven-compile-plugin/src/main/java/org/apache/maven/dotnet/plugin/compile/ComponentInitializerMojo.java
    incubator/nmaven/trunk/plugins/maven-embedder-plugin/src/main/java/org/apache/maven/dotnet/plugin/embedder/EmbedderStarterMojo.java
    incubator/nmaven/trunk/plugins/maven-fxcop-plugin/src/main/java/org/apache/maven/dotnet/plugin/fxcop/FxCopAggregateMojo.java
    incubator/nmaven/trunk/plugins/maven-fxcop-plugin/src/main/java/org/apache/maven/dotnet/plugin/fxcop/FxCopMojo.java
    incubator/nmaven/trunk/plugins/maven-install-plugin/src/main/java/org/apache/maven/dotnet/plugin/install/InstallerMojo.java
    incubator/nmaven/trunk/plugins/maven-repository-plugin/src/main/java/org/apache/maven/dotnet/plugin/repository/RepositoryAssemblerMojo.java
    incubator/nmaven/trunk/plugins/maven-resolver-plugin/src/main/java/org/apache/maven/dotnet/plugin/resolver/NetDependencyResolverMojo.java
    incubator/nmaven/trunk/plugins/maven-test-plugin/src/main/java/org/apache/maven/dotnet/plugin/test/TesterMojo.java
    incubator/nmaven/trunk/plugins/maven-vsinstaller-plugin/src/main/java/org/apache/maven/dotnet/plugin/vsinstaller/VsInstallerMojo.java

Modified: incubator/nmaven/trunk/assemblies/NMaven.Model/Pom/pom.xml
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/assemblies/NMaven.Model/Pom/pom.xml?view=diff&rev=560497&r1=560496&r2=560497
==============================================================================
--- incubator/nmaven/trunk/assemblies/NMaven.Model/Pom/pom.xml (original)
+++ incubator/nmaven/trunk/assemblies/NMaven.Model/Pom/pom.xml Fri Jul 27 21:58:34 2007
@@ -63,4 +63,22 @@
       </plugin>
     </plugins>
   </build>
+  <repositories>
+    <repository>
+      <id>test.repo</id>
+      <url>file://C:\tmp\remote-test-repo</url>
+    </repository>
+  </repositories>
+ <distributionManagement>
+ <snapshotRepository>
+   <name>Apache Development Snapshot Repository</name>
+   <id>maven1</id>
+   <url>file://C:\tmp\remote-test-repo</url>
+ </snapshotRepository>
+ <repository>
+   <id>nmaven1</id>
+   <name>Apache Development Snapshot Repository</name>
+   <url>file://C:\tmp\remote-test-repo</url>
+ </repository>
+</distributionManagement>
 </project>

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=560497&r1=560496&r2=560497
==============================================================================
--- 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 Fri Jul 27 21:58:34 2007
@@ -27,6 +27,7 @@
 import org.apache.maven.model.Dependency;
 
 import java.io.File;
+import java.io.IOException;
 import java.util.List;
 
 /**
@@ -75,11 +76,11 @@
         throws ArtifactInstallationException;
 
     void resolveAndInstallNetDependenciesForProfile( String profile, List<Dependency> dependencies )
-        throws ArtifactResolutionException, ArtifactNotFoundException, ArtifactInstallationException;
+        throws IOException;
 
     void installArtifactAndDependenciesIntoPrivateApplicationBase( File applicationBase, Artifact artifact,
                                                                    List<Dependency> dependencies )
-        throws ArtifactInstallationException;
+        throws IOException;
 
     /**
      * Initializes the installer.

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=560497&r1=560496&r2=560497
==============================================================================
--- 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 Fri Jul 27 21:58:34 2007
@@ -27,6 +27,7 @@
 
 import java.util.List;
 import java.io.File;
+import java.io.IOException;
 
 /**
  * Provides services for resolving .NET assembly artifacts.
@@ -60,5 +61,5 @@
     void resolveTransitivelyFor( MavenProject mavenProject, List<Dependency> dependencies,
                                  List<ArtifactRepository> remoteArtifactRepositories, File localArtifactRepository,
                                  boolean addResolvedDependenciesToProject )
-        throws ArtifactResolutionException, ArtifactNotFoundException;
+        throws IOException;
 }

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=560497&r1=560496&r2=560497
==============================================================================
--- 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 Fri Jul 27 21:58:34 2007
@@ -28,6 +28,9 @@
 import org.apache.maven.dotnet.registry.RepositoryRegistry;
 import org.apache.maven.dotnet.model.netdependency.NetDependency;
 import org.apache.maven.dotnet.dao.ProjectDao;
+import org.apache.maven.dotnet.dao.Project;
+import org.apache.maven.dotnet.dao.ProjectFactory;
+import org.apache.maven.dotnet.dao.ProjectDependency;
 import org.apache.maven.project.MavenProject;
 import org.apache.maven.artifact.Artifact;
 import org.apache.maven.artifact.versioning.VersionRange;
@@ -143,7 +146,7 @@
     }
 
     public void resolveAndInstallNetDependenciesForProfile( String profile, List<Dependency> dependencies )
-        throws ArtifactResolutionException, ArtifactNotFoundException, ArtifactInstallationException
+        throws IOException
     {
         if ( dependencies == null )
         {
@@ -186,19 +189,39 @@
                 }
                 catch ( ArtifactResolutionException e )
                 {
-                    throw new ArtifactNotFoundException( "", sourceArtifact );
+                    throw new IOException( e.getMessage() );
+                }
+                catch ( ArtifactNotFoundException e )
+                {
+                    throw new IOException( e.getMessage() );
                 }
             }
         }
 
-        installArtifactAndDependenciesIntoPrivateApplicationBase( new File( localRepository.getParentFile(), "pab" ),
-                                                                  null,
-                                                                  repository.getDependenciesFor( matchPolicies ) );
+        ProjectDao dao = (ProjectDao) daoRegistry.find( "dao:project" );
+        dao.openConnection();
+        for ( Dependency dependency : repository.getDependenciesFor( matchPolicies ) )
+        {
+            Project project = dao.getProjectFor( dependency.getGroupId(), dependency.getArtifactId(),
+                                                 dependency.getVersion(), dependency.getType(),
+                                                 dependency.getClassifier() );
+
+            Artifact sourceArtifact = ProjectFactory.createArtifactFrom( project, artifactFactory, localRepository );
+
+            List<Dependency> sourceArtifactDependencies = new ArrayList<Dependency>();
+            for ( ProjectDependency projectDependency : project.getProjectDependencies() )
+            {
+                sourceArtifactDependencies.add( ProjectFactory.createDependencyFrom( projectDependency ) );
+            }
+            installArtifactAndDependenciesIntoPrivateApplicationBase( localRepository, sourceArtifact,
+                                                                      sourceArtifactDependencies );
+        }
+        dao.closeConnection();
     }
 
-    public void installArtifactAndDependenciesIntoPrivateApplicationBase( File applicationBase, Artifact artifact,
+    public void installArtifactAndDependenciesIntoPrivateApplicationBase( File localRepository, Artifact artifact,
                                                                           List<Dependency> dependencies )
-        throws ArtifactInstallationException
+        throws IOException
     {
 
         Set<Artifact> artifactDependencies = new HashSet<Artifact>();
@@ -212,7 +235,22 @@
                                                                                     dependency.getType(),
                                                                                     dependency.getClassifier(), scope,
                                                                                     null );
-            artifactDependency.setFile( PathUtil.getUserAssemblyCacheFileFor( artifactDependency, localRepository ) );
+
+            File artifactDependencyFile = PathUtil.getUserAssemblyCacheFileFor( artifactDependency, localRepository );
+            if ( artifactDependencyFile == null || !artifactDependencyFile.exists() )
+            {
+                artifactDependencyFile = PathUtil.getGlobalAssemblyCacheFileFor( artifactDependency, new File(
+                    System.getProperty( "SystemDrive" ), "\\Windows\\assembly" ) );
+            }
+
+            if ( artifactDependencyFile == null || !artifactDependencyFile.exists() )
+            {
+                throw new IOException( "NMAVEN-000-000: Could not find artifact dependency: Artifact ID = " +
+                    artifactDependency.getArtifactId() + ", Path = " + (
+                    ( artifactDependencyFile != null && !artifactDependencyFile.exists() )
+                        ? artifactDependencyFile.getAbsolutePath() : null ) );
+            }
+            artifactDependency.setFile( artifactDependencyFile );
             artifactDependencies.add( artifactDependency );
         }
 
@@ -220,32 +258,14 @@
         {
             artifactDependencies.add( artifact );
         }
-
+        File installDirectory = PathUtil.getPrivateApplicationBaseFileFor( artifact, localRepository ).getParentFile();
         for ( Artifact artifactDependency : artifactDependencies )
         {
             if ( !artifactDependency.getType().startsWith( "gac" ) )
             {
-                try
-                {
-                    logger.info( "NMAVEN-002-018: Installing file into repository: File = " +
-                        artifactDependency.getFile().getAbsolutePath() );
-                    try
-                    {
-                        FileUtils.copyFileToDirectory( artifactDependency.getFile(), applicationBase );
-                    }
-                    catch ( IOException e )
-                    {
-                        throw new ArtifactInstallationException( "NMAVEN-002-003a: Failed to install artifact: ID = " +
-                            artifactDependency.getId() + ", File = " + ( ( artifactDependency.getFile() != null )
-                            ? artifactDependency.getFile().getAbsolutePath() : "" ), e );
-                    }
-                }
-                catch ( ArtifactInstallationException e )
-                {
-                    throw new ArtifactInstallationException( "NMAVEN-002-003: Failed to install artifact: ID = " +
-                        artifactDependency.getId() + ", File = " + ( ( artifactDependency.getFile() != null )
-                        ? artifactDependency.getFile().getAbsolutePath() : "" ), e );
-                }
+                logger.info( "NMAVEN-002-018c: Installing file into repository: File = " +
+                    artifactDependency.getFile().getAbsolutePath() );
+                FileUtils.copyFileToDirectory( artifactDependency.getFile(), installDirectory );
             }
         }
     }

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=560497&r1=560496&r2=560497
==============================================================================
--- 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 Fri Jul 27 21:58:34 2007
@@ -24,9 +24,9 @@
 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.resolver.ArtifactNotFoundException;
 import org.apache.maven.artifact.repository.ArtifactRepository;
 import org.apache.maven.artifact.repository.ArtifactRepositoryFactory;
 import org.apache.maven.model.Dependency;
@@ -38,6 +38,7 @@
 import java.util.HashSet;
 import java.util.List;
 import java.io.File;
+import java.io.IOException;
 
 /**
  * Provides a way to resolve transitive assemblies that do not have versions within their file name.
@@ -154,7 +155,7 @@
     public void resolveTransitivelyFor( MavenProject mavenProject, List<Dependency> dependencies,
                                         List<ArtifactRepository> remoteArtifactRepositories,
                                         File localArtifactRepository, boolean addResolvedDependenciesToProject )
-        throws ArtifactResolutionException, ArtifactNotFoundException
+        throws IOException
     {
         //Check that the list of dependencies matches the first level RDF Repo
         //If not, resolve missing dependencies and add to repo or delete additional dependencies from repo
@@ -199,10 +200,6 @@
         {
             artifactDependencies =
                 dao.storeProjectAndResolveDependencies( project, localArtifactRepository, remoteArtifactRepositories );
-        }
-        catch ( java.io.IOException e )
-        {
-            throw new ArtifactResolutionException(e.getMessage(), null);
         }
         finally
         {

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=560497&r1=560496&r2=560497
==============================================================================
--- 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 Fri Jul 27 21:58:34 2007
@@ -229,6 +229,7 @@
         dependency.setType( netDependency.getType() );
         dependency.setScope( Artifact.SCOPE_RUNTIME );
         dependency.setVersion( netDependency.getVersion() );
+        dependency.setClassifier( netDependency.getPublicKeyToken() );
         return dependency;
     }
 
@@ -244,6 +245,7 @@
     {
         return artifactFactory.createDependencyArtifact( dependency.getGroupId(), dependency.getArtifactId(),
                                                          VersionRange.createFromVersion( dependency.getVersion() ),
-                                                         dependency.getType(), null, Artifact.SCOPE_RUNTIME, null );
+                                                         dependency.getType(), dependency.getPublicKeyToken(),
+                                                         Artifact.SCOPE_RUNTIME, null );
     }
 }

Modified: incubator/nmaven/trunk/components/dotnet-artifact/src/test/java/org/apache/maven/dotnet/artifact/impl/ArtifactInstallerImplTest.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/components/dotnet-artifact/src/test/java/org/apache/maven/dotnet/artifact/impl/ArtifactInstallerImplTest.java?view=diff&rev=560497&r1=560496&r2=560497
==============================================================================
--- incubator/nmaven/trunk/components/dotnet-artifact/src/test/java/org/apache/maven/dotnet/artifact/impl/ArtifactInstallerImplTest.java (original)
+++ incubator/nmaven/trunk/components/dotnet-artifact/src/test/java/org/apache/maven/dotnet/artifact/impl/ArtifactInstallerImplTest.java Fri Jul 27 21:58:34 2007
@@ -9,7 +9,6 @@
 import org.apache.maven.artifact.repository.ArtifactRepository;
 import org.apache.maven.artifact.factory.ArtifactFactory;
 import org.apache.maven.artifact.Artifact;
-import org.apache.maven.artifact.installer.ArtifactInstallationException;
 import org.apache.maven.model.Dependency;
 
 public class ArtifactInstallerImplTest
@@ -36,16 +35,17 @@
         dependencies.add( dependency );
         try
         {
-            artifactInstaller.installArtifactAndDependenciesIntoPrivateApplicationBase(
-                new File( testRepo.getParentFile(), "pab" ), artifact, dependencies );
+            artifactInstaller.installArtifactAndDependenciesIntoPrivateApplicationBase( testRepo, artifact,
+                                                                                        dependencies );
         }
-        catch ( ArtifactInstallationException e )
+        catch ( java.io.IOException e )
         {
-            e.printStackTrace();
-            fail("Unable to install artifact");
+            fail(e.getMessage());
         }
 
-        assertTrue("Could not find main artifact", new File("target/test-repo/pab/NMaven.Model.Pom.dll").exists());
-        assertTrue("Could not find dependent artifact", new File("target/test-repo/pab/NMaven.Test.dll").exists());
+        assertTrue( "Could not find main artifact", new File(
+            "target/test-repo/pab/gac_msil/NMaven.Model.Pom/1.0__NMaven.Model/NMaven.Model.Pom.dll" ).exists() );
+        assertTrue( "Could not find dependent artifact", new File(
+            "target/test-repo/pab/gac_msil/NMaven.Model.Pom/1.0__NMaven.Model/NMaven.Test.dll" ).exists() );
     }
 }

Modified: incubator/nmaven/trunk/components/dotnet-core/src/main/java/org/apache/maven/dotnet/PathUtil.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/components/dotnet-core/src/main/java/org/apache/maven/dotnet/PathUtil.java?view=diff&rev=560497&r1=560496&r2=560497
==============================================================================
--- incubator/nmaven/trunk/components/dotnet-core/src/main/java/org/apache/maven/dotnet/PathUtil.java (original)
+++ incubator/nmaven/trunk/components/dotnet-core/src/main/java/org/apache/maven/dotnet/PathUtil.java Fri Jul 27 21:58:34 2007
@@ -4,20 +4,72 @@
 import org.apache.maven.dotnet.ArtifactType;
 
 import java.io.File;
+import java.util.logging.Logger;
 
 public class PathUtil
 {
-    public static File getPrivateApplicationBaseFileFor( Artifact artifact, File localRepository )
+    private static Logger logger = Logger.getAnonymousLogger();
+
+    public static synchronized File getGlobalAssemblyCacheFileFor( Artifact artifact, File gacRepository )
     {
+        if ( artifact == null )
+        {
+            logger.warning( "NMAVEN-000-000: Artifact is null - Cannot get application file." );
+            return null;
+        }
+        if ( gacRepository == null )
+        {
+            logger.warning( "NMAVEN-000-000: GAC Repository is null - Cannot get application file." );
+            return null;
+        }
+        if ( artifact.getClassifier() == null )
+        {
+            logger.warning( "NMAVEN-000-000: Assembly must be signed - Cannot get application file." );
+        }
+        String version = artifact.getVersion();
+        int count = version.split( "[.]" ).length;
+        for ( int i = 0; i < 4 - count; i++ )
+        {
+            version = version + ".0";
+        }
+        return new File( gacRepository, "\\gac_msil\\" + artifact.getArtifactId() + "\\" + version + "__" +
+            artifact.getClassifier() + "\\" + artifact.getArtifactId() + "." +
+            ArtifactType.getArtifactTypeForPackagingName( artifact.getType() ).getExtension() );
+    }
+
+    public static synchronized File getPrivateApplicationBaseFileFor( Artifact artifact, File localRepository )
+    {
+        if ( artifact == null )
+        {
+            logger.warning( "NMAVEN-000-000: Artifact is null - Cannot get application file." );
+            return null;
+        }
+        if ( localRepository == null )
+        {
+            logger.warning( "NMAVEN-000-000: Local Repository is null - Cannot get application file." );
+            return null;
+        }
         return new File( localRepository.getParentFile(), "pab\\gac_msil\\" + artifact.getArtifactId() + "\\" +
             artifact.getVersion() + "__" + artifact.getGroupId() + "\\" + artifact.getArtifactId() + "." +
             ArtifactType.getArtifactTypeForPackagingName( artifact.getType() ).getExtension() );
     }
 
-    public static File getUserAssemblyCacheFileFor( Artifact artifact, File localRepository )
+    public static synchronized File getUserAssemblyCacheFileFor( Artifact artifact, File localRepository )
     {
+        if ( artifact == null )
+        {
+            logger.warning( "NMAVEN-000-000: Artifact is null - Cannot get application file." );
+            return null;
+        }
+        if ( localRepository == null )
+        {
+            logger.warning( "NMAVEN-000-000: Local Repository is null - Cannot get application file." );
+            return null;
+        }
         return new File( localRepository.getParentFile(), "uac\\gac_msil\\" + artifact.getArtifactId() + "\\" +
             artifact.getVersion() + "__" + artifact.getGroupId() + "\\" + artifact.getArtifactId() + "." +
             ArtifactType.getArtifactTypeForPackagingName( artifact.getType() ).getExtension() );
     }
+
+
 }

Modified: incubator/nmaven/trunk/components/dotnet-core/src/main/resources/META-INF/nmaven/net-dependencies.xml
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/components/dotnet-core/src/main/resources/META-INF/nmaven/net-dependencies.xml?view=diff&rev=560497&r1=560496&r2=560497
==============================================================================
--- incubator/nmaven/trunk/components/dotnet-core/src/main/resources/META-INF/nmaven/net-dependencies.xml (original)
+++ incubator/nmaven/trunk/components/dotnet-core/src/main/resources/META-INF/nmaven/net-dependencies.xml Fri Jul 27 21:58:34 2007
@@ -45,13 +45,15 @@
     <groupId>NMaven.Plugin</groupId>
     <artifactId>NMaven.Plugin</artifactId>
     <type>library</type>
-    <isGacInstall>true</isGacInstall>    
+    <isGacInstall>true</isGacInstall>
+    <publicKeyToken>4b435f4d76e2f0e6</publicKeyToken>
   </netDependency>
   <netDependency>
     <groupId>NMaven.Model</groupId>
     <artifactId>NMaven.Model.Pom</artifactId>
     <type>library</type>
     <isGacInstall>true</isGacInstall>
+    <publicKeyToken>4b435f4d76e2f0e6</publicKeyToken>
   </netDependency>
   <netDependency>
     <groupId>NMaven.Plugin</groupId>

Modified: incubator/nmaven/trunk/components/dotnet-dao/project/src/main/java/org/apache/maven/dotnet/dao/ProjectFactory.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/components/dotnet-dao/project/src/main/java/org/apache/maven/dotnet/dao/ProjectFactory.java?view=diff&rev=560497&r1=560496&r2=560497
==============================================================================
--- incubator/nmaven/trunk/components/dotnet-dao/project/src/main/java/org/apache/maven/dotnet/dao/ProjectFactory.java (original)
+++ incubator/nmaven/trunk/components/dotnet-dao/project/src/main/java/org/apache/maven/dotnet/dao/ProjectFactory.java Fri Jul 27 21:58:34 2007
@@ -97,6 +97,17 @@
         return projectDependency;
     }
 
+    public static Dependency createDependencyFrom(ProjectDependency projectDependency)
+    {
+        Dependency dependency = new Dependency();
+        dependency.setGroupId( projectDependency.getGroupId());
+        dependency.setArtifactId( projectDependency.getArtifactId());
+        dependency.setVersion( projectDependency.getVersion());
+        dependency.setType( projectDependency.getArtifactType());
+        dependency.setClassifier( projectDependency.getPublicKeyTokenId());
+        return dependency;
+    }
+
     public static Artifact createArtifactFrom( Project project, ArtifactFactory artifactFactory, File localRepository )
     {
         Artifact assembly = artifactFactory.createArtifact( project.getGroupId(), project.getArtifactId(),

Modified: incubator/nmaven/trunk/components/dotnet-dao/project/src/main/java/org/apache/maven/dotnet/dao/impl/ProjectDaoImpl.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/components/dotnet-dao/project/src/main/java/org/apache/maven/dotnet/dao/impl/ProjectDaoImpl.java?view=diff&rev=560497&r1=560496&r2=560497
==============================================================================
--- incubator/nmaven/trunk/components/dotnet-dao/project/src/main/java/org/apache/maven/dotnet/dao/impl/ProjectDaoImpl.java (original)
+++ incubator/nmaven/trunk/components/dotnet-dao/project/src/main/java/org/apache/maven/dotnet/dao/impl/ProjectDaoImpl.java Fri Jul 27 21:58:34 2007
@@ -46,6 +46,7 @@
 import java.io.File;
 import java.io.IOException;
 import java.io.FileReader;
+import java.io.EOFException;
 import java.net.URISyntaxException;
 
 public final class ProjectDaoImpl
@@ -89,6 +90,7 @@
         projectUris.add( ProjectUri.ARTIFACT_TYPE );
         projectUris.add( ProjectUri.IS_RESOLVED );
         projectUris.add( ProjectUri.DEPENDENCY );
+        projectUris.add( ProjectUri.CLASSIFIER );
 
         dependencyQuery = "SELECT * FROM " + this.constructQueryFragmentFor( "{x}", projectUris );
 
@@ -124,9 +126,7 @@
                 String artifactId = set.getBinding( ProjectUri.ARTIFACT_ID.getObjectBinding() ).getValue().toString();
                 String artifactType =
                     set.getBinding( ProjectUri.ARTIFACT_TYPE.getObjectBinding() ).getValue().toString();
-                Project project = getProjectFor( groupId, artifactId, version, artifactType, null );
-
-                System.out.println( "A: " + project.getArtifactId() + ":" + project.getProjectDependencies().size() );
+                // Project project = getProjectFor( groupId, artifactId, version, artifactType, null );
                 /*
                 for ( Iterator<Binding> i = set.iterator(); i.hasNext(); )
                 {
@@ -194,6 +194,7 @@
         {
             try
             {
+                repositoryConnection.commit();
                 repositoryConnection.close();
             }
             catch ( RepositoryException e )
@@ -234,6 +235,12 @@
                 tupleQuery.setBinding( ProjectUri.ARTIFACT_TYPE.getObjectBinding(),
                                        valueFactory.createLiteral( artifactType ) );
             }
+            if ( publicKeyTokenId != null )
+            {
+                tupleQuery.setBinding( ProjectUri.CLASSIFIER.getObjectBinding(),
+                                       valueFactory.createLiteral( publicKeyTokenId ) );
+                project.setPublicKeyTokenId( publicKeyTokenId.replace( ":", "" ) );
+            }
 
             result = tupleQuery.evaluate();
 
@@ -260,8 +267,6 @@
             while ( result.hasNext() )
             {
                 BindingSet set = result.next();
-                System.out.println( "BBB: " + project.getArtifactId() + ":" +
-                    set.getBinding( ProjectUri.IS_RESOLVED.getObjectBinding() ).getValue().toString() );
                 /*
                 for ( Iterator<Binding> i = set.iterator(); i.hasNext(); )
                 {
@@ -461,7 +466,9 @@
                     Artifact pomArtifact = artifactFactory.createProjectArtifact( projectDependency.getGroupId(),
                                                                                   projectDependency.getArtifactId(),
                                                                                   projectDependency.getVersion() );
-                    File tmpFile = File.createTempFile( "pomFile", "pom.xml" );
+                    //File tmpFile = File.createTempFile( "pomFile", "pom.xml" );
+                    // tmpFile.deleteOnExit();
+                    File tmpFile = new File( localRepository, "pom-." + System.currentTimeMillis() + ".xml" );
                     tmpFile.deleteOnExit();
                     pomArtifact.setFile( tmpFile );
 
@@ -518,14 +525,25 @@
                     }
                     catch ( XmlPullParserException e )
                     {
-                        throw new IOException( "NMAVEN-000-000: Unable to read model: Message = " + e.getMessage() );
+                        throw new IOException( "NMAVEN-000-000: Unable to read model: Message = " + e.getMessage() +
+                            ", Path = " + pomArtifact.getFile().getAbsolutePath() );
 
                     }
+                    catch ( EOFException e )
+                    {
+                        throw new IOException( "NMAVEN-000-000: Unable to read model: Message = " + e.getMessage() +
+                            ", Path = " + pomArtifact.getFile().getAbsolutePath() );
+                    }
+
                     if ( !( model.getGroupId().equals( projectDependency.getGroupId() ) &&
                         model.getArtifactId().equals( projectDependency.getArtifactId() ) &&
                         model.getVersion().equals( projectDependency.getVersion() ) ) )
                     {
-                        throw new IOException( "Model parameters do not match project dependencies parameters" );
+                        throw new IOException(
+                            "Model parameters do not match project dependencies parameters: Model: " +
+                                model.getGroupId() + ":" + model.getArtifactId() + ":" + model.getVersion() +
+                                ", Project: " + projectDependency.getGroupId() + ":" +
+                                projectDependency.getArtifactId() + ":" + projectDependency.getVersion() );
                     }
                     modelDependencies.add( model );
                     artifactDependencies.add( assembly );
@@ -624,7 +642,6 @@
         throws RepositoryException, MalformedQueryException, QueryEvaluationException
     {
         String query = "SELECT * FROM {x} p {y}";
-        //System.out.println( query );
         TupleQuery tq = repositoryConnection.prepareTupleQuery( QueryLanguage.SERQL, query );
         tq.setBinding( "x", classifierUri );
         TupleQueryResult result = tq.evaluate();
@@ -635,7 +652,6 @@
             for ( Iterator<Binding> i = set.iterator(); i.hasNext(); )
             {
                 Binding binding = i.next();
-                // System.out.println( "-" + binding.getName() + ":" + binding.getValue() );
                 if ( binding.getValue().toString().startsWith( "http://maven.apache.org/artifact/requirement" ) )
                 {
                     try
@@ -675,6 +691,12 @@
                     bs.getBinding( ProjectUri.VERSION.getObjectBinding() ).getValue().toString() );
                 projectDependency.setArtifactType(
                     bs.getBinding( ProjectUri.ARTIFACT_TYPE.getObjectBinding() ).getValue().toString() );
+                Binding classifierBinding = bs.getBinding( ProjectUri.CLASSIFIER.getObjectBinding() );
+                if ( classifierBinding != null )
+                {
+                    projectDependency.setPublicKeyTokenId( classifierBinding.getValue().toString().replace( ":", "" ) );
+                }
+
                 project.addProjectDependency( projectDependency );
                 if ( bs.hasBinding( ProjectUri.DEPENDENCY.getObjectBinding() ) )
                 {

Modified: incubator/nmaven/trunk/components/dotnet-repository/src/main/java/org/apache/maven/dotnet/repository/impl/RepositoryConverterImpl.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/components/dotnet-repository/src/main/java/org/apache/maven/dotnet/repository/impl/RepositoryConverterImpl.java?view=diff&rev=560497&r1=560496&r2=560497
==============================================================================
--- incubator/nmaven/trunk/components/dotnet-repository/src/main/java/org/apache/maven/dotnet/repository/impl/RepositoryConverterImpl.java (original)
+++ incubator/nmaven/trunk/components/dotnet-repository/src/main/java/org/apache/maven/dotnet/repository/impl/RepositoryConverterImpl.java Fri Jul 27 21:58:34 2007
@@ -58,7 +58,8 @@
         Set<Project> projects = dao.getAllProjects();
         for ( Project project : projects )
         {
-            System.out.println(project.getArtifactId() + ":" + project.getProjectDependencies().size());
+            logger.info( "NMAVEN-000-000: Converting Project: Artifact ID = " + project.getArtifactId() +
+                ", Dependency Count =" + project.getProjectDependencies().size() );
             Artifact artifact = ProjectFactory.createArtifactFrom( project, artifactFactory, mavenRepository );
             Model model = ProjectFactory.createModelFrom( project );
 
@@ -75,7 +76,7 @@
                 }
                 else
                 {
-                    logger.info("NMAVEN-000-000: Could not find file: " + artifact.getFile().getAbsolutePath());
+                    logger.info( "NMAVEN-000-000: Could not find file: " + artifact.getFile().getAbsolutePath() );
                     continue;
                 }
             }

Modified: incubator/nmaven/trunk/misc/dotnet-repository-builder/pom.xml
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/misc/dotnet-repository-builder/pom.xml?view=diff&rev=560497&r1=560496&r2=560497
==============================================================================
--- incubator/nmaven/trunk/misc/dotnet-repository-builder/pom.xml (original)
+++ incubator/nmaven/trunk/misc/dotnet-repository-builder/pom.xml Fri Jul 27 21:58:34 2007
@@ -169,6 +169,11 @@
     </dependency>
     <dependency>
       <groupId>org.apache.maven.dotnet.plugins</groupId>
+      <artifactId>maven-xsd-plugin</artifactId>
+      <version>${nmavenVersion}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven.dotnet.plugins</groupId>
       <artifactId>maven-xsp-plugin</artifactId>
       <version>${nmavenVersion}</version>
     </dependency>

Modified: incubator/nmaven/trunk/plugins/maven-compile-plugin/src/main/java/org/apache/maven/dotnet/plugin/compile/ComponentInitializerMojo.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/plugins/maven-compile-plugin/src/main/java/org/apache/maven/dotnet/plugin/compile/ComponentInitializerMojo.java?view=diff&rev=560497&r1=560496&r2=560497
==============================================================================
--- incubator/nmaven/trunk/plugins/maven-compile-plugin/src/main/java/org/apache/maven/dotnet/plugin/compile/ComponentInitializerMojo.java (original)
+++ incubator/nmaven/trunk/plugins/maven-compile-plugin/src/main/java/org/apache/maven/dotnet/plugin/compile/ComponentInitializerMojo.java Fri Jul 27 21:58:34 2007
@@ -21,8 +21,6 @@
 import org.apache.maven.plugin.AbstractMojo;
 import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.project.MavenProject;
-import org.apache.maven.artifact.resolver.ArtifactResolutionException;
-import org.apache.maven.artifact.resolver.ArtifactNotFoundException;
 
 import org.apache.maven.dotnet.InitializationException;
 import org.apache.maven.dotnet.assembler.AssemblerContext;
@@ -104,13 +102,9 @@
                                                      project.getRemoteArtifactRepositories(), localRepository,
                                                      true );
         }
-        catch ( ArtifactResolutionException e )
+        catch ( java.io.IOException e )
         {
-            throw new MojoExecutionException( "NMAVEN-901-000: Unable to resolve assemblies", e );
-        }
-        catch ( ArtifactNotFoundException e )
-        {
-            throw new MojoExecutionException( "NMAVEN-901-001: Unable to resolve assemblies", e );
+            throw new MojoExecutionException(e.getMessage());
         }
 
         try

Modified: incubator/nmaven/trunk/plugins/maven-embedder-plugin/src/main/java/org/apache/maven/dotnet/plugin/embedder/EmbedderStarterMojo.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/plugins/maven-embedder-plugin/src/main/java/org/apache/maven/dotnet/plugin/embedder/EmbedderStarterMojo.java?view=diff&rev=560497&r1=560496&r2=560497
==============================================================================
--- incubator/nmaven/trunk/plugins/maven-embedder-plugin/src/main/java/org/apache/maven/dotnet/plugin/embedder/EmbedderStarterMojo.java (original)
+++ incubator/nmaven/trunk/plugins/maven-embedder-plugin/src/main/java/org/apache/maven/dotnet/plugin/embedder/EmbedderStarterMojo.java Fri Jul 27 21:58:34 2007
@@ -12,7 +12,6 @@
 import org.apache.maven.artifact.metadata.ArtifactMetadataSource;
 import org.apache.maven.artifact.factory.ArtifactFactory;
 import org.apache.maven.artifact.versioning.VersionRange;
-import org.apache.maven.artifact.installer.ArtifactInstallationException;
 import org.apache.maven.artifact.repository.ArtifactRepository;
 import org.apache.maven.artifact.repository.DefaultArtifactRepository;
 import org.apache.maven.artifact.repository.layout.DefaultRepositoryLayout;
@@ -160,20 +159,9 @@
             artifactContext.getArtifactInstaller().resolveAndInstallNetDependenciesForProfile( "VisualStudio2005",
                                                                                                new ArrayList<Dependency>() );
         }
-        catch ( ArtifactResolutionException e )
-        {
-            logger.severe( "NMAVEN-1600-003: Unable to resolve net dependencies: " + e.getMessage() );
-            throw new MojoExecutionException( "NMAVEN-1600-003: Unable to resolve net dependencies:", e );
-        }
-        catch ( ArtifactNotFoundException e )
-        {
-            logger.severe( "NMAVEN-1600-004: Unable to resolve net dependencies: " + e.getMessage() );
-            throw new MojoExecutionException( "NMAVEN-1600-004: Unable to resolve net dependencies:", e );
-        }
-        catch ( ArtifactInstallationException e )
+        catch ( IOException e )
         {
-            logger.severe( "NMAVEN-1600-005: Unable to resolve net dependencies: " + e.getMessage() );
-            throw new MojoExecutionException( "NMAVEN-1600-005: Unable to resolve net dependencies:", e );
+            throw new MojoExecutionException(e.getMessage());
         }
 
         Set<Artifact> artifactDependencies = new HashSet<Artifact>();

Modified: incubator/nmaven/trunk/plugins/maven-fxcop-plugin/src/main/java/org/apache/maven/dotnet/plugin/fxcop/FxCopAggregateMojo.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/plugins/maven-fxcop-plugin/src/main/java/org/apache/maven/dotnet/plugin/fxcop/FxCopAggregateMojo.java?view=diff&rev=560497&r1=560496&r2=560497
==============================================================================
--- incubator/nmaven/trunk/plugins/maven-fxcop-plugin/src/main/java/org/apache/maven/dotnet/plugin/fxcop/FxCopAggregateMojo.java (original)
+++ incubator/nmaven/trunk/plugins/maven-fxcop-plugin/src/main/java/org/apache/maven/dotnet/plugin/fxcop/FxCopAggregateMojo.java Fri Jul 27 21:58:34 2007
@@ -7,8 +7,6 @@
 import org.apache.maven.dotnet.ArtifactType;
 import org.apache.maven.dotnet.executable.ExecutionException;
 import org.apache.maven.dotnet.PlatformUnsupportedException;
-import org.apache.maven.artifact.resolver.ArtifactResolutionException;
-import org.apache.maven.artifact.resolver.ArtifactNotFoundException;
 import org.apache.maven.artifact.Artifact;
 import org.apache.maven.artifact.factory.ArtifactFactory;
 import org.apache.maven.model.Model;
@@ -109,13 +107,9 @@
                                                      project.getRemoteArtifactRepositories(), localRepository,
                                                      true );
         }
-        catch ( ArtifactResolutionException e )
-        {
-            throw new MojoExecutionException( "NMAVEN-901-000: Unable to resolve assemblies", e );
-        }
-        catch ( ArtifactNotFoundException e )
+        catch ( IOException e )
         {
-            throw new MojoExecutionException( "NMAVEN-901-001: Unable to resolve assemblies", e );
+            throw new MojoExecutionException(e.getMessage());
         }
 
         for ( Artifact artifact : (Set<Artifact>) project.getDependencyArtifacts() )

Modified: incubator/nmaven/trunk/plugins/maven-fxcop-plugin/src/main/java/org/apache/maven/dotnet/plugin/fxcop/FxCopMojo.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/plugins/maven-fxcop-plugin/src/main/java/org/apache/maven/dotnet/plugin/fxcop/FxCopMojo.java?view=diff&rev=560497&r1=560496&r2=560497
==============================================================================
--- incubator/nmaven/trunk/plugins/maven-fxcop-plugin/src/main/java/org/apache/maven/dotnet/plugin/fxcop/FxCopMojo.java (original)
+++ incubator/nmaven/trunk/plugins/maven-fxcop-plugin/src/main/java/org/apache/maven/dotnet/plugin/fxcop/FxCopMojo.java Fri Jul 27 21:58:34 2007
@@ -7,8 +7,6 @@
 import org.apache.maven.dotnet.ArtifactType;
 import org.apache.maven.dotnet.artifact.AssemblyResolver;
 import org.apache.maven.project.MavenProject;
-import org.apache.maven.artifact.resolver.ArtifactResolutionException;
-import org.apache.maven.artifact.resolver.ArtifactNotFoundException;
 import org.apache.maven.artifact.Artifact;
 import org.codehaus.plexus.util.FileUtils;
 
@@ -99,13 +97,9 @@
                                                      project.getRemoteArtifactRepositories(), localRepository,
                                                      true );
         }
-        catch ( ArtifactResolutionException e )
+        catch ( IOException e )
         {
-            throw new MojoExecutionException( "NMAVEN-901-000: Unable to resolve assemblies", e );
-        }
-        catch ( ArtifactNotFoundException e )
-        {
-            throw new MojoExecutionException( "NMAVEN-901-001: Unable to resolve assemblies", e );
+            throw new MojoExecutionException(e.getMessage());
         }
 
         Set<Artifact> artifacts = project.getDependencyArtifacts();

Modified: incubator/nmaven/trunk/plugins/maven-install-plugin/src/main/java/org/apache/maven/dotnet/plugin/install/InstallerMojo.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/plugins/maven-install-plugin/src/main/java/org/apache/maven/dotnet/plugin/install/InstallerMojo.java?view=diff&rev=560497&r1=560496&r2=560497
==============================================================================
--- incubator/nmaven/trunk/plugins/maven-install-plugin/src/main/java/org/apache/maven/dotnet/plugin/install/InstallerMojo.java (original)
+++ incubator/nmaven/trunk/plugins/maven-install-plugin/src/main/java/org/apache/maven/dotnet/plugin/install/InstallerMojo.java Fri Jul 27 21:58:34 2007
@@ -212,12 +212,12 @@
             try
             {
                 artifactContext.getArtifactInstaller()
-                    .installArtifactAndDependenciesIntoPrivateApplicationBase( pab.getParentFile(), artifact,
+                    .installArtifactAndDependenciesIntoPrivateApplicationBase( localRepository, artifact,
                                                                                dependencies );
             }
-            catch ( ArtifactInstallationException e )
+            catch ( java.io.IOException e )
             {
-                throw new MojoExecutionException( "NMAVEN-1001-002: Failed to install artifact file", e );
+                throw new MojoExecutionException( e.getMessage() );
             }
         }
 

Modified: incubator/nmaven/trunk/plugins/maven-repository-plugin/src/main/java/org/apache/maven/dotnet/plugin/repository/RepositoryAssemblerMojo.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/plugins/maven-repository-plugin/src/main/java/org/apache/maven/dotnet/plugin/repository/RepositoryAssemblerMojo.java?view=diff&rev=560497&r1=560496&r2=560497
==============================================================================
--- incubator/nmaven/trunk/plugins/maven-repository-plugin/src/main/java/org/apache/maven/dotnet/plugin/repository/RepositoryAssemblerMojo.java (original)
+++ incubator/nmaven/trunk/plugins/maven-repository-plugin/src/main/java/org/apache/maven/dotnet/plugin/repository/RepositoryAssemblerMojo.java Fri Jul 27 21:58:34 2007
@@ -9,8 +9,6 @@
 import org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout;
 import org.apache.maven.artifact.repository.layout.DefaultRepositoryLayout;
 import org.apache.maven.artifact.Artifact;
-import org.apache.maven.artifact.resolver.ArtifactResolutionException;
-import org.apache.maven.artifact.resolver.ArtifactNotFoundException;
 import org.apache.maven.artifact.metadata.ArtifactMetadata;
 import org.apache.maven.artifact.factory.ArtifactFactory;
 import org.apache.maven.artifact.deployer.ArtifactDeployer;
@@ -156,13 +154,9 @@
             assemblyResolver.resolveTransitivelyFor( project, dependencies, project.getRemoteArtifactRepositories(),
                                                      localRepository, true );
         }
-        catch ( ArtifactResolutionException e )
-        {
-            throw new MojoExecutionException( "NMAVEN-901-000: Unable to resolve assemblies", e );
-        }
-        catch ( ArtifactNotFoundException e )
+        catch ( IOException e )
         {
-            throw new MojoExecutionException( "NMAVEN-901-001: Unable to resolve assemblies", e );
+            throw new MojoExecutionException(e.getMessage());
         }
 
         for ( Artifact artifact : (Set<Artifact>) project.getDependencyArtifacts() )

Modified: incubator/nmaven/trunk/plugins/maven-resolver-plugin/src/main/java/org/apache/maven/dotnet/plugin/resolver/NetDependencyResolverMojo.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/plugins/maven-resolver-plugin/src/main/java/org/apache/maven/dotnet/plugin/resolver/NetDependencyResolverMojo.java?view=diff&rev=560497&r1=560496&r2=560497
==============================================================================
--- incubator/nmaven/trunk/plugins/maven-resolver-plugin/src/main/java/org/apache/maven/dotnet/plugin/resolver/NetDependencyResolverMojo.java (original)
+++ incubator/nmaven/trunk/plugins/maven-resolver-plugin/src/main/java/org/apache/maven/dotnet/plugin/resolver/NetDependencyResolverMojo.java Fri Jul 27 21:58:34 2007
@@ -24,15 +24,10 @@
 import org.apache.maven.model.Dependency;
 import org.apache.maven.artifact.Artifact;
 import org.apache.maven.artifact.installer.ArtifactInstaller;
-import org.apache.maven.artifact.installer.ArtifactInstallationException;
-import org.apache.maven.artifact.resolver.ArtifactResolutionException;
-import org.apache.maven.artifact.resolver.ArtifactNotFoundException;
 import org.apache.maven.dotnet.registry.RepositoryRegistry;
 
 import java.io.File;
 import java.io.IOException;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
 import java.util.List;
 import java.util.ArrayList;
 
@@ -44,7 +39,6 @@
 import org.apache.maven.dotnet.executable.NetExecutable;
 import org.apache.maven.dotnet.executable.ExecutionException;
 import org.apache.maven.dotnet.PlatformUnsupportedException;
-import org.codehaus.plexus.util.FileUtils;
 
 /**
  * @author Shane Isbell
@@ -65,7 +59,7 @@
     /**
      * @parameter expression="${settings.localRepository}"
      */
-    private String localRepository;
+    private File localRepository;
 
     /**
      * @parameter expression="${project.file}"
@@ -133,7 +127,7 @@
 
         if ( localRepository == null )
         {
-            localRepository = new File( System.getProperty( "user.home" ), ".m2/repository" ).getAbsolutePath();
+            localRepository = new File( System.getProperty( "user.home" ), ".m2/repository" );
         }
 
         String profile = System.getProperty( "dependencyProfile" );
@@ -165,7 +159,7 @@
             dependencies.add( dependency );
         }
 
-        artifactContext.init( project, project.getRemoteArtifactRepositories(), new File( localRepository ) );
+        artifactContext.init( project, project.getRemoteArtifactRepositories(), localRepository );
         if ( !new File( localRepository, "nmaven.artifacts.resolved" ).exists() ) //performance optimization
         {
             try
@@ -173,47 +167,13 @@
                 artifactContext.getArtifactInstaller().resolveAndInstallNetDependenciesForProfile( profile,
                                                                                                    dependencies );
             }
-            catch ( ArtifactResolutionException e )
-            {
-                throw new MojoExecutionException( "NMAVEN-1600-003: Unable to resolve assemblies", e );
-            }
-            catch ( ArtifactNotFoundException e )
-            {
-                throw new MojoExecutionException( "NMAVEN-1600-003: Unable to resolve assemblies", e );
-            }
-            catch ( ArtifactInstallationException e )
-            {
-                throw new MojoExecutionException( "NMAVEN-1600-003: Unable to resolve assemblies", e );
-            }
-
-            new File( localRepository, "nmaven.artifacts.resolved" ).mkdir();
-            /*
-            FileOutputStream fos = null;
-            try
-            {
-                new File( localRepository, "nmaven.artifacts.resolved" ).mkdir();
-                //fos = new FileOutputStream( new File( localRepository, "nmaven.artifacts.resolved" ) );
-                //fos.write( 0 );
-            }
             catch ( IOException e )
             {
-
+                e.printStackTrace();
+                throw new MojoExecutionException( e.getMessage() );
             }
-            finally
-            {
-                if ( fos != null )
-                {
-                    try
-                    {
-                        fos.close();
-                    }
-                    catch ( IOException e )
-                    {
 
-                    }
-                }
-            }
-            */
+            new File( localRepository, "nmaven.artifacts.resolved" ).mkdir();
         }
 
         //Do GAC Install, if needed

Modified: incubator/nmaven/trunk/plugins/maven-test-plugin/src/main/java/org/apache/maven/dotnet/plugin/test/TesterMojo.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/plugins/maven-test-plugin/src/main/java/org/apache/maven/dotnet/plugin/test/TesterMojo.java?view=diff&rev=560497&r1=560496&r2=560497
==============================================================================
--- incubator/nmaven/trunk/plugins/maven-test-plugin/src/main/java/org/apache/maven/dotnet/plugin/test/TesterMojo.java (original)
+++ incubator/nmaven/trunk/plugins/maven-test-plugin/src/main/java/org/apache/maven/dotnet/plugin/test/TesterMojo.java Fri Jul 27 21:58:34 2007
@@ -22,8 +22,6 @@
 import org.apache.maven.plugin.AbstractMojo;
 import org.apache.maven.project.MavenProject;
 import org.apache.maven.artifact.Artifact;
-import org.apache.maven.artifact.resolver.ArtifactResolutionException;
-import org.apache.maven.artifact.resolver.ArtifactNotFoundException;
 import org.codehaus.plexus.util.FileUtils;
 
 import java.util.ArrayList;
@@ -163,13 +161,9 @@
             assemblyResolver.resolveTransitivelyFor( project, project.getDependencies(),
                                                      project.getRemoteArtifactRepositories(), localRepository, true );
         }
-        catch ( ArtifactResolutionException e )
+        catch ( IOException e )
         {
-            throw new MojoExecutionException( "NMAVEN-901-000: Unable to resolve assemblies", e );
-        }
-        catch ( ArtifactNotFoundException e )
-        {
-            throw new MojoExecutionException( "NMAVEN-901-001: Unable to resolve assemblies", e );
+            throw new MojoExecutionException(e.getMessage());
         }
 
         List<Artifact> nunitLibs = new ArrayList<Artifact>();

Modified: incubator/nmaven/trunk/plugins/maven-vsinstaller-plugin/src/main/java/org/apache/maven/dotnet/plugin/vsinstaller/VsInstallerMojo.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/plugins/maven-vsinstaller-plugin/src/main/java/org/apache/maven/dotnet/plugin/vsinstaller/VsInstallerMojo.java?view=diff&rev=560497&r1=560496&r2=560497
==============================================================================
--- incubator/nmaven/trunk/plugins/maven-vsinstaller-plugin/src/main/java/org/apache/maven/dotnet/plugin/vsinstaller/VsInstallerMojo.java (original)
+++ incubator/nmaven/trunk/plugins/maven-vsinstaller-plugin/src/main/java/org/apache/maven/dotnet/plugin/vsinstaller/VsInstallerMojo.java Fri Jul 27 21:58:34 2007
@@ -4,9 +4,6 @@
 import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.plugin.MojoFailureException;
 import org.apache.maven.model.Dependency;
-import org.apache.maven.artifact.resolver.ArtifactResolutionException;
-import org.apache.maven.artifact.resolver.ArtifactNotFoundException;
-import org.apache.maven.artifact.installer.ArtifactInstallationException;
 import org.apache.maven.artifact.handler.manager.ArtifactHandlerManager;
 import org.apache.maven.artifact.repository.ArtifactRepository;
 import org.apache.maven.artifact.repository.DefaultArtifactRepository;
@@ -133,17 +130,9 @@
             artifactContext.getArtifactInstaller().resolveAndInstallNetDependenciesForProfile( "VisualStudio2005",
                                                                                                new ArrayList<Dependency>() );
         }
-        catch ( ArtifactResolutionException e )
-        {
-            throw new MojoExecutionException( "NMAVEN-1600-003: Unable to resolve assemblies", e );
-        }
-        catch ( ArtifactNotFoundException e )
-        {
-            throw new MojoExecutionException( "NMAVEN-1600-004: Unable to resolve assemblies", e );
-        }
-        catch ( ArtifactInstallationException e )
+        catch ( IOException e )
         {
-            throw new MojoExecutionException( "NMAVEN-1600-005: Unable to resolve assemblies", e );
+            throw new MojoExecutionException( e.getMessage() );
         }
 
         //GAC Installs
@@ -191,9 +180,8 @@
                 outputFile.getParentFile().mkdir();
             }
             writer = new OutputStreamWriter( new FileOutputStream( outputFile ), "Unicode" );
-            String pab = new File(localRepository).getParent() + "\\pab";
-            writer.write(
-                addin.replaceAll( "\\$\\{localRepository\\}", pab.replaceAll( "\\\\", "\\\\\\\\" ) ) );
+            String pab = new File( localRepository ).getParent() + "\\pab";
+            writer.write( addin.replaceAll( "\\$\\{localRepository\\}", pab.replaceAll( "\\\\", "\\\\\\\\" ) ) );
 
         }
         catch ( IOException e )



Mime
View raw message