It depends on what you'll do with ${project.artifacts}...
I usually just create several artifact stubs into a List and inject the
list into the plugin bec that's all what my plugin needed. Your plugin
may need the actual jars or even poms, which is still doable with stubs
but requires more effort.
Hope that helped.
^_^
Matthew Beermann wrote:
So, I've written a Mojo that I want to write some test cases for. I found the
AbstractMojoTestCase in the maven-plugin-testing-harness, and it works great -
up to a point. The problem is that my Mojo @requiresDependencyResolution. In
other words, I need the configuration items backed by ${plugin.artifacts} and
${project.artifacts} to exist with the resolved dependencies from the POM. And
of course, the AbstractMojoTestCase doesn't actually /run/ Maven, resolve any
dependencies, or any other lifecycle stuff.
Is there a straightforward way to make the resolution happen without needing to
reimplement large chunks of Maven in my test cases?
--Matthew
____________________________________________________________________________________
Do you Yahoo!?
Everyone is raving about the all-new Yahoo! Mail beta.
http://new.mail.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]