incubator-nmaven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sisb...@apache.org
Subject svn commit: r536577 - in /incubator/nmaven/branches/SI_XPT: ./ archetypes/maven-archetype-netexecutable/src/main/resources/archetype-resources/src/main/java/ assemblies/NMaven.Core/src/main/csharp/Core/Impl/ components/dotnet-artifact/src/main/java/org...
Date Wed, 09 May 2007 16:30:48 GMT
Author: sisbell
Date: Wed May  9 09:30:40 2007
New Revision: 536577

URL: http://svn.apache.org/viewvc?view=rev&rev=536577
Log:
Fixed issues: 1) artifacts not downloading remotely; 2) dependent artifacts now install into exe/plugin directory after resolving; 3) changed the remote .NET artifact format to the standard java default; NMaven will do a file copy after resolving the artifact.

Modified:
    incubator/nmaven/branches/SI_XPT/archetypes/maven-archetype-netexecutable/src/main/resources/archetype-resources/src/main/java/NetExecutableMojo.java
    incubator/nmaven/branches/SI_XPT/assemblies/NMaven.Core/src/main/csharp/Core/Impl/ProjectGeneratorImpl.cs
    incubator/nmaven/branches/SI_XPT/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/ArtifactContext.java
    incubator/nmaven/branches/SI_XPT/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/ArtifactInstaller.java
    incubator/nmaven/branches/SI_XPT/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/AssemblyResolver.java
    incubator/nmaven/branches/SI_XPT/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/impl/ArtifactContextImpl.java
    incubator/nmaven/branches/SI_XPT/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/impl/ArtifactInstallerImpl.java
    incubator/nmaven/branches/SI_XPT/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/impl/AssemblyResolverImpl.java
    incubator/nmaven/branches/SI_XPT/components/dotnet-artifact/src/main/resources/META-INF/plexus/components.xml
    incubator/nmaven/branches/SI_XPT/components/dotnet-executable/src/main/java/org/apache/maven/dotnet/executable/ExecutableContext.java
    incubator/nmaven/branches/SI_XPT/components/dotnet-executable/src/main/java/org/apache/maven/dotnet/executable/impl/DefaultNetExecutable.java
    incubator/nmaven/branches/SI_XPT/components/dotnet-executable/src/main/java/org/apache/maven/dotnet/executable/impl/ExecutableContextImpl.java
    incubator/nmaven/branches/SI_XPT/components/dotnet-model/netdependency/netdependency.mdo
    incubator/nmaven/branches/SI_XPT/components/dotnet-vendor/src/main/java/org/apache/maven/dotnet/vendor/VendorInfoRepository.java
    incubator/nmaven/branches/SI_XPT/components/dotnet-vendor/src/main/java/org/apache/maven/dotnet/vendor/impl/SettingsRepository.java
    incubator/nmaven/branches/SI_XPT/components/dotnet-vendor/src/main/java/org/apache/maven/dotnet/vendor/impl/VendorInfoRepositoryImpl.java
    incubator/nmaven/branches/SI_XPT/components/dotnet-vendor/src/test/java/org/apache/maven/dotnet/vendor/impl/VendorInfoRepositoryTestStub.java
    incubator/nmaven/branches/SI_XPT/maven-dotnet.iml
    incubator/nmaven/branches/SI_XPT/plugins/maven-compile-plugin/src/main/java/org/apache/maven/dotnet/plugin/compile/SourceProcessorMojo.java
    incubator/nmaven/branches/SI_XPT/plugins/maven-compile-plugin/src/main/java/org/apache/maven/dotnet/plugin/compile/TestSourceProcessorMojo.java
    incubator/nmaven/branches/SI_XPT/plugins/maven-resolver-plugin/src/main/java/org/apache/maven/dotnet/plugin/resolver/NetDependencyResolverMojo.java

