maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hervé BOUTEMY <herve.bout...@free.fr>
Subject Re: access to MavenProject help
Date Tue, 02 Oct 2007 06:15:19 GMT
I see 1 typo that would explain the problem: parameter instead of @parameter

regards,

Hervé

Le mardi 2 octobre 2007, Mark Russell a écrit :
> 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!



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Mime
View raw message