Closed danielwegener closed 4 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.
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.
I agree that this feature is very welcome.
+1 for this feature
+1 for this old pull request.
I saw had this error, then read the docs and ran
mvn ... dependency:resolve
thenmvn ... 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.
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'.