Modified: incubator/nmaven/branches/SI_XPT/archetypes/maven-archetype-netexecutable/src/main/resources/archetype-resources/src/main/java/NetExecutableMojo.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_XPT/archetypes/maven-archetype-netexecutable/src/main/resources/archetype-resources/src/main/java/NetExecutableMojo.java?view=diff&rev=536577&r1=536576&r2=536577
==============================================================================
--- incubator/nmaven/branches/SI_XPT/archetypes/maven-archetype-netexecutable/src/main/resources/archetype-resources/src/main/java/NetExecutableMojo.java (original)
+++ incubator/nmaven/branches/SI_XPT/archetypes/maven-archetype-netexecutable/src/main/resources/archetype-resources/src/main/java/NetExecutableMojo.java Wed May  9 09:30:40 2007
@@ -82,7 +82,7 @@
         }
         catch ( ExecutionException e )
         {
-            throw new MojoExecutionException( "NMAVEN-xxx-000: Unable to execute gacutil: Vendor " + vendor +
+            throw new MojoExecutionException( "NMAVEN-xxx-000: Unable to execute: Vendor " + vendor +
                 ", frameworkVersion = " + frameworkVersion + ", Profile = " + profile, e );
         }
         catch ( PlatformUnsupportedException e )

Modified: incubator/nmaven/branches/SI_XPT/assemblies/NMaven.Core/src/main/csharp/Core/Impl/ProjectGeneratorImpl.cs
URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_XPT/assemblies/NMaven.Core/src/main/csharp/Core/Impl/ProjectGeneratorImpl.cs?view=diff&rev=536577&r1=536576&r2=536577
==============================================================================
--- incubator/nmaven/branches/SI_XPT/assemblies/NMaven.Core/src/main/csharp/Core/Impl/ProjectGeneratorImpl.cs (original)
+++ incubator/nmaven/branches/SI_XPT/assemblies/NMaven.Core/src/main/csharp/Core/Impl/ProjectGeneratorImpl.cs Wed May  9 09:30:40 2007
@@ -26,6 +26,7 @@
 using System.Collections.Generic;
 using System.Reflection;
 using System.Text;
+using test;
 
 namespace NMaven.Core.Impl
 {

Modified: incubator/nmaven/branches/SI_XPT/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/ArtifactContext.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_XPT/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/ArtifactContext.java?view=diff&rev=536577&r1=536576&r2=536577
==============================================================================
--- incubator/nmaven/branches/SI_XPT/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/ArtifactContext.java (original)
+++ incubator/nmaven/branches/SI_XPT/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/ArtifactContext.java Wed May  9 09:30:40 2007
@@ -114,6 +114,15 @@
     File getLocalRepository();
 
     /**
+     * Returns a list of .NET artifacts that reside within the specified repository.
+     *
+     * @param repository the local repository directory. If value is null, the localRepository reference will default to
+     *                   the specified localRepository passed to the init method of the context.
+     * @return  list of .NET artifacts that reside within the specified repository.
+     */
+    List<Artifact> getAllNetArtifactsFromRepository( File repository );
+
+    /**
      * Initializes this artifact context. Neither parameter value should be null.
      *
      * @param mavenProject    the maven project

Modified: incubator/nmaven/branches/SI_XPT/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/ArtifactInstaller.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_XPT/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/ArtifactInstaller.java?view=diff&rev=536577&r1=536576&r2=536577
==============================================================================
--- incubator/nmaven/branches/SI_XPT/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/ArtifactInstaller.java (original)
+++ incubator/nmaven/branches/SI_XPT/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/ArtifactInstaller.java Wed May  9 09:30:40 2007
@@ -19,6 +19,7 @@
 package org.apache.maven.dotnet.artifact;
 
 import org.apache.maven.artifact.Artifact;
+import org.apache.maven.artifact.resolver.ArtifactNotFoundException;
 import org.apache.maven.artifact.installer.ArtifactInstallationException;
 import org.apache.maven.project.MavenProject;
 import org.apache.maven.model.Dependency;
@@ -93,6 +94,19 @@
      */
     void installLibraryDependencies( Artifact artifact, List<Dependency> dependencies )
         throws ArtifactInstallationException;
+
+    /**
+     * Resolves the specified artifact (and its dependencies) and installs the artifact's dependencies into the
+     * artifact's directory within the local repository. This method should be used for exe, winexe and
+     * netplugins.
+     *
+     * @param artifact the artifact to resolve
+     * @param pomFile
+     * @throws ArtifactInstallationException
+     * @throws ArtifactNotFoundException
+     */
+    void resolveAndInstallLibraryDependenciesFor( Artifact artifact, File pomFile )
+        throws ArtifactInstallationException , ArtifactNotFoundException;
 
     /**
      * Copies .netmodules, that the project is dependenct upon, from the local repo to the project's target directory.

Modified: incubator/nmaven/branches/SI_XPT/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/AssemblyResolver.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_XPT/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/AssemblyResolver.java?view=diff&rev=536577&r1=536576&r2=536577
==============================================================================
--- incubator/nmaven/branches/SI_XPT/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/AssemblyResolver.java (original)
+++ incubator/nmaven/branches/SI_XPT/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/AssemblyResolver.java Wed May  9 09:30:40 2007
@@ -60,6 +60,4 @@
     void resolveTransitivelyFor( MavenProject project, Artifact sourceArtifact, List<Dependency> dependencies,
                                  File pomFile, String localRepositoryPath, boolean addResolvedDependenciesToProject )
         throws ArtifactResolutionException, ArtifactNotFoundException;
-
-
 }

Modified: incubator/nmaven/branches/SI_XPT/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/impl/ArtifactContextImpl.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_XPT/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/impl/ArtifactContextImpl.java?view=diff&rev=536577&r1=536576&r2=536577
==============================================================================
--- incubator/nmaven/branches/SI_XPT/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/impl/ArtifactContextImpl.java (original)
+++ incubator/nmaven/branches/SI_XPT/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/impl/ArtifactContextImpl.java Wed May  9 09:30:40 2007
@@ -262,6 +262,11 @@
         return getDirectDependenciesFor( artifact, matchPolicies );
     }
 
+    public List<Artifact> getAllNetArtifactsFromRepository( File repository )
+    {
+        return null;           
+    }
+
     /**
      * @see ArtifactContext#init(org.apache.maven.project.MavenProject, java.io.File)
      */

Modified: incubator/nmaven/branches/SI_XPT/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/impl/ArtifactInstallerImpl.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_XPT/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/impl/ArtifactInstallerImpl.java?view=diff&rev=536577&r1=536576&r2=536577
==============================================================================
--- incubator/nmaven/branches/SI_XPT/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/impl/ArtifactInstallerImpl.java (original)
+++ incubator/nmaven/branches/SI_XPT/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/impl/ArtifactInstallerImpl.java Wed May  9 09:30:40 2007
@@ -25,7 +25,15 @@
 import org.apache.maven.dotnet.artifact.ArtifactType;
 import org.apache.maven.project.MavenProject;
 import org.apache.maven.artifact.Artifact;
+import org.apache.maven.artifact.versioning.VersionRange;
+import org.apache.maven.artifact.resolver.filter.ArtifactFilter;
+import org.apache.maven.artifact.resolver.ArtifactResolutionResult;
+import org.apache.maven.artifact.resolver.ResolutionNode;
+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.ArtifactMetadata;
+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;
@@ -46,6 +54,8 @@
 import java.io.FileReader;
 import java.util.List;
 import java.util.ArrayList;
+import java.util.Set;
+import java.util.HashSet;
 
 /**
  * Provides an implementation of the <code>ArtifactInstaller</code> interface.
@@ -98,6 +108,17 @@
     private Logger logger;
 
     /**
+     * An artifact resolver component for locating artifacts and pulling them into the local repo if they do not
+     * already exist.
+     */
+    private ArtifactResolver resolver;
+
+    /**
+     * Metadata component used by the <code>ArtifactResolver</code>.
+     */
+    private ArtifactMetadataSource metadata;
+
+    /**
      * Constructor. This method is intended to by invoked by the plexus-container, not by the application developer.
      */
     public ArtifactInstallerImpl()
@@ -315,6 +336,47 @@
         }
     }
 
