You are viewing a plain text version of this content. The canonical link for it is here.
Posted to npanday-dev@incubator.apache.org by Brett Porter <br...@apache.org> on 2011/01/07 07:00:29 UTC

Re: svn commit: r1045023 - /incubator/npanday/trunk/components/dotnet-dao-project/src/main/java/npanday/dao/impl/ProjectDaoImpl.java

Isn't this called later on?

I recall too much resolution caused performance problems before - I'm not sure why this needed to be added as well earlier on?

- Brett

On 13/12/2010, at 5:48 PM, jocaba@apache.org wrote:

> Author: jocaba
> Date: Mon Dec 13 06:48:54 2010
> New Revision: 1045023
> 
> URL: http://svn.apache.org/viewvc?rev=1045023&view=rev
> Log:
> [NPANDAY-351] NPanday does not respect the configured repository in the pom
> 
> Added artifact resolver to look up to remote repos for the dependencies that were skipped and could not be resolved from the local repositories
> 
> Modified:
>    incubator/npanday/trunk/components/dotnet-dao-project/src/main/java/npanday/dao/impl/ProjectDaoImpl.java
> 
> Modified: incubator/npanday/trunk/components/dotnet-dao-project/src/main/java/npanday/dao/impl/ProjectDaoImpl.java
> URL: http://svn.apache.org/viewvc/incubator/npanday/trunk/components/dotnet-dao-project/src/main/java/npanday/dao/impl/ProjectDaoImpl.java?rev=1045023&r1=1045022&r2=1045023&view=diff
> ==============================================================================
> --- incubator/npanday/trunk/components/dotnet-dao-project/src/main/java/npanday/dao/impl/ProjectDaoImpl.java (original)
> +++ incubator/npanday/trunk/components/dotnet-dao-project/src/main/java/npanday/dao/impl/ProjectDaoImpl.java Mon Dec 13 06:48:54 2010
> @@ -496,6 +496,30 @@ public final class ProjectDaoImpl
> 
>                 snapshotVersion = null;
> 
> +                if(!assembly.getFile().exists())
> +                {
> +                    
> +                    try
> +                    {                    
> +                     ArtifactRepository localArtifactRepository =
> +                        new DefaultArtifactRepository( "local", "file://" + localRepository,
> +                                                       new DefaultRepositoryLayout() );
> +                    
> +                    artifactResolver.resolve( assembly, artifactRepositories,
> +                                                      localArtifactRepository );
> +                    }
> +                    catch ( ArtifactNotFoundException e )
> +                    {
> +                        logger.info( "NPANDAY-181-121:  Problem in resolving assembly: " + assembly.toString()
> +                        + ", Message = " + e.getMessage() );
> +                    }
> +                    catch ( ArtifactResolutionException e )
> +                    {
> +                        logger.info( "NPANDAY-181-122: Problem in resolving assembly: " + assembly.toString()
> +                        + ", Message = " + e.getMessage() );
> +                    }
> +                }
> +                
>                 logger.info( "NPANDAY-180-011: Project Dependency: Artifact ID = "
>                     + projectDependency.getArtifactId() + ", Group ID = " + projectDependency.getGroupId()
>                     + ", Version = " + projectDependency.getVersion() + ", Artifact Type = "
> 
> 

--
Brett Porter
brett@apache.org
http://brettporter.wordpress.com/
http://au.linkedin.com/in/brettporter





Re: svn commit: r1045023 - /incubator/npanday/trunk/components/dotnet-dao-project/src/main/java/npanday/dao/impl/ProjectDaoImpl.java

Posted by Brett Porter <br...@apache.org>.
Just did a highly unscientific test of running each. Even though 1.2.1 had to download its artifacts (from a repo manager on the same network), it ran a minute faster than 1.3-incubating-SNAPSHOT for the trunk ITs.

Repeated runs / other machines may give different results, so it's certainly not conclusive, but worth checking if this is a problem. It *should* be quite a bit faster with the reduced file copying to do.

- Brett

On 10/01/2011, at 11:04 PM, Brett Porter wrote:

> 
> 
> On 10/01/2011, at 1:46 PM, Josimpson Ocaba wrote:
> 
>> This was added for the other remote repositories, because they were just skipping the other remote repositories and were not actually trying to resolve from their locations. 
> 
> This was breaking several integration tests, or is there a specific one to illustrate the case?
> 
> My point is that these tests worked in 1.2.1. Repeating this check doesn't look like the best way to accommodate the removal of the UAC because it will mean repeated resolution, which was a performance problem in the past.
> 
> Am I missing something?
> 
> - Brett
> 
> --
> Brett Porter
> brett@apache.org
> http://brettporter.wordpress.com/
> http://au.linkedin.com/in/brettporter
> 
> 
> 
> 

--
Brett Porter
brett@apache.org
http://brettporter.wordpress.com/
http://au.linkedin.com/in/brettporter





Re: svn commit: r1045023 - /incubator/npanday/trunk/components/dotnet-dao-project/src/main/java/npanday/dao/impl/ProjectDaoImpl.java

Posted by Brett Porter <br...@apache.org>.

On 10/01/2011, at 1:46 PM, Josimpson Ocaba wrote:

> This was added for the other remote repositories, because they were just skipping the other remote repositories and were not actually trying to resolve from their locations. 

This was breaking several integration tests, or is there a specific one to illustrate the case?

My point is that these tests worked in 1.2.1. Repeating this check doesn't look like the best way to accommodate the removal of the UAC because it will mean repeated resolution, which was a performance problem in the past.

Am I missing something?

- Brett

--
Brett Porter
brett@apache.org
http://brettporter.wordpress.com/
http://au.linkedin.com/in/brettporter





Re: svn commit: r1045023 - /incubator/npanday/trunk/components/dotnet-dao-project/src/main/java/npanday/dao/impl/ProjectDaoImpl.java

Posted by Josimpson Ocaba <jo...@maestrodev.com>.
This was added for the other remote repositories, because they were just skipping the other remote repositories and were not actually trying to resolve from their locations. 

-- 
Joe Ocaba 

----- Original Message ----- 
From: "Brett Porter" <br...@apache.org> 
To: npanday-dev@incubator.apache.org 
Sent: Friday, January 7, 2011 3:00:29 PM 
Subject: Re: svn commit: r1045023 - /incubator/npanday/trunk/components/dotnet-dao-project/src/main/java/npanday/dao/impl/ProjectDaoImpl.java 

Isn't this called later on? 

I recall too much resolution caused performance problems before - I'm not sure why this needed to be added as well earlier on? 

- Brett 

On 13/12/2010, at 5:48 PM, jocaba@apache.org wrote: 

> Author: jocaba 
> Date: Mon Dec 13 06:48:54 2010 
> New Revision: 1045023 
> 
> URL: http://svn.apache.org/viewvc?rev=1045023&view=rev 
> Log: 
> [NPANDAY-351] NPanday does not respect the configured repository in the pom 
> 
> Added artifact resolver to look up to remote repos for the dependencies that were skipped and could not be resolved from the local repositories 
> 
> Modified: 
> incubator/npanday/trunk/components/dotnet-dao-project/src/main/java/npanday/dao/impl/ProjectDaoImpl.java 
> 
> Modified: incubator/npanday/trunk/components/dotnet-dao-project/src/main/java/npanday/dao/impl/ProjectDaoImpl.java 
> URL: http://svn.apache.org/viewvc/incubator/npanday/trunk/components/dotnet-dao-project/src/main/java/npanday/dao/impl/ProjectDaoImpl.java?rev=1045023&r1=1045022&r2=1045023&view=diff 
> ============================================================================== 
> --- incubator/npanday/trunk/components/dotnet-dao-project/src/main/java/npanday/dao/impl/ProjectDaoImpl.java (original) 
> +++ incubator/npanday/trunk/components/dotnet-dao-project/src/main/java/npanday/dao/impl/ProjectDaoImpl.java Mon Dec 13 06:48:54 2010 
> @@ -496,6 +496,30 @@ public final class ProjectDaoImpl 
> 
> snapshotVersion = null; 
> 
> + if(!assembly.getFile().exists()) 
> + { 
> + 
> + try 
> + { 
> + ArtifactRepository localArtifactRepository = 
> + new DefaultArtifactRepository( "local", "file://" + localRepository, 
> + new DefaultRepositoryLayout() ); 
> + 
> + artifactResolver.resolve( assembly, artifactRepositories, 
> + localArtifactRepository ); 
> + } 
> + catch ( ArtifactNotFoundException e ) 
> + { 
> + logger.info( "NPANDAY-181-121: Problem in resolving assembly: " + assembly.toString() 
> + + ", Message = " + e.getMessage() ); 
> + } 
> + catch ( ArtifactResolutionException e ) 
> + { 
> + logger.info( "NPANDAY-181-122: Problem in resolving assembly: " + assembly.toString() 
> + + ", Message = " + e.getMessage() ); 
> + } 
> + } 
> + 
> logger.info( "NPANDAY-180-011: Project Dependency: Artifact ID = " 
> + projectDependency.getArtifactId() + ", Group ID = " + projectDependency.getGroupId() 
> + ", Version = " + projectDependency.getVersion() + ", Artifact Type = " 
> 
> 

-- 
Brett Porter 
brett@apache.org 
http://brettporter.wordpress.com/ 
http://au.linkedin.com/in/brettporter