I am writing a plugin where I need to get all the dependency artifacts of a project including test scope and all of the transitive dependencies as well. project.artifacts seems to get me all the dependencies if I run the plugin in the install phase (I cannot run it before that), except it does not get me test scope dependencies and any transitive dependencies of these test scope dependencies. How do I get the transitive dependencies of everything?
I have also tried project.dependencyArtifacts which doesn’t seem to help. It gets the test scope direct dependency but not the transitive ones.
Working with maven 2.0.9
Posting for reference:
I had to set
@requiresDependencyResolution testwhich then included all the transitive dependencies. It was initially set toruntime. This fixed my issue.