+    public void resolveAndInstallLibraryDependenciesFor( Artifact sourceArtifact, File pomFile )
+        throws ArtifactInstallationException, ArtifactNotFoundException
+    {
+        ArtifactMetadataImpl meta = new ArtifactMetadataImpl( sourceArtifact, pomFile );
+        sourceArtifact.addMetadata( meta );
+
+        Set<Artifact> artifactDependencies = new HashSet<Artifact>();
+        artifactDependencies.add( sourceArtifact );
+        ArtifactRepository localArtifactRepository =
+            new DefaultArtifactRepository( "local", "file://" + localRepository, new AssemblyRepositoryLayout() );
+        ArtifactResolutionResult result;
+        try
+        {
+            result = resolver.resolveTransitively( artifactDependencies, project.getArtifact(), localArtifactRepository,
+                                                   project.getRemoteArtifactRepositories(), metadata, null );
+        }
+        catch ( ArtifactResolutionException e )
+        {
+            throw new ArtifactNotFoundException( "", sourceArtifact );
+        }
+
+        AssemblyRepositoryLayout layout = new AssemblyRepositoryLayout();
+        Set<Artifact> artifacts = result.getArtifacts();
+        File destDir = new File( localRepository, layout.pathOf( sourceArtifact ) ).getParentFile();
+        for ( Artifact artifact : artifacts )
+        {
+            File destFile = new File( destDir, artifact.getFile().getName() );
+            if ( !destFile.exists() || destFile.lastModified() < artifact.getFile().lastModified() )
+            {
+                try
+                {
+                    FileUtils.copyFileToDirectory( artifact.getFile(), destDir );
+                }
+                catch ( IOException e )
+                {
+                    e.printStackTrace();
+                }
+            }
+        }
+    }
+
     /**
      * @see org.apache.maven.dotnet.artifact.ArtifactInstaller#installNetModulesToTargetDirectory(org.apache.maven.artifact.Artifact)
      */
@@ -344,7 +406,11 @@
                 targetDirectory + File.separator + artifact.getFile().getName() );
             try
             {
-                FileUtils.copyFileToDirectory( artifact.getFile(), new File( targetDirectory ) );
+                File targetDirectoryFile = new File( targetDirectory );
+                if ( targetDirectoryFile.lastModified() < artifact.getFile().lastModified() )
+                {
+                    FileUtils.copyFileToDirectory( artifact.getFile(), targetDirectoryFile );
+                }
             }
             catch ( IOException e )
             {

Modified: incubator/nmaven/branches/SI_XPT/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/impl/AssemblyResolverImpl.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_XPT/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/impl/AssemblyResolverImpl.java?view=diff&rev=536577&r1=536576&r2=536577
==============================================================================
--- incubator/nmaven/branches/SI_XPT/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/impl/AssemblyResolverImpl.java (original)
+++ incubator/nmaven/branches/SI_XPT/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/impl/AssemblyResolverImpl.java Wed May  9 09:30:40 2007
@@ -20,6 +20,7 @@
 
 import org.apache.maven.dotnet.artifact.AssemblyResolver;
 import org.apache.maven.dotnet.artifact.AssemblyRepositoryLayout;
+import org.apache.maven.dotnet.artifact.ArtifactType;
 import org.apache.maven.project.MavenProject;
 import org.apache.maven.artifact.Artifact;
 import org.apache.maven.artifact.factory.ArtifactFactory;
@@ -28,20 +29,25 @@
 import org.apache.maven.artifact.resolver.ArtifactResolutionException;
 import org.apache.maven.artifact.resolver.ArtifactNotFoundException;
 import org.apache.maven.artifact.resolver.ArtifactResolver;
+import org.apache.maven.artifact.resolver.ResolutionNode;
 import org.apache.maven.artifact.resolver.filter.ArtifactFilter;
 import org.apache.maven.artifact.repository.ArtifactRepository;
 import org.apache.maven.artifact.repository.DefaultArtifactRepository;
 import org.apache.maven.artifact.repository.ArtifactRepositoryFactory;
 import org.apache.maven.artifact.versioning.VersionRange;
 import org.apache.maven.model.Dependency;
+
 import org.codehaus.plexus.logging.LogEnabled;
 import org.codehaus.plexus.logging.Logger;
+import org.codehaus.plexus.util.FileUtils;
 
 import java.util.Set;
 import java.util.HashSet;
 import java.util.List;
 import java.util.ArrayList;
+
 import java.io.File;
+import java.io.IOException;
 
 /**
  * Provides a way to resolve transitive assemblies that do not have versions within their file name.
@@ -117,39 +123,136 @@
                                                                           dependency.getClassifier(), scope, null );
             if ( artifact.getType().startsWith( "gac" ) )
             {
-                logger.debug( "NMAVEN-000-000: GAC Dependency = " + artifact.getType() + ", ID = " + artifact.getArtifactId() );
+                logger.debug(
+                    "NMAVEN-000-000: GAC Dependency = " + artifact.getType() + ", ID = " + artifact.getArtifactId() );
                 gacDependencies.add( artifact );
             }
             else
             {
-                logger.debug( "NMAVEN-000-000: Dependency = " + artifact.getType() + ", ID = " + artifact.getArtifactId() );
+                logger.info(
+                    "NMAVEN-000-000: Dependency = " + artifact.getType() + ", ID = " + artifact.getArtifactId() );
                 artifactDependencies.add( artifact );
             }
         }
 
         ArtifactRepository localArtifactRepository =
             new DefaultArtifactRepository( "local", "file://" + localRepositoryPath, new AssemblyRepositoryLayout() );
-
-        List<ArtifactRepository> newArtifactRepositories = new ArrayList<ArtifactRepository>();
-        List<ArtifactRepository> artifactRepositories = project.getRemoteArtifactRepositories();
-        for ( ArtifactRepository artifactRepository : artifactRepositories )
-        {
-            ArtifactRepository repo = artifactRepositoryFactory.createArtifactRepository( artifactRepository.getId(),
-                                                                                          artifactRepository.getUrl(),
-                                                                                          new AssemblyRepositoryLayout(),
-                                                                                          artifactRepository.getSnapshots(),
-                                                                                          artifactRepository.getReleases() );
-            newArtifactRepositories.add( repo );
-        }
         ArtifactResolutionResult result = resolver.resolveTransitively( artifactDependencies, sourceArtifact,
                                                                         localArtifactRepository,
-                                                                        newArtifactRepositories, metadata, gacFilter );
+                                                                        project.getRemoteArtifactRepositories(),
+                                                                        metadata, gacFilter );
+        Set<Artifact> resolvedDependencies = result.getArtifacts();
+        AssemblyRepositoryLayout layout = new AssemblyRepositoryLayout();
+/*
+        Set<Artifact> resolvedDependencies = result.getArtifacts();
+        Set<ResolutionNode> nodes = result.getArtifactResolutionNodes();
+        for(ResolutionNode node : nodes)
+        {
+            logger.info( "Node = " + node.getArtifact().getArtifactId());
+            List<String> ss = node.getDependencyTrail();
+            for(String s : ss)
+            {
+                logger.info( "Dependency Node = " + s);
+            }
+        }
+
+        artifactDependencies.addAll( resolvedDependencies );
+        AssemblyRepositoryLayout layout = new AssemblyRepositoryLayout();
+        for ( Artifact artifact : artifactDependencies )
+        {
+            if ( artifact.getType().equals( ArtifactType.EXE.getPackagingType() ) ||
+                artifact.getType().equals( ArtifactType.NETPLUGIN.getPackagingType() ) )
+            {
+                installDependentArtifacts( artifact, artifactDependencies, localRepositoryPath );
+            }
+        }
+  */
         if ( addResolvedDependenciesToProject )
         {
-            Set<Artifact> resolvedDependencies = result.getArtifacts();
+            for ( Artifact artifact : resolvedDependencies )
+            {
+                File orginalFileWithVersion = artifact.getFile();
+                orginalFileWithVersion.renameTo( new File( localRepositoryPath + "/" + layout.pathOf( artifact ) ) );
+            }
+
             resolvedDependencies.addAll( gacDependencies );
             project.setDependencyArtifacts( resolvedDependencies );
         }
+    }
+
+    private void installDependentArtifacts( Artifact sourceArtifact, Set<Artifact> resolvedDependencies,
+                                            String localRepositoryPath )
+        throws ArtifactResolutionException
+    {
+        List<Artifact> executableDependencies = getDependenciesForExecutable( sourceArtifact, resolvedDependencies );
+        File sourceFileDirectory =
+            new File( localRepositoryPath, new AssemblyRepositoryLayout().pathOf( sourceArtifact ) ).getParentFile();
+        logger.info( "NMAVEN-xxx-000: Destination Artifact: " + sourceArtifact.getGroupId() + ":" +
+            sourceArtifact.getArtifactId() + ":" + sourceArtifact.getVersion() );
+        for ( Artifact executableDependency : executableDependencies )
+        {
+
+            if ( executableDependency.getFile() == null )
+            {
+                logger.info( "File is null: Artifact ID = " + executableDependency.getArtifactId() );
+                continue;
+            }
+            File destFile = new File( sourceFileDirectory, executableDependency.getFile().getName() );
+
+            logger.info( "Destination File = " + destFile.getAbsolutePath() );
+            logger.info( "Conditions : " + !destFile.exists() + ":" +
+                ( destFile.lastModified() < executableDependency.getFile().lastModified() ) );
+            if ( !destFile.exists() || destFile.lastModified() < executableDependency.getFile().lastModified() )
+            {
+                try
+                {
+                    logger.info( "NMAVEN-xxx-000: Copying: File = " + executableDependency.getFile().getName() );
+                    FileUtils.copyFileToDirectory( executableDependency.getFile(), sourceFileDirectory );
+
+                }
+                catch ( IOException e )
+                {
+                    throw new ArtifactResolutionException(
+                        "NMAVEN-xxx-000: Unable to install all dependent files for executable or plugin",
+                        sourceArtifact );
+                }
+            }
+        }
+        logger.info( "------------------------------------------------------" );
+    }
+
+    private List<String> getDependentIdsFor( Artifact executable, Set<Artifact> resolvedDependencies )
+    {
+        for ( Artifact artifact : resolvedDependencies )
+        {
+            logger.info("Checking IDs: " + artifact.getId() + " : " + executable.getId());
+            logger.info("SIZE = " + artifact.getDependencyTrail());
+            if ( artifact.getId().equals( executable.getId() ) )
+            {
+                logger.info("MATCH");
+                return artifact.getDependencyTrail();
+            }
+        }
+        return new ArrayList<String>();
+    }
+
+    private List<Artifact> getDependenciesForExecutable( Artifact executable, Set<Artifact> resolvedDependencies )
+    {
+        List<Artifact> artifacts = new ArrayList<Artifact>();
+        logger.info( "EXE ID = " + executable.getId() );
+        for ( String id : getDependentIdsFor( executable, resolvedDependencies ) )
+        {
+            logger.info("Dependent ID = " + id);
+            for ( Artifact artifact : resolvedDependencies )
+            {
+                if ( artifact.getId().equals( id ) )
+                {
+                    logger.info("Adding ID = " + id);
+                    artifacts.add( artifact );
+                }
+            }
+        }
+        return artifacts;
     }
 
     private static class GacFilter

