<requiresDependencyResolution>test</requiresDependencyResolution>
in the <mojo> tag. It can be either test (which gets everything needed to run tests, which is everything), runtime (gets compile and runtime) or compile (just compilation deps). - Brett [EMAIL PROTECTED] wrote: > Hi > > I take it that @requiresDependencyResolution is a 1.5 annotation for a java > mojo. For this perticular case, I do not have a Java mojo, only ant based. > > If I want to add that (requiresDependencyResolution) to my mojo.xxx.xml file, > how do I do that? > > Hermod > > -----Original Message----- > From: Brett Porter [mailto:[EMAIL PROTECTED] > Sent: Monday, April 03, 2006 10:30 AM > To: Maven Developers List > Subject: Re: Creating artifacts from Dependencies > > > IIUC, what you want is to use a variable populated with the expression: > > ${project.artifacts} > > This will be a collection of artifacts pre-constructed from the > transitive dependency closure of that project. > > Don't forget to add @requiresDependencyResolution to your mojo's > metadata as well to guarantee this occurs before your mojo's execution. > > Cheers, > Brett > > [EMAIL PROTECTED] wrote: >> Hi >> >> I am working on an ant task that takes creates a an ant classpath ref for >> the dependencies in a project. I have the project and dependencies, but need >> to create artifacts from the dependecies to get the filepath for the >> dependency. I could of course concatenate together this by using the >> available attributes from the dependency, but I feel that going trhough an >> artifact would be a cleaner way. I have tried to create a >> DefaultArtifactFactory, but I get a NPE when I call the createArtifact >> method. The NPE stems from : artifactHandlerManager.getArtifactHandler( >> type ); Looking at the code, there is no setter for the >> artifactHandlerManager so this will always be null. Is there another >> implementation/subclass of the DefaultArtifactFactory that I should use >> instead, or am I barking up the wrong tree here. >> >> Hermod >> >> >> * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * >> >> This email with attachments is solely for the use of the individual or >> entity to whom it is addressed. Please also be aware that the DnB NOR Group >> cannot accept any payment orders or other legally binding correspondence with >> customers as a part of an email. >> >> This email message has been virus checked by the virus programs used >> in the DnB NOR Group. >> >> * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]