gac dependencies

Mar 3, 2010 at 12:16 AM

I seem to be having issues resolving gac dependencies on npanday project.  

mvn install completes successfully but mvn release:prepare or mvn dependency:resolve complain the EnvDTE gac dependencies.  

It seems these were installed as type null rather than gac.  ArtifactType.getArtifactTypeForPackagingName doesn't seem to have a gac type so it defaults to null and PathUtil.getUserAssemblyCacheFileFor( Artifact artifact, File localRepository ) has the following: 

 ArtifactType artifactType = ArtifactType.getArtifactTypeForPackagingName( artifact.getType() );

        if(artifactType.equals( ArtifactType.NULL))

        {

            logger.warning( "NPANDAY-040-009: Artifact Type not recognized - Cannot get application file: Type = "

                + artifact.getType());

            return null;

        }

 

if(artifactType.equals( ArtifactType.NULL))
        {
            logger.warning( "NPANDAY-040-009: Artifact Type not recognized - Cannot get application file: Type = "
                + artifact.getType());
            return null;
        }E

What should be happening with gac types?

 

 

Mar 3, 2010 at 5:38 PM

I decided to add the missing ArtifactTypes and it looks like this resolved the issue.  Patch # 5440.

Coordinator
Mar 3, 2010 at 11:57 PM

thanks, I'll take a look

Coordinator
Mar 4, 2010 at 2:47 AM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.
Coordinator
Mar 4, 2010 at 2:56 AM

I applied the fix - thanks! It'd be helpful if you have a test case of some kind (best is an integration test) that we can use to validate the fix and to prevent regressions in future. Are you able to come up with a small project that reproduces the problem? 

Mar 4, 2010 at 7:22 AM

I originally saw this error on the npanday/trunk@40542

Delete ~/.m2/repository/EnvDTE

cd npanday 

mvn install -DskipTests=true 

mvn dependency:resolve

The problem occurs at install rather than resolution, but I wasn't quite sure where it was being installed and found the error based off the resolution error string.  I found that after adding the artifact type it was installed correctly and the resolution error was resolved.  I haven't looked at the integration test suite yet, but I think with a little digging probably can just create a unit test around whatever installed it in the first place.

 

Coordinator
Mar 4, 2010 at 12:17 PM
kurtharriger wrote:

I originally saw this error on the npanday/trunk@40542

Delete ~/.m2/repository/EnvDTE

cd npanday 

mvn install -DskipTests=true 

mvn dependency:resolve

The problem occurs at install rather than resolution, but I wasn't quite sure where it was being installed and found the error based off the resolution error string.  I found that after adding the artifact type it was installed correctly and the resolution error was resolved.  I haven't looked at the integration test suite yet, but I think with a little digging probably can just create a unit test around whatever installed it in the first place.

 

I think based on this that the problem might be because the pesky uac directory (and particularly the RDF repository underneath it) was not cleared. So the patch is good for the added robustness - I'm sure as we strive to get rid of those additional caches that the situation might further improve.

Mar 4, 2010 at 4:28 PM

I don't think so, at least once I blew away my entire .m2 folder and did a clean build with same issue.