Modified: incubator/nmaven/branches/SI_XPT/components/dotnet-artifact/src/main/resources/META-INF/plexus/components.xml
URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_XPT/components/dotnet-artifact/src/main/resources/META-INF/plexus/components.xml?view=diff&rev=536577&r1=536576&r2=536577
==============================================================================
--- incubator/nmaven/branches/SI_XPT/components/dotnet-artifact/src/main/resources/META-INF/plexus/components.xml (original)
+++ incubator/nmaven/branches/SI_XPT/components/dotnet-artifact/src/main/resources/META-INF/plexus/components.xml Wed May  9 09:30:40 2007
@@ -35,6 +35,12 @@
         <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>
       </requirements>
     </component>
     <component>

Modified: incubator/nmaven/branches/SI_XPT/components/dotnet-executable/src/main/java/org/apache/maven/dotnet/executable/ExecutableContext.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_XPT/components/dotnet-executable/src/main/java/org/apache/maven/dotnet/executable/ExecutableContext.java?view=diff&rev=536577&r1=536576&r2=536577
==============================================================================
--- incubator/nmaven/branches/SI_XPT/components/dotnet-executable/src/main/java/org/apache/maven/dotnet/executable/ExecutableContext.java (original)
+++ incubator/nmaven/branches/SI_XPT/components/dotnet-executable/src/main/java/org/apache/maven/dotnet/executable/ExecutableContext.java Wed May  9 09:30:40 2007
@@ -20,7 +20,10 @@
 
 import org.apache.maven.dotnet.NMavenContext;
 import org.apache.maven.dotnet.PlatformUnsupportedException;
+import org.apache.maven.dotnet.vendor.Vendor;
 import org.apache.maven.project.MavenProject;
