Bug 197669 - maven-compat > aether-api dep not recognized until maven-core-3.0.3.pom downloaded
maven-compat > aether-api dep not recognized until maven-core-3.0.3.pom downl...
Status: VERIFIED FIXED
Product: projects
Classification: Unclassified
Component: Maven
7.0
PC Linux
: P3 (vote)
: 7.0.1
Assigned To: Jesse Glick
issues@projects
701patch1-fixed
:
Depends on:
Blocks: 172502 189442
  Show dependency treegraph
 
Reported: 2011-04-12 14:55 UTC by Jesse Glick
Modified: 2011-09-26 13:36 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2011-04-12 14:55:30 UTC
With empty local repo, 'mvn -f maven3/pom.xml test-compile' to retrieve external dependencies; open maven-core, aether-api, maven-compat. maven-core-3.0.3.jar appears as a missing project dep, as expected: local source project location known, but POM not in local repo. Yet the transitive dependencies such as aether-api-1.11.jar are not shown under Dependencies, and classes like DefaultArtifactDeployer making use of those transitive deps like MergeableMetadata are shown as erroneous. Reloading the maven-compat project does not help.

Workaround is to run a build (e.g. test-compile) on maven-compat in isolation (not inside the reactor) so that maven-core-3.0.3.pom installed in local repo, at which point transitive deps are loaded and the project looks fine. Perhaps ArtifactFixer is producing the POM from the source project but its dependencies such as

    <dependency>
      <groupId>org.sonatype.aether</groupId>
      <artifactId>aether-api</artifactId>
      <version>${aetherVersion}</version>
    </dependency>

cannot be resolved?
Comment 1 Jesse Glick 2011-08-03 23:28:05 UTC
Another example: even if glassfish/appserver/web/web-embed/impl knows where glassfish/appserver/web/web-glue is, it does not find transitive dependencies from it unless web-glue is actually built.
Comment 2 Jesse Glick 2011-08-05 20:15:40 UTC
Same as bug #189442 #3, which is regressed. Seems RepositorySystem.resolve is called for the parent, but not for a dependency?
Comment 3 Jesse Glick 2011-08-08 16:26:11 UTC
Seems that as of 3.0b3, LocalArtifactRepository is ignored (effectively deprecated?), in favor of a new WorkspaceReader.
Comment 4 Jesse Glick 2011-08-08 16:50:12 UTC
core-main #56e3a9999a03
Comment 5 Quality Engineering 2011-08-10 21:32:32 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/56e3a9999a03
User: Jesse Glick <jglick@netbeans.org>
Log: #197669: maven-compat > aether-api dep not recognized until maven-core-3.0.3.pom downloaded
Comment 6 Jesse Glick 2011-08-25 15:34:53 UTC
More conservative but functionally similar patch backported: releases #e1d5d69faada

Fuller description of test case:

- delete local repo
- test-compile in maven3
- open sonatype-aether root POM, then open all submodules
- open maven3 root POM, then open all submodules
- wait for scanning to complete
- expect Dependencies under maven-compat to include Aether libs
- expect compiler errors to be limited to missing third-party JARs (JUnit etc.)
Comment 7 Quality Engineering 2011-08-26 04:27:49 UTC
Integrated into 'releases'
Changeset: http://hg.netbeans.org/releases/rev/e1d5d69faada
User: Jesse Glick <jglick@netbeans.org>
Log: #197669: maven-compat > aether-api dep not recognized until maven-core-3.0.3.pom downloaded
(Adapted from 56e3a9999a03, but not transplanted directly, to avoid API change.)
Comment 8 Quality Engineering 2011-09-26 13:36:19 UTC
Integrated into 'releases'
Changeset: http://hg.netbeans.org/releases/rev/0cfc6eac91fd
User: Jesse Glick <jglick@netbeans.org>
Log: #197669: maven-compat > aether-api dep not recognized until maven-core-3.0.3.pom downloaded
(Adapted from 56e3a9999a03, but not transplanted directly, to avoid API change.)


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo