maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Richard Sand" <rs...@idfconnect.com>
Subject RE: How to get an instance of MavenProjectHelper in a Maven3.0 plugin?
Date Tue, 09 Jul 2013 17:47:19 GMT
Ah, simple solutions... :-)

Now I'm onto the next similar problem, getting a JarArchiver. I'm getting 1) No implementation
for org.codehaus.plexus.archiver.jar.JarArchiver was bound. In the 2.0 plugin I'm attempting
to migrate, it has the comment-style annotation:

	 * @parameter expression="${component.org.codehaus.plexus.archiver.Archiver#jar}"

I tried using just @Component as well as @Component(role = org.codehaus.plexus.archiver.jar.JarArchiver.class)

Any clues?

Thanks again!

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


-----Original Message-----
From: Mirko Friedenhagen [mailto:mfriedenhagen@gmail.com] 
Sent: Tuesday, July 09, 2013 12:33 PM
To: Maven Users List
Subject: Re: How to get an instance of MavenProjectHelper in a Maven3.0 plugin?

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
>
>



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


Mime
View raw message