+
+import java.io.File;
 
 /**
  * Provides services for executables.

Modified: incubator/nmaven/branches/SI_XPT/components/dotnet-executable/src/main/java/org/apache/maven/dotnet/executable/impl/DefaultNetExecutable.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_XPT/components/dotnet-executable/src/main/java/org/apache/maven/dotnet/executable/impl/DefaultNetExecutable.java?view=diff&rev=536577&r1=536576&r2=536577
==============================================================================
--- incubator/nmaven/branches/SI_XPT/components/dotnet-executable/src/main/java/org/apache/maven/dotnet/executable/impl/DefaultNetExecutable.java (original)
+++ incubator/nmaven/branches/SI_XPT/components/dotnet-executable/src/main/java/org/apache/maven/dotnet/executable/impl/DefaultNetExecutable.java Wed May  9 09:30:40 2007
@@ -37,7 +37,7 @@
     implements NetExecutable
 {
 
-    private ExecutableContext executableContext;
+    protected ExecutableContext executableContext;
 
     private MavenProject project;
 

Modified: incubator/nmaven/branches/SI_XPT/components/dotnet-executable/src/main/java/org/apache/maven/dotnet/executable/impl/ExecutableContextImpl.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_XPT/components/dotnet-executable/src/main/java/org/apache/maven/dotnet/executable/impl/ExecutableContextImpl.java?view=diff&rev=536577&r1=536576&r2=536577
==============================================================================
--- incubator/nmaven/branches/SI_XPT/components/dotnet-executable/src/main/java/org/apache/maven/dotnet/executable/impl/ExecutableContextImpl.java (original)
+++ incubator/nmaven/branches/SI_XPT/components/dotnet-executable/src/main/java/org/apache/maven/dotnet/executable/impl/ExecutableContextImpl.java Wed May  9 09:30:40 2007
@@ -24,8 +24,13 @@
 import org.apache.maven.dotnet.registry.RepositoryRegistry;
 import org.apache.maven.dotnet.PlatformUnsupportedException;
 import org.apache.maven.dotnet.RepositoryNotFoundException;
+import org.apache.maven.dotnet.vendor.Vendor;
+import org.apache.maven.dotnet.vendor.VendorFactory;
+import org.apache.maven.dotnet.vendor.impl.SettingsRepository;
 import org.codehaus.plexus.logging.Logger;
 import org.codehaus.plexus.logging.LogEnabled;
+
+import java.io.File;
 
 /**
  * Provides an implementation of the executable context.

Modified: incubator/nmaven/branches/SI_XPT/components/dotnet-model/netdependency/netdependency.mdo
URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_XPT/components/dotnet-model/netdependency/netdependency.mdo?view=diff&rev=536577&r1=536576&r2=536577
==============================================================================
--- incubator/nmaven/branches/SI_XPT/components/dotnet-model/netdependency/netdependency.mdo (original)
+++ incubator/nmaven/branches/SI_XPT/components/dotnet-model/netdependency/netdependency.mdo Wed May  9 09:30:40 2007
@@ -63,6 +63,12 @@
           <description></description>
         </field>
         <field>
+          <name>publicKeyToken</name>
+          <version>1.0.0</version>
+          <type>String</type>
+          <description>The public key of the assembly.</description>
+        </field>
+        <field>
           <name>isGacInstall</name>
           <version>1.0.0</version>
           <type>boolean</type>

Modified: incubator/nmaven/branches/SI_XPT/components/dotnet-vendor/src/main/java/org/apache/maven/dotnet/vendor/VendorInfoRepository.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_XPT/components/dotnet-vendor/src/main/java/org/apache/maven/dotnet/vendor/VendorInfoRepository.java?view=diff&rev=536577&r1=536576&r2=536577
==============================================================================
--- incubator/nmaven/branches/SI_XPT/components/dotnet-vendor/src/main/java/org/apache/maven/dotnet/vendor/VendorInfoRepository.java (original)
+++ incubator/nmaven/branches/SI_XPT/components/dotnet-vendor/src/main/java/org/apache/maven/dotnet/vendor/VendorInfoRepository.java Wed May  9 09:30:40 2007
@@ -88,12 +88,13 @@
      * @param vendorInfo the vendor info
      * @return file pointing to the .NET framework installation root used for compiling artifacts
      * @throws org.apache.maven.dotnet.PlatformUnsupportedException
+     *
      */
     File getInstallRootFor( VendorInfo vendorInfo )
         throws PlatformUnsupportedException;
 
     /**
-     *  Returns file pointing to the .NET SDK installation root used for compiling artifacts.
+     * Returns file pointing to the .NET SDK installation root used for compiling artifacts.
      *
      * @param vendorInfo the vendor info
      * @return file pointing to the .NET SDK installation root used for compiling artifacts
@@ -108,5 +109,17 @@
      * @return true if this repository exists (and can be used), otherwise returns false
      */
     boolean exists();
+
+    /**
+     *
+     * 
+     * @param vendor
+     * @param frameworkVersion
+     * @param artifactType
+     * @return
+     * @throws PlatformUnsupportedException
+     */
+    File getGlobalAssemblyCacheDirectoryFor( Vendor vendor, String frameworkVersion, String artifactType )
+        throws PlatformUnsupportedException;
 
 }

Modified: incubator/nmaven/branches/SI_XPT/components/dotnet-vendor/src/main/java/org/apache/maven/dotnet/vendor/impl/SettingsRepository.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_XPT/components/dotnet-vendor/src/main/java/org/apache/maven/dotnet/vendor/impl/SettingsRepository.java?view=diff&rev=536577&r1=536576&r2=536577
==============================================================================
--- incubator/nmaven/branches/SI_XPT/components/dotnet-vendor/src/main/java/org/apache/maven/dotnet/vendor/impl/SettingsRepository.java (original)
+++ incubator/nmaven/branches/SI_XPT/components/dotnet-vendor/src/main/java/org/apache/maven/dotnet/vendor/impl/SettingsRepository.java Wed May  9 09:30:40 2007
@@ -175,7 +175,7 @@
      * @return the install root for the .NET framework
      * @throws org.apache.maven.dotnet.PlatformUnsupportedException if there is no install root found for the specified parameters
      */
