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.
>
>
>

Reply via email to