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/05/11 19:21:33 UTC

svn commit: r537273 - in /incubator/nmaven/branches/SI_XPT: components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/impl/ plugins/maven-compile-plugin/src/main/java/org/apache/maven/dotnet/plugin/compile/ plugins/maven-resolver-plugin...

Author: sisbell
Date: Fri May 11 12:21:32 2007
New Revision: 537273

URL: http://svn.apache.org/viewvc?view=rev&rev=537273
Log:
Added back in setting the local repository path into two mojos. For some reason, the maven embedder is not injecting the local repo info into the fields. This caused the IDE to fail.

Modified:
    incubator/nmaven/branches/SI_XPT/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/impl/ArtifactInstallerImpl.java
    incubator/nmaven/branches/SI_XPT/components/dotnet-artifact/src/main/java/org/apache/maven/dotnet/artifact/impl/AssemblyResolverImpl.java
    incubator/nmaven/branches/SI_XPT/plugins/maven-compile-plugin/src/main/java/org/apache/maven/dotnet/plugin/compile/ComponentInitializerMojo.java
    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/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=537273&r1=537272&r2=537273
==============================================================================
--- 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 Fri May 11 12:21:32 2007
@@ -159,8 +159,8 @@
         matchPolicies.add( new ProfileMatchPolicy( profile ) );
         dependencies.addAll( repository.getDependenciesFor( matchPolicies ) );
 
-        ArtifactRepository localArtifactRepository =
-            new DefaultArtifactRepository( "local", "file://" + localRepository, new AssemblyRepositoryLayout() );
+        ArtifactRepository localArtifactRepository = new DefaultArtifactRepository( "local", "file://" +
+            localRepository.getAbsolutePath(), new AssemblyRepositoryLayout() );
 
         assemblyResolver.resolveTransitivelyFor( project, project.getArtifact(), dependencies,
                                                  remoteArtifactRepositories, localArtifactRepository, false );
@@ -416,7 +416,7 @@
         }
         catch ( FileNotFoundException e )
         {
-            throw new ArtifactNotFoundException( "", sourceArtifact );
+            throw new ArtifactNotFoundException( "NMAVEN-000-000: Unable to read pom", sourceArtifact );
         }
         MavenXpp3Reader reader = new MavenXpp3Reader();
         Model model;
@@ -426,12 +426,12 @@
         }
         catch ( XmlPullParserException e )
         {
-            throw new ArtifactNotFoundException( "", sourceArtifact );
+            throw new ArtifactNotFoundException( "NMAVEN-000-000: Unable to read model", sourceArtifact );
 
         }
         catch ( IOException e )
         {
-            throw new ArtifactNotFoundException( "", sourceArtifact );
+            throw new ArtifactNotFoundException( "NMAVEN-000-000: Unable to read model", sourceArtifact );
         }
         List<Dependency> sourceArtifactDependencies = model.getDependencies();
         localArtifactRepository =
@@ -459,7 +459,7 @@
         }
         catch ( ArtifactResolutionException e )
         {
-            throw new ArtifactNotFoundException( "", sourceArtifact );
+            throw new ArtifactNotFoundException( "NMAVEN-000-000: ", sourceArtifact );
         }
 
         //Do local installing of the dependencies into exe and netplugin repo directories

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=537273&r1=537272&r2=537273
==============================================================================
--- 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 Fri May 11 12:21:32 2007
@@ -118,13 +118,12 @@
             {
                 logger.debug(
                     "NMAVEN-000-000: GAC Dependency = " + artifact.getType() + ", ID = " + artifact.getArtifactId() );
-                artifact.setResolved( true );
                 gacDependencies.add( artifact );
             }
             else
             {
-                logger.info(
-                    "NMAVEN-000-000: Dependency = " + artifact.getType() + ", ID = " + artifact.getArtifactId() );
+                logger.info( "NMAVEN-000-000: Dependency: Type  = " + artifact.getType() + ", Artifact ID = " +
+                    artifact.getArtifactId() );
                 artifactDependencies.add( artifact );
             }
         }

Modified: incubator/nmaven/branches/SI_XPT/plugins/maven-compile-plugin/src/main/java/org/apache/maven/dotnet/plugin/compile/ComponentInitializerMojo.java
URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_XPT/plugins/maven-compile-plugin/src/main/java/org/apache/maven/dotnet/plugin/compile/ComponentInitializerMojo.java?view=diff&rev=537273&r1=537272&r2=537273
==============================================================================
--- incubator/nmaven/branches/SI_XPT/plugins/maven-compile-plugin/src/main/java/org/apache/maven/dotnet/plugin/compile/ComponentInitializerMojo.java (original)
+++ incubator/nmaven/branches/SI_XPT/plugins/maven-compile-plugin/src/main/java/org/apache/maven/dotnet/plugin/compile/ComponentInitializerMojo.java Fri May 11 12:21:32 2007
@@ -90,9 +90,14 @@
     {
         long startTime = System.currentTimeMillis();
 
+        if ( localRepository == null )
+        {
+            localRepository = new File( System.getProperty( "user.home" ), ".m2/repository" ).getAbsolutePath();
+        }
+
         ArtifactRepository localArtifactRepository =
             new DefaultArtifactRepository( "local", "file://" + localRepository, new AssemblyRepositoryLayout() );
-
+        System.out.println( "LR =" + localArtifactRepository );
         try
         {
             assemblyResolver.resolveTransitivelyFor( project, project.getArtifact(), project.getDependencies(),

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=537273&r1=537272&r2=537273
==============================================================================
--- 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 Fri May 11 12:21:32 2007
@@ -123,6 +123,11 @@
             return;
         }
 
+        if ( localRepository == null )
+        {
+            localRepository = new File( System.getProperty( "user.home" ), ".m2/repository" ).getAbsolutePath();
+        }
+
         String profile = System.getProperty( "dependencyProfile" );
 
         RepositoryRegistry repositoryRegistry;