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