You are viewing a plain text version of this content. The canonical link for it is here.
Posted to nmaven-commits@incubator.apache.org by si...@apache.org on 2007/07/24 15:48:30 UTC

svn commit: r559088 - /incubator/nmaven/branches/SI_GAC/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/impl/ArtifactContextImpl.java

Author: sisbell
Date: Tue Jul 24 08:48:29 2007
New Revision: 559088

URL: http://svn.apache.org/viewvc?view=rev&rev=559088
Log:
Standalone netplugins did not work due to the localrepo not being set. Added default one in this case.

Modified:
    incubator/nmaven/branches/SI_GAC/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/impl/ArtifactContextImpl.java

Modified: incubator/nmaven/branches/SI_GAC/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/impl/ArtifactContextImpl.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_GAC/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/impl/ArtifactContextImpl.java?view=diff&rev=559088&r1=559087&r2=559088
==============================================================================
--- incubator/nmaven/branches/SI_GAC/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/impl/ArtifactContextImpl.java (original)
+++ incubator/nmaven/branches/SI_GAC/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/impl/ArtifactContextImpl.java Tue Jul 24 08:48:29 2007
@@ -102,7 +102,8 @@
      */
     public File getLocalRepository()
     {
-        return new File( localRepository );
+        return ( localRepository != null ) ? new File( localRepository )
+            : new File( System.getProperty( "user.home" ), "/.m2/repository" );
     }
 
     /**
@@ -123,7 +124,7 @@
         List<Artifact> artifacts = repository.getArtifactsFor( groupId, artifactId, version, type );
         for ( Artifact artifact : artifacts )
         {
-            artifact.setFile( PathUtil.getUserAssemblyCacheFileFor( artifact, new File( localRepository ) ) );
+            artifact.setFile( PathUtil.getUserAssemblyCacheFileFor( artifact, getLocalRepository() ) );
         }
         return artifacts;
     }
@@ -156,7 +157,7 @@
             project.getBuild().getDirectory() ) );
     }
 
-     /**
+    /**
      * @see ArtifactContext#getNetModulesFor(org.apache.maven.artifact.Artifact)
      */
     //TODO: support temporarily removed