I am having trouble getting artifacts from my project to add to a classpath
to pass to another module I am calling.  I looked at other plugins 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]

Reply via email to