Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aether-users] resolving a POM with systemPaths

Michael Guymon wrote:

Here is the test that shows a pom with a broken systemPath dep returns
no dependencies besides itself. The test correctly resolves a test pom
with a compile dependency:

https://github.com/mguymon/naether/blob/master/src/test/java/com/slackworks/naether/SystemPathDependencyTest.java

OK, executing the test as is, I don't see your previous statement
  "Aether is not stopping to toss an invalid artifact exception"
being true. Aether notifies you of the invalid POM by firing an *event* to your RepositoryListener but it does not throw an exception and continues gracefully with the dependency collection. So the option isIgnoreInvalidArtifactDescriptor appears to work as designed. Please let me know if I misunderstood your test case.

Furthermore, the handling of POMs is black and white, they are either valid and allow retrieval of all declared dependencies or are invalid and prevent retrieval of any declared dependency. I.e. there is no best effort/guessing to extract some dependency information and navigate around broken bits. As such your test cannot expect to get logback etc. out of this invalid POM.

As explained before, if you want to get those dependencies, you would have to make the maven-aether-provider consider the POM valid by providing the missing project.basedir property.


Benjamin


Back to the top