-    File getInstallRootFor( String vendor, String vendorVersion, String frameworkVersion )
+    public File getInstallRootFor( String vendor, String vendorVersion, String frameworkVersion )
         throws PlatformUnsupportedException
     {
         if ( vendor == null || vendorVersion == null || frameworkVersion == null )

Modified: incubator/nmaven/branches/SI_XPT/components/dotnet-vendor/src/main/java/org/apache/maven/dotnet/vendor/impl/VendorInfoRepositoryImpl.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_XPT/components/dotnet-vendor/src/main/java/org/apache/maven/dotnet/vendor/impl/VendorInfoRepositoryImpl.java?view=diff&rev=536577&r1=536576&r2=536577
==============================================================================
--- incubator/nmaven/branches/SI_XPT/components/dotnet-vendor/src/main/java/org/apache/maven/dotnet/vendor/impl/VendorInfoRepositoryImpl.java (original)
+++ incubator/nmaven/branches/SI_XPT/components/dotnet-vendor/src/main/java/org/apache/maven/dotnet/vendor/impl/VendorInfoRepositoryImpl.java Wed May  9 09:30:40 2007
@@ -22,6 +22,7 @@
 import org.apache.maven.dotnet.vendor.VendorInfo;
 import org.apache.maven.dotnet.vendor.VendorInfoMatchPolicy;
 import org.apache.maven.dotnet.vendor.InvalidVersionFormatException;
+import org.apache.maven.dotnet.vendor.Vendor;
 import org.apache.maven.dotnet.registry.RepositoryRegistry;
 import org.apache.maven.dotnet.PlatformUnsupportedException;
 
@@ -29,6 +30,7 @@
 import java.util.Collections;
 import java.util.ArrayList;
 import java.util.Set;
+import java.util.HashSet;
 import java.io.File;
 
 import org.codehaus.plexus.logging.LogEnabled;
@@ -92,7 +94,8 @@
     {
         SettingsRepository settingsRepository = (SettingsRepository) repositoryRegistry.find( "nmaven-settings" );
         return settingsRepository.getSdkInstallRootFor( vendorInfo.getVendor().getVendorName(),
-                                                     vendorInfo.getVendorVersion(), vendorInfo.getFrameworkVersion() );
+                                                        vendorInfo.getVendorVersion(),
+                                                        vendorInfo.getFrameworkVersion() );
     }
 
     /**
@@ -182,5 +185,72 @@
             }
         }
         return true;
+    }
+
+    public File getGlobalAssemblyCacheDirectoryFor( Vendor vendor, String frameworkVersion, String artifactType )
+        throws PlatformUnsupportedException
+    {
+        if ( artifactType.equals( "gac_generic" ) )
+        {
+            if ( vendor.equals( Vendor.MICROSOFT ) &&
+                ( frameworkVersion.equals( "2.0.50727" ) || frameworkVersion.equals( "3.0" ) ) )
+            {
+                return new File( "C:\\WINDOWS\\assembly\\GAC_MSIL\\" );
+            }
+            else if ( vendor.equals( Vendor.MICROSOFT ) && frameworkVersion.equals( "1.1.4322" ) )
+            {
+                return new File( "C:\\WINDOWS\\assembly\\GAC\\" );
+            }
+            else if ( vendor.equals( Vendor.MONO ) && exists() )
+            {
+                List<VendorInfo> vendorInfos =
+                    getVendorInfosFor( vendor.getVendorName(), null, frameworkVersion, true );
+                Set<String> vendorVersions = new HashSet<String>();
+                for ( VendorInfo vendorInfo : vendorInfos )
+                {
+                    vendorVersions.add( vendorInfo.getVendorVersion() );
+                }
+                String maxVersion;
+                try
+                {
+                    maxVersion = getMaxVersion( vendorVersions );
+                }
+                catch ( InvalidVersionFormatException e )
+                {
+                    throw new PlatformUnsupportedException( "NMAVEN-xxx-000: Invalid version format", e );
+                }
+
+                for ( VendorInfo vendorInfo : vendorInfos )
+                {
+                    if ( vendorInfo.getVendorVersion().equals( maxVersion ) )
+                    {
+                        File sdkInstallRoot = getSdkInstallRootFor( vendorInfo );
+                        File gacRoot = new File( sdkInstallRoot.getParentFile().getAbsolutePath() + "/lib/mono/gac" );
+                        if ( !gacRoot.exists() )
+                        {
+                            throw new PlatformUnsupportedException(
+                                "NMAVEN-xxx-000: The Mono GAC path does not exist: Path = " +
+                                    gacRoot.getAbsolutePath() );
+                        }
+                        return gacRoot;
+                    }
+                }
+                
+                //TODO: MONO Support for Linux (Separate file containg installs)
+            }
+        }
+        else if ( artifactType.equals( "gac" ) )
+        {
+            return new File( "C:\\WINDOWS\\assembly\\GAC\\" );
+        }
+        else if ( artifactType.equals( "gac_32" ) )
+        {
+            return new File( "C:\\WINDOWS\\assembly\\GAC_32\\" );
+        }
+        else if ( artifactType.equals( "gac_msil" ) )
+        {
+            return new File( "C:\\WINDOWS\\assembly\\GAC_MSIL\\" );
+        }
+        throw new PlatformUnsupportedException("NMAVEN-xxx-000: Could not locate a valid GAC");
     }
 }

Modified: incubator/nmaven/branches/SI_XPT/components/dotnet-vendor/src/test/java/org/apache/maven/dotnet/vendor/impl/VendorInfoRepositoryTestStub.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_XPT/components/dotnet-vendor/src/test/java/org/apache/maven/dotnet/vendor/impl/VendorInfoRepositoryTestStub.java?view=diff&rev=536577&r1=536576&r2=536577
==============================================================================
--- incubator/nmaven/branches/SI_XPT/components/dotnet-vendor/src/test/java/org/apache/maven/dotnet/vendor/impl/VendorInfoRepositoryTestStub.java (original)
+++ incubator/nmaven/branches/SI_XPT/components/dotnet-vendor/src/test/java/org/apache/maven/dotnet/vendor/impl/VendorInfoRepositoryTestStub.java Wed May  9 09:30:40 2007
@@ -3,6 +3,7 @@
 import org.apache.maven.dotnet.vendor.VendorInfoRepository;
 import org.apache.maven.dotnet.vendor.VendorInfo;
 import org.apache.maven.dotnet.vendor.InvalidVersionFormatException;
+import org.apache.maven.dotnet.vendor.Vendor;
 
 import org.apache.maven.dotnet.PlatformUnsupportedException;
 
@@ -20,6 +21,12 @@
     public boolean exists()
     {
         return true;
+    }
+
+    public File getGlobalAssemblyCacheDirectoryFor( Vendor vendor, String frameworkVersion, String artifactType )
+        throws PlatformUnsupportedException
+    {
+        return null;  
     }
 
     public File getInstallRootFor( VendorInfo vendorInfo )

Modified: incubator/nmaven/branches/SI_XPT/maven-dotnet.iml
URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_XPT/maven-dotnet.iml?view=diff&rev=536577&r1=536576&r2=536577
==============================================================================
--- incubator/nmaven/branches/SI_XPT/maven-dotnet.iml (original)
+++ incubator/nmaven/branches/SI_XPT/maven-dotnet.iml Wed May  9 09:30:40 2007
@@ -8,9 +8,6 @@
       <sourceFolder url="file://$MODULE_DIR$/archetypes/maven-archetype-netexecutable/src/main/resources/archetype-resources/src/main/java" isTestSource="false" />
       <sourceFolder url="file://$MODULE_DIR$/assemblies/NMaven.Core/src/main/csharp" isTestSource="false" />
       <sourceFolder url="file://$MODULE_DIR$/assemblies/NMaven.Core/src/test/csharp" isTestSource="true" />
-      <sourceFolder url="file://$MODULE_DIR$/assemblies/NMaven.Plugin.Resx/src/main/csharp" isTestSource="false" />
-      <sourceFolder url="file://$MODULE_DIR$/assemblies/NMaven.Plugin.Settings/src/main/csharp" isTestSource="false" />
-      <sourceFolder url="file://$MODULE_DIR$/assemblies/NMaven.Plugin.Solution/src/main/csharp" isTestSource="false" />
       <sourceFolder url="file://$MODULE_DIR$/components/dotnet-artifact/src/main/java" isTestSource="false" />
       <sourceFolder url="file://$MODULE_DIR$/components/dotnet-artifact/src/main/resources" isTestSource="false" />
       <sourceFolder url="file://$MODULE_DIR$/components/dotnet-assembler/src/main/java" isTestSource="false" />
@@ -61,11 +58,10 @@
       <sourceFolder url="file://$MODULE_DIR$/integration-tests/tests/it0021/src/main/vb" isTestSource="false" />
       <sourceFolder url="file://$MODULE_DIR$/integration-tests/tests/it0022/src/main/csharp" isTestSource="false" />
       <sourceFolder url="file://$MODULE_DIR$/integration-tests/tests/it0025/it/test1/src/main/csharp" isTestSource="false" />
-      <sourceFolder url="file://$MODULE_DIR$/net-plugins/NMaven.Plugin.Generator/src/main/java" isTestSource="false" />
       <sourceFolder url="file://$MODULE_DIR$/plugins/NMaven.Plugin.Settings/src/main/java" isTestSource="false" />
-      <sourceFolder url="file://$MODULE_DIR$/plugins/maven-archetype-plugin/src/main/java" isTestSource="false" />
       <sourceFolder url="file://$MODULE_DIR$/plugins/maven-compile-plugin/src/main/java" isTestSource="false" />
       <sourceFolder url="file://$MODULE_DIR$/plugins/maven-compile-plugin/src/main/resources" isTestSource="false" />
+      <sourceFolder url="file://$MODULE_DIR$/plugins/maven-deploy-plugin/src/main/java" isTestSource="false" />
       <sourceFolder url="file://$MODULE_DIR$/plugins/maven-embedder-plugin/src/main/java" isTestSource="false" />
       <sourceFolder url="file://$MODULE_DIR$/plugins/maven-install-plugin/src/main/java" isTestSource="false" />
       <sourceFolder url="file://$MODULE_DIR$/plugins/maven-link-plugin/src/main/java" isTestSource="false" />
@@ -73,8 +69,6 @@
       <sourceFolder url="file://$MODULE_DIR$/plugins/maven-resgen-plugin/src/main/java" isTestSource="false" />
       <sourceFolder url="file://$MODULE_DIR$/plugins/maven-resolver-plugin/src/main/java" isTestSource="false" />
       <sourceFolder url="file://$MODULE_DIR$/plugins/maven-sdaddin-plugin/src/main/java" isTestSource="false" />
-      <sourceFolder url="file://$MODULE_DIR$/plugins/maven-settings-plugin/src/main/java" isTestSource="false" />
-      <sourceFolder url="file://$MODULE_DIR$/plugins/maven-solution-plugin/src/main/java" isTestSource="false" />
       <sourceFolder url="file://$MODULE_DIR$/plugins/maven-test-plugin/src/main/java" isTestSource="false" />
       <sourceFolder url="file://$MODULE_DIR$/plugins/maven-test-plugin/src/main/resources" isTestSource="false" />
       <sourceFolder url="file://$MODULE_DIR$/plugins/maven-vsi-plugin/src/main/java" isTestSource="false" />
@@ -453,15 +447,6 @@
       <library>
         <CLASSES>
           <root url="jar://$localRepository$/junit/junit/3.8.1/junit-3.8.1.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library">
-      <library>
-        <CLASSES>
-          <root url="jar://$localRepository$/org/codehaus/plexus/plexus-container-default/1.0-alpha-9/plexus-container-default-1.0-alpha-9.jar!/" />
         </CLASSES>
         <JAVADOC />
         <SOURCES />

Modified: incubator/nmaven/branches/SI_XPT/plugins/maven-compile-plugin/src/main/java/org/apache/maven/dotnet/plugin/compile/SourceProcessorMojo.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_XPT/plugins/maven-compile-plugin/src/main/java/org/apache/maven/dotnet/plugin/compile/SourceProcessorMojo.java?view=diff&rev=536577&r1=536576&r2=536577
==============================================================================
--- incubator/nmaven/branches/SI_XPT/plugins/maven-compile-plugin/src/main/java/org/apache/maven/dotnet/plugin/compile/SourceProcessorMojo.java (original)
+++ incubator/nmaven/branches/SI_XPT/plugins/maven-compile-plugin/src/main/java/org/apache/maven/dotnet/plugin/compile/SourceProcessorMojo.java Wed May  9 09:30:40 2007
@@ -86,7 +86,7 @@
         throws MojoExecutionException
     {
         long startTime = System.currentTimeMillis();
-        
+
         if ( !new File( sourceDirectory ).exists() )
         {
             getLog().info( "NMAVEN-904-001: No source files to copy" );
@@ -121,13 +121,17 @@
         directoryScanner.scan();
         String[] files = directoryScanner.getIncludedFiles();
         getLog().info( "NMAVEN-904-002: Copying source files: From = " + sourceDirectory + ",  To = " +
-            outputDirectory + ", File Count = " + files.length);
+            outputDirectory + ", File Count = " + files.length );
         for ( String file : files )
         {
             try
             {
-                FileUtils.copyFile( new File( sourceDirectory + File.separator + file ),
-                                    new File( outputDirectory + File.separator + file ) );
+                File sourceFile = new File( sourceDirectory + File.separator + file );
+                File targetFile = new File( outputDirectory + File.separator + file );
+                if ( sourceFile.lastModified() > targetFile.lastModified() )
+                {
+                    FileUtils.copyFile( sourceFile, targetFile );
+                }
             }
             catch ( IOException e )
             {

Modified: incubator/nmaven/branches/SI_XPT/plugins/maven-compile-plugin/src/main/java/org/apache/maven/dotnet/plugin/compile/TestSourceProcessorMojo.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_XPT/plugins/maven-compile-plugin/src/main/java/org/apache/maven/dotnet/plugin/compile/TestSourceProcessorMojo.java?view=diff&rev=536577&r1=536576&r2=536577
==============================================================================
--- incubator/nmaven/branches/SI_XPT/plugins/maven-compile-plugin/src/main/java/org/apache/maven/dotnet/plugin/compile/TestSourceProcessorMojo.java (original)
+++ incubator/nmaven/branches/SI_XPT/plugins/maven-compile-plugin/src/main/java/org/apache/maven/dotnet/plugin/compile/TestSourceProcessorMojo.java Wed May  9 09:30:40 2007
@@ -84,8 +84,12 @@
         {
             try
             {
-                FileUtils.copyFile( new File( sourceDirectory + File.separator + file ),
-                                    new File( outputDirectory + File.separator + file ) );
+                File sourceFile = new File( sourceDirectory + File.separator + file );
+                File targetFile = new File( outputDirectory + File.separator + file );
+                if ( sourceFile.lastModified() > targetFile.lastModified() )
+                {
+                    FileUtils.copyFile( sourceFile, targetFile );
+                }
             }
             catch ( IOException e )
             {

Modified: incubator/nmaven/branches/SI_XPT/plugins/maven-resolver-plugin/src/main/java/org/apache/maven/dotnet/plugin/resolver/NetDependencyResolverMojo.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_XPT/plugins/maven-resolver-plugin/src/main/java/org/apache/maven/dotnet/plugin/resolver/NetDependencyResolverMojo.java?view=diff&rev=536577&r1=536576&r2=536577
==============================================================================
--- incubator/nmaven/branches/SI_XPT/plugins/maven-resolver-plugin/src/main/java/org/apache/maven/dotnet/plugin/resolver/NetDependencyResolverMojo.java (original)
+++ incubator/nmaven/branches/SI_XPT/plugins/maven-resolver-plugin/src/main/java/org/apache/maven/dotnet/plugin/resolver/NetDependencyResolverMojo.java Wed May  9 09:30:40 2007
@@ -23,6 +23,8 @@
 import org.apache.maven.plugin.AbstractMojo;
 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.artifact.factory.ArtifactFactory;
@@ -37,6 +39,7 @@
 import org.apache.maven.dotnet.artifact.NetDependenciesRepository;
 import org.apache.maven.dotnet.artifact.NetDependencyMatchPolicy;
 import org.apache.maven.dotnet.artifact.ArtifactContext;
+import org.apache.maven.dotnet.artifact.ArtifactType;
 import org.apache.maven.dotnet.model.netdependency.NetDependency;
 import org.apache.maven.dotnet.executable.NetExecutable;
 import org.apache.maven.dotnet.executable.ExecutionException;
@@ -110,6 +113,11 @@
     /**
      * @component
      */
