Thanks - that did the trick. Set the dependency resolution to 'compile' and I'm now able to get the JARs I need.
-----Original Message----- From: dan tran [mailto:[EMAIL PROTECTED] Sent: Friday, January 06, 2006 2:36 PM To: Maven Users List Subject: Re: [m2] Artifacts not available during the generate-sources phase? Add this to your mojo's annotation to allow your mojo to see all dependencies as if it is in test phase @requiresDependencyResolution test On 1/6/06, Allan Lewis <[EMAIL PROTECTED]> wrote: > > The following code in a Mojo: > > > > or (Iterator i = project.getArtifacts().iterator(); i.hasNext();) { > > Artifact a = (Artifact) i.next(); > > System.out.println(a.getFile()); > > } > > > > Produces a list of artifact files if executed during the 'test' phase, > but not during the 'compile-sources' phase. Why is this? We have a > code generator that may possibly need to reference resources in > dependency JAR files, but I cannot see a way to do this if there are no > artifacts available (in any scope) during this phase of the lifecycle. > > > > Thanks in advance. > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]