janssk1 / maven-graph-plugin

Maven plugin that generates a dependency graph in graphml format
Apache License 2.0
50 stars 22 forks source link

let GraphMojo create target directory #2

Closed danielwegener closed 4 years ago

danielwegener commented 10 years ago

maven-graph-plugin crashes when it tries to build a graph for a submodule that does not yet contains a target directory. This seem to happen especially for modules of type 'pom'.

janssk1 commented 10 years ago

That's a known limitation. The plugin rrequires that all dependencies have been resolved before it runs. So you should make sure your project is build before running the plugin. That will also make sure the target directories exist.

danielwegener commented 9 years ago

Yeah but is there anything against this PR which creates the outputDirectory for a submodule that otherwise would never have one, even after dependency resolution and compile phase (like a submodule with packaging 'pom')?

GraphMojo.buildGraph tries to write to a file in the output directory anyway, so why shouldnt it try to create the output directory if it does not exist.

totemcaf commented 8 years ago

I agree that this feature is very welcome.

mario-pi commented 8 years ago

+1 for this feature

moriarty commented 6 years ago

+1 for this old pull request.

I saw had this error, then read the docs and ran

  1. mvn ... dependency:resolve then
  2. mvn ... package

To ensure that both the dependencies were resolved, and the project built... But I still had to create several target directories for modules that would otherwise not have one, as @danielwegener pointed out.