+    private ArtifactInstaller artifactInstaller;
+
+    /**
+     * @component
+     */
     private ArtifactContext artifactContext;
 
     public void execute()
@@ -157,7 +165,7 @@
         matchPolicies.add( new ProfileMatchPolicy( profile ) );
         dependencies.addAll( repository.getDependenciesFor( matchPolicies ) );
         getLog().info( "NMAVEN-1600-001: Found net dependencies: Number = " + dependencies.size() );
-                                                                                                                                                          
+
         if ( localRepository == null )
         {
             localRepository = new File( System.getProperty( "user.home" ), ".m2/repository" ).getAbsolutePath();
@@ -177,6 +185,32 @@
             throw new MojoExecutionException( "NMAVEN-1600-003: Unable to resolve assemblies", e );
         }
 
+        //Do Library Installs for Net Dependencies
+        artifactContext.init( project, new File( localRepository ) );
+        matchPolicies = new ArrayList<NetDependencyMatchPolicy>();
+        matchPolicies.add( new ProfileMatchPolicy( profile ) );
+        matchPolicies.add( new ExecutableAndNetPluginMatchPolicy() );
+        for ( Dependency dependency : repository.getDependenciesFor( matchPolicies ) )
+        {
+            Artifact artifact = artifactFactory.createBuildArtifact( dependency.getGroupId(),
+                                                                     dependency.getArtifactId(),
+                                                                     dependency.getVersion(), dependency.getType() );
+
+            try
+            {
+                artifactContext.getArtifactInstaller().resolveAndInstallLibraryDependenciesFor( artifact, pomFile );
+
+            }
+            catch ( ArtifactNotFoundException e )
+            {
+               throw new MojoExecutionException( "", e );
+            }
+            catch ( ArtifactInstallationException e )
+            {
+                throw new MojoExecutionException( "", e );
+            }
+        }
+
         //Do GAC Install, if needed
         //TODO: Add in the dependencies from the MOJO config
         artifactContext.init( project, new File( localRepository ) );
@@ -226,7 +260,6 @@
         return commands;
     }
 
-
     private class GacMatchPolicy
         implements NetDependencyMatchPolicy
     {
@@ -241,6 +274,16 @@
         public boolean match( NetDependency netDependency )
         {
             return netDependency.isIsGacInstall() == isGacInstall;
+        }
+    }
+
+    private class ExecutableAndNetPluginMatchPolicy
+        implements NetDependencyMatchPolicy
+    {
+        public boolean match( NetDependency netDependency )
+        {
+            return netDependency.getType().equals( ArtifactType.EXE.getPackagingType() ) ||
+                netDependency.getType().equals( ArtifactType.NETPLUGIN.getPackagingType() );
         }
     }
 



Mime
View raw message