I am trying to develop a plugin and get access to the MavenProject.  Here is my 
code:
    /**
     *  parameter expression="${project}"
     */
    private MavenProject mavenProject;

. . .
        if (mavenProject != null) {
            List repositories = mavenProject.getRepositories();
            for (Object object : repositories) {
                getLog().info(object.getClass().getName());
            }
        }
        else {
            getLog().info("no project");
        }

All I ever get printed out is the no project message. I also tried with artifact repository and get the same results. Here is my dependencies in my pom:
   <dependencies>
      <dependency>
         <groupId>org.apache.maven</groupId>
         <artifactId>maven-plugin-api</artifactId>
         <version>2.0</version>
      </dependency>
      <dependency>
         <groupId>org.apache.maven</groupId>
         <artifactId>maven-project</artifactId>
         <version>2.0</version>
      </dependency>
      <dependency>
         <groupId>org.apache.maven</groupId>
         <artifactId>maven-artifact</artifactId>
         <version>2.0</version>
      </dependency>
   </dependencies>

I would like any help on this that I could get. I need to get this code up and running I have several people waiting for this. I have read the book "Better Builds with Maven" and the MOJO Developer's handbook and can not seem to get this working.

thanks for your help in advance!

--
Mark Russell
Instantiations, Inc.
724-368-3331 (land line)
http://www.instantiations.com

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to