incubator-nmaven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sisb...@apache.org
Subject svn commit: r560842 - /incubator/nmaven/trunk/components/dotnet-dao/project/src/main/java/org/apache/maven/dotnet/dao/impl/ProjectDaoImpl.java
Date Mon, 30 Jul 2007 02:15:11 GMT
Author: sisbell
Date: Sun Jul 29 19:15:11 2007
New Revision: 560842

URL: http://svn.apache.org/viewvc?view=rev&rev=560842
Log:
Fixed issues in the repository builder (for tar files).

Modified:
    incubator/nmaven/trunk/components/dotnet-dao/project/src/main/java/org/apache/maven/dotnet/dao/impl/ProjectDaoImpl.java

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=560842&r1=560841&r2=560842
==============================================================================
--- 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
Sun Jul 29 19:15:11 2007
@@ -444,7 +444,7 @@
                                     ProjectFactory.createArtifactFrom( projectDependency,
artifactFactory );
                                 artifactDependencies.add( assembly );
                                 artifactDependencies.addAll( this.storeProjectAndResolveDependencies(
projectDependency,
-                                                                                        
             null,
+                                                                                        
             localRepository,
                                                                                         
             artifactRepositories ) );
                             }
                         }
@@ -478,50 +478,52 @@
                         }
                         catch ( TransferFailedException e )
                         {
-                            throw new IOException(
-                                "NMAVEN-000-000a: Problem in resolving artifact: Assembly
Artifact Id = " +
-                                    assembly.getArtifactId() + ", Type = " + assembly.getType()
+ ", Message = " +
-                                    e.getMessage() );
+                            logger.info( "NMAVEN-000-000a: Problem in resolving artifact:
Assembly Artifact Id = " +
+                                assembly.getArtifactId() + ", Type = " + assembly.getType()
+ ", Message = " +
+                                e.getMessage() );
                         }
                         catch ( ResourceDoesNotExistException e )
                         {
-                            throw new IOException(
-                                "NMAVEN-000-000b: Problem in resolving artifact: Assembly
Artifact Id = " +
-                                    assembly.getArtifactId() + ", Type = " + assembly.getType()
+ ", Message = " +
-                                    e.getMessage() );
+                            logger.info( "NMAVEN-000-000b: Problem in resolving artifact:
Assembly Artifact Id = " +
+                                assembly.getArtifactId() + ", Type = " + assembly.getType()
+ ", Message = " +
+                                e.getMessage() );
                         }
 
-                        FileReader fileReader = new FileReader( pomArtifact.getFile() );
-
-                        MavenXpp3Reader reader = new MavenXpp3Reader();
-                        Model model;
-                        try
-                        {
-                            model = reader.read( fileReader );
-                        }
-                        catch ( XmlPullParserException e )
+                        if ( pomArtifact.getFile() != null && pomArtifact.getFile().exists()
)
                         {
-                            throw new IOException( "NMAVEN-000-000: Unable to read model:
Message = " + e.getMessage() +
-                                ", Path = " + pomArtifact.getFile().getAbsolutePath() );
+                            FileReader fileReader = new FileReader( pomArtifact.getFile()
);
 
-                        }
-                        catch ( EOFException e )
-                        {
-                            throw new IOException( "NMAVEN-000-000: Unable to read model:
Message = " + e.getMessage() +
-                                ", Path = " + pomArtifact.getFile().getAbsolutePath() );
-                        }
+                            MavenXpp3Reader reader = new MavenXpp3Reader();
+                            Model model;
+                            try
+                            {
+                                model = reader.read( fileReader );
+                            }
+                            catch ( XmlPullParserException 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:
Model: " +
-                                    model.getGroupId() + ":" + model.getArtifactId() + ":"
+ model.getVersion() +
-                                    ", Project: " + projectDependency.getGroupId() + ":"
+
-                                    projectDependency.getArtifactId() + ":" + projectDependency.getVersion()
);
+                            }
+                            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:
Model: " +
+                                        model.getGroupId() + ":" + model.getArtifactId()
+ ":" + model.getVersion() +
+                                        ", Project: " + projectDependency.getGroupId() +
":" +
+                                        projectDependency.getArtifactId() + ":" + projectDependency.getVersion()
);
+                            }
+                            modelDependencies.add( model );
                         }
-                        modelDependencies.add( model );
+
                     }
 
                     assembly.setFile( PathUtil.getUserAssemblyCacheFileFor( assembly, localRepository
) );



Mime
View raw message