maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Richard Sand" <rs...@idfconnect.com>
Subject How to get an instance of MavenProjectHelper in a Maven3.0 plugin?
Date Tue, 09 Jul 2013 16:18:00 GMT
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
View raw message