Thanks that may be what I am looking for.
--
Regards,
Garvin LeClaire
[EMAIL PROTECTED]
On 2/26/07, Dan Tran <[EMAIL PROTECTED]> wrote:
you may also need this annotation for your mojo
*
@requiresDependencyResolution
*
On 2/26/07, Garvin LeClaire <[EMAIL PROTECTED]> wrote:
>
> I did try the .getCompileClasspathElements() also but had similar
> results. Is there some debugging secrets documented somewhere?
> I want to fix this bug in the Findbugs plugin and I do have other
> plugins that will have similar requirements.
>
>
>
>
> On 2/25/07, Dan Tran <[EMAIL PROTECTED] > wrote:
> >
> > this question belongs to user group ;-)
> >
> > by try this
> >
> > project
> > .getCompileClasspathElements()-D
> >
> >
> > On 2/25/07, Garvin LeClaire < [EMAIL PROTECTED] > wrote:
> >
> > >
> > > I am having trouble getting artifacts from my project. I would like
> > > to
> > > retrieve the dependencies to add to a classpath passed to another
> > > module
> > > I am calling. I looked at other plugins such as the compiler plugin
> > > and
> > > have tried to use similar code to no avail. My code looks like:
> > >
> > >
> > > /**
> > > * Maven Project
> > > *
> > > * @parameter expression="${project}"
> > > * @required
> > > * @readonly
> > > */
> > > private MavenProject project;
> > >
> > > [...}
> > >
> > > final Iterator iterator =
> > > this.getProject().getArtifacts().iterator();
> > >
> > > if ( iterator.hasNext () )
> > > {
> > > while ( iterator.hasNext () )
> > > {
> > > Artifact artifact = (Artifact) iterator.next();
> > > final String fileName =artifact.getFile
> > > ().getAbsolutePath();
> > > this.getLog ().info( " Adding to AuxClasspath " +
> > > fileName );
> > > findBugsProject.addAuxClasspathEntry( fileName );
> > >
> > > }
> > > }
> > > else
> > > {
> > > this.getLog().info( " Nothing to add to AuxClasspath "
> > > );
> > > }
> > >
> > >
> > > [...}
> > >
> > > /**
> > > * Returns the maven project.
> > > *
> > > * @return the maven project
> > > * @see org.apache.maven.reporting.AbstractMavenReport#getProject()
> > > */
> > > protected MavenProject getProject()
> > > {
> > > return this.project;
> > > }
> > >
> > >
> > > Does anyone have any insight or a reference to more documentation?
> > >
> > >
> > >
> > >
> > > --
> > >
> > > Regards,
> > >
> > >
> > >
> > > Garvin LeClaire
> > > [EMAIL PROTECTED]
> > >
> > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe from this list please visit:
> > >
> > > http://xircles.codehaus.org/manage_email
> > >
> > >
> >
>
>
> --
> Regards,
>
>
> Garvin LeClaire
> [EMAIL PROTECTED]
>