ferstl / depgraph-maven-plugin

A Maven plugin that generates dependency graphs in various formats (DOT, GML, PlantUML, JSON and Text)
Apache License 2.0
561 stars 85 forks source link

not working with minimal pom.xml #92

Closed ING-Martin closed 5 years ago

ING-Martin commented 5 years ago

Hi,

to be honest I'm really not a genius in using maven. But I think the plugin should work if I use this pom.xml

<project>
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.mycompany.app</groupId>
  <artifactId>my-app</artifactId>
  <version>1</version>
  <build>
  <plugins>
    <plugin>
      <groupId>com.github.ferstl</groupId>
      <artifactId>depgraph-maven-plugin</artifactId>  
      <version>3.2.2</version>  
    </plugin>
  </plugins>
  </build>
</project>

But it's not.

[ERROR] Failed to execute goal com.github.ferstl:depgraph-maven-plugin:3.2.2:graph (default-cli) on project my-app: Execution default-cli of goal com.github.ferstl:depgraph-maven-plugin:3.2.2:graph failed: A required class was missing while executing com.github.ferstl:depgraph-maven-plugin:3.2.2:graph: org/eclipse/aether/graph/DependencyVisitor [ERROR] -----------------------------------------------------

Do you have any suggestion for me? I'm not using "eclipse" so no eclipse-dependencys in my local maven-repo.

Thanks in Advance and please apologize my English. It's not my mothers tongue.

ferstl commented 5 years ago

Could you please tell me which Maven version you are using:

mvn --version

It looks like you are using a Maven version < 3.1.0 which the depgraph-maven-plugin does not support. Maven (and this plugin) does internally use a library called "Aether" to handle dependency resolution. This library is hosted by the Eclipse Foundation and has nothing to do with the Eclipse IDE. The reason why the plugin is not working with older Maven versions is that Aether was originally hosted by Sonatype and used different package names.

ING-Martin commented 5 years ago

Thanks a lot for your fast reply! I've switched to a newer version an it works like a charm now!

ferstl commented 5 years ago

I'll adjust the <prerequisites> of the plugin to version 3.1.0. Then the build with older maven versions will fail with a better error message.

ING-Martin commented 5 years ago

very good idea!

Thanks for your support!