incubator-npanday-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lars Corneliussen (JIRA)" <j...@apache.org>
Subject [jira] [Created] (NPANDAY-562) [possible regression to NPANDAY-231] Resolving gac and system assemblies has to be revisited
Date Fri, 27 Apr 2012 11:23:59 GMT
Lars Corneliussen created NPANDAY-562:
-----------------------------------------

             Summary: [possible regression to NPANDAY-231] Resolving gac and system assemblies
has to be revisited
                 Key: NPANDAY-562
                 URL: https://issues.apache.org/jira/browse/NPANDAY-562
             Project: NPanday
          Issue Type: Bug
          Components: Maven Plugins
    Affects Versions: 1.5.0-incubating
            Reporter: Lars Corneliussen
             Fix For: 1.5.0-incubating


I'm not sure how important that code is.

{code}
                 // resolve system scope dependencies
                if ( projectDependency.getScope() != null && projectDependency.getScope().equals(
"system" ) )
                {
                    if ( projectDependency.getSystemPath() == null )
                    {
                        throw new ProjectDaoException( "systemPath required for System Scoped
dependencies " + "in Group ID = "
                            + projectDependency.getGroupId() + ", Artiract ID = " + projectDependency.getArtifactId()
);
                    }

                    File f = new File( projectDependency.getSystemPath() );

                    if ( !f.exists() )
                    {
                        throw new IOException( "Dependency systemPath File not found:"
                            + projectDependency.getSystemPath() + "in Group ID = " + projectDependency.getGroupId()
                            + ", Artiract ID = " + projectDependency.getArtifactId() );
                    }

                    assembly.setFile( f );
                    assembly.setResolved( true );
                    artifactDependencies.add( assembly );

                    projectDependency.setResolved( true );

                    logger.finer( "NPANDAY-180-011.1: Project Dependency Resolved: Artifact
ID = "
                        + projectDependency.getArtifactId() + ", Group ID = " + projectDependency.getGroupId()
                        + ", Version = " + projectDependency.getVersion() + ", Scope = " +
projectDependency.getScope()
                        + "SystemPath = " + projectDependency.getSystemPath()

                    );

                    continue;
                }
{code}

This does more then the current new GacResolver:

{code}      
                // resolve gac references
                // note: the old behavior of gac references, used to have system path properties
in the pom of the
                // project
                // now we need to generate the system path of the gac references so we can
use
                // System.getenv("SystemRoot")
                //we have already set file for the assembly above (in createArtifactFrom)
so we do not need re-resovle it
                if ( !projectDependency.isResolved() )
                {
                    if ( ArtifactTypeHelper.isDotnetAnyGac( projectDependency.getArtifactType()
) )
                    {
                        try
                        {
                            if (assembly.getFile().exists())
                            {
                                projectDependency.setSystemPath( assembly.getFile().getAbsolutePath());
                                projectDependency.setResolved( true );
                                assembly.setResolved( true );
                            }
                            artifactDependencies.add( assembly );
                        }
                        catch ( ExceptionInInitializerError e )
                        {
                            logger.warning( "NPANDAY-180-516.82: Project Failed to Resolve
Dependency: Artifact ID = "
                                + projectDependency.getArtifactId() + ", Group ID = " + projectDependency.getGroupId()
                                + ", Version = " + projectDependency.getVersion() + ", Scope
= "
                                + projectDependency.getScope() + "SystemPath = " + projectDependency.getSystemPath()
);
                        }
                    }
                    else
                    {
                        try
                        {
                            // re-resolve snapshots
                            if ( !assembly.isSnapshot() )
                            {
                                Project dep =
                                    this.getProjectFor( projectDependency.getGroupId(), projectDependency.getArtifactId(),
                                                        projectDependency.getVersion(),
                                                        projectDependency.getArtifactType(),
                                                        projectDependency.getPublicKeyTokenId(),
localRepository, outputDir );
                                if ( dep.isResolved() )
                                {
                                    projectDependency = (ProjectDependency) dep;
                                    artifactDependencies.add( assembly );
                                    Set<Artifact> deps = this.storeProjectAndResolveDependencies(
projectDependency,
                                                                                         
        localRepository,
                                                                                         
        artifactRepositories,
                                                                                         
        cache, outputDir );
                                    artifactDependencies.addAll( deps );
                                }
                            }
                        }
                        catch ( ProjectDaoException e )
                        {
                            logger.log( Level.WARNING, e.getMessage() );
                            // safe to ignore: dependency not found
                        }
                    }
                }    
{code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message