Is this what you are looking for?
[1]
/**
* All dependencies that this project has, including transitive ones.
* Contents are lazily populated, so depending on what phases have run
dependencies in some scopes won't be included.
* eg. if only compile phase has run,
You need to add @requiresDependencyResolution test (or compile etc)
-Original Message-
From: 陈思淼 [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 17, 2008 10:44 AM
To: Maven Users List
Subject: How to get all dependecy in a mojo ?
My mojo extends AbstractWarMojo, I want to get all
I got the expect result.I use mvn compile myplugin:mojo to run my own task,
instead of mvn myplugin:mojo. It works.
Is it because the compile phase to load the dependency graph of the
project, even if I use @requiresDependencyResolution test it doesn't work.
2008/9/17 Brian E. Fox [EMAIL
Here is a snippet from something I'm currently working on. It can see the
transitive dependencies with getArtifacts().
in the mojo:
* @goal add-externalized-properties
* @phase process-resources
* @requiresDependencyResolution compile
*/
public class AddExternalizedPropertiesMojo extends