maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mirko Friedenhagen <mfriedenha...@gmail.com>
Subject Re: How to get an instance of MavenProjectHelper in a Maven3.0 plugin?
Date Tue, 09 Jul 2013 16:32:52 GMT
Hello,

I think @Component without a role is sufficient. Besides, I guess role
should be an interface and not the concrete class.
DefaultMavenProjectHelper is the implementation of MavenProjectHelper :-).

Regards Mirko
-- 
Sent from my mobile
On Jul 9, 2013 6:18 PM, "Richard Sand" <rsand@idfconnect.com> wrote:

> Hi all -
>
> I'm trying to write a Maven 3.0 plugin and cannot figure out how to get an
> instance of MavenProjectHelper.
>
> First, just taking a stab in the dark, I tried to get it the same way I got
> MavenProject, e.g. as a parameter populated by Maven:
>
>     @Parameter(defaultValue="${projecthelper}", required = true, readonly =
> true)
>     private MavenProjectHelper          mavenProjectHelper;
>
> That gave me the typical error message that the parameters
> 'mavenProjectHelper' are missing or invalid.
>
> I also tried values projectHelper and project.helper. Just stabs in the
> dark.
>
> Next I tried using DefaultMavenProjectHelper as a component:
>
>     /**
>      * The Maven project helper component
>      *
>      */
>
> @Component(role=org.apache.maven.project.DefaultMavenProjectHelper.class)
>     private MavenProjectHelper          mavenProjectHelper;
>
> But that gave me this error:
>
>     ERROR] 1) No implementation for
> org.apache.maven.project.DefaultMavenProjectHelper was bound.
>
> Any advice? Thanks!
>
> Richard Sand | CEO
> IDF Connect, Inc.
> 2207 Concord Ave, #359
> Wilmington | Delaware 19803 | USA
> Office: +1 302 425 0516 | Fax: +1 856 866 1899
> Mobile: +1 267 984 3651
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message