You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Michael Sena <mi...@gmail.com> on 2013/03/12 23:45:00 UTC

Plugin Testing?

Hi All,


Can anyone actually provide a link to a working example of the plugin testing framework?


I’m using maven 3.0.5, and have even tried compiling the snapshot 2.2-SNAPSHOT version of maven-plugin-testing-harness, but still receive errors about not being able to find the component in my demo pom.xml.


If I manually specify plexus-container-default as being version 1.5.5, then I get the error: “classRealm: none specified”.


I’ve tried checking for dependency duplicates and missing/undeclared dependencies, but correcting any issues has not yielded a fix.




Anyone?


Michael

RE: Plugin Testing?

Posted by Martin Gainty <mg...@hotmail.com>.
Michael

if you dont want to implement a isolated CL to be implemented by your project set 
<isolatedRealm>false</isolatedRealm>

Here is the doc from sonatype

isolatedRealm (deprecated) 

This is a legacy property which is no longer used by Maven. It is still present in the system to provide backwards compatibility with older plugins. Earlier versions of Maven used to provide a mechanism to load a plugin’s dependencies in an isolated ClassLoader. Maven makes extensive use of a project called ClassWorlds from the Codehaus community to create hierarchies of ClassLoader objects which are modeled by a ClassRealm object. Feel free to ignore this property and always set it to false.

Nota Bene: Have you ever moved a webapp say from Websphere to weblogic and all of a sudden you get a ton of CNFE errors?
The Classworlds ClassLoader allows more flexibility than traditional JVM to be able to reach to specific classes you want (located in other 'ClassRealms')
http://classworlds.codehaus.org/

Pingback if you have any questions on either topic
Martin 
______________________________________________ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité

Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.

  


> Date: Tue, 12 Mar 2013 15:45:00 -0700
> From: mikesena@gmail.com
> To: users@maven.apache.org
> Subject: Plugin Testing?
> 
> Hi All,
> 
> 
> Can anyone actually provide a link to a working example of the plugin testing framework?
> 
> 
> I’m using maven 3.0.5, and have even tried compiling the snapshot 2.2-SNAPSHOT version of maven-plugin-testing-harness, but still receive errors about not being able to find the component in my demo pom.xml.
> 
> 
> If I manually specify plexus-container-default as being version 1.5.5, then I get the error: “classRealm: none specified”.
> 
> 
> I’ve tried checking for dependency duplicates and missing/undeclared dependencies, but correcting any issues has not yielded a fix.
> 
> 
> 
> 
> Anyone?
> 
> 
> Michael
 		 	   		  

Re: Plugin Testing?

Posted by Baptiste MATHUS <ml...@batmat.net>.
You can have a look at many plugins inside the mojo project for example.
See for example the build-helper-maven-plugin :
https://fisheye.codehaus.org/browse/mojo/trunk/mojo/build-helper-maven-plugin

There's a src/it directory with maven test projects.

HTH.

Cheers


2013/3/12 Michael Sena <mi...@gmail.com>

> Hi All,
>
>
> Can anyone actually provide a link to a working example of the plugin
> testing framework?
>
>
> I’m using maven 3.0.5, and have even tried compiling the snapshot
> 2.2-SNAPSHOT version of maven-plugin-testing-harness, but still receive
> errors about not being able to find the component in my demo pom.xml.
>
>
> If I manually specify plexus-container-default as being version 1.5.5,
> then I get the error: “classRealm: none specified”.
>
>
> I’ve tried checking for dependency duplicates and missing/undeclared
> dependencies, but correcting any issues has not yielded a fix.
>
>
>
>
> Anyone?
>
>
> Michael
>
> --
> Baptiste <Batmat> MATHUS - http://batmat.net
> Sauvez un arbre,
> Mangez un castor ! nbsp;!

Re: Plugin Testing?

Posted by Manfred Moser <ma...@mosabuam.com>.
Check out eg. the source of the Android Maven Plugin on how you can hook
this all up.

> Hi All,
>
>
> Can anyone actually provide a link to a working example of the plugin
> testing framework?
>
>
> I’m using maven 3.0.5, and have even tried compiling the snapshot
> 2.2-SNAPSHOT version of maven-plugin-testing-harness, but still receive
> errors about not being able to find the component in my demo pom.xml.
>
>
> If I manually specify plexus-container-default as being version 1.5.5,
> then I get the error: “classRealm: none specified”.
>
>
> I’ve tried checking for dependency duplicates and missing/undeclared
> dependencies, but correcting any issues has not yielded a fix.
>
>
>
>
> Anyone?
>
>
> Michael


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