2 Replies Latest reply on Jul 19, 2016 6:46 AM by wisa

    Get dependencies of war artifact

    wisa Newbie

      Is it possible to get the dependency list from a war artifact? This code returns an single MavenResolvedArtifact with empty dependency list.

       

      Maven.resolver().resolve("groupId:artifactId:war:version").withTransitivity().asResolvedArtifact();

       

      In case of a jar artifact, I do get all the transitive dependencies.

       

      For war archives, it works if your start from the pom file like this, but I would like to this directly from the resolve method above.


      Maven.resolver().loadPomFromFile(...).importRuntimeDependencies().resolve().withTransitivity().asResolvedArtifact()

       

      I use version 2.2.2