You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by oliver <ol...@gmail.com> on 2011/01/27 22:26:39 UTC

maven-plugin-testing-harness with Maven 3

Hi,

I'm working at a Maven plugin for OOo which uses maven-plugin-testing-harness-1.2 for testing. With Maven-2 it works fine but with Maven-3 I'll get a

java.lang.IllegalAccessError: tried to access field org.codehaus.plexus.PlexusTestCase.container from class org.apache.maven.plugin.testing.AbstractMojoTestCase
	at org.apache.maven.plugin.testing.AbstractMojoTestCase.validateContainerStatus(AbstractMojoTestCase.java:447)
	at org.apache.maven.plugin.testing.AbstractMojoTestCase.lookupMojo(AbstractMojoTestCase.java:178)
	at org.apache.maven.plugin.testing.AbstractMojoTestCase.lookupMojo(AbstractMojoTestCase.java:127) ...

as error message during testing. Is there a chance to get the tests work also with Maven-3? 

regards,
Oliver


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


Re: maven-plugin-testing-harness with Maven 3

Posted by Olivier Lamy <ol...@apache.org>.
yup use a profile section (as for the site plugin)

2011/1/27 oliver <ol...@gmail.com>:
> but then I have the problem that it does not work with Maven-2. One of our build server uses Maven-3 and the other Maven-2. I guess this can be handled by a profile section. Or is there another (better) way to do this?
>
> regards,
> Oliver
>
>
> Am 27.01.2011 um 22:41 schrieb Olivier Lamy:
>
>> Hello,
>> With maven3, you have to use
>>
>>    <dependency>
>>      <groupId>org.apache.maven.plugin-testing</groupId>
>>      <artifactId>maven-plugin-testing-harness</artifactId>
>>      <version>2.0-alpha-1</version>
>>      <scope>test</scope>
>>    </dependency>
>>
>>
>>
>> 2011/1/27 oliver <ol...@gmail.com>:
>>> Hi,
>>>
>>> I'm working at a Maven plugin for OOo which uses maven-plugin-testing-harness-1.2 for testing. With Maven-2 it works fine but with Maven-3 I'll get a
>>>
>>> java.lang.IllegalAccessError: tried to access field org.codehaus.plexus.PlexusTestCase.container from class org.apache.maven.plugin.testing.AbstractMojoTestCase
>>>        at org.apache.maven.plugin.testing.AbstractMojoTestCase.validateContainerStatus(AbstractMojoTestCase.java:447)
>>>        at org.apache.maven.plugin.testing.AbstractMojoTestCase.lookupMojo(AbstractMojoTestCase.java:178)
>>>        at org.apache.maven.plugin.testing.AbstractMojoTestCase.lookupMojo(AbstractMojoTestCase.java:127) ...
>>>
>>> as error message during testing. Is there a chance to get the tests work also with Maven-3?
>>>
>>> regards,
>>> Oliver
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>> For additional commands, e-mail: users-help@maven.apache.org
>>>
>>>
>>
>>
>>
>> --
>> Olivier Lamy
>> http://twitter.com/olamy
>> http://www.linkedin.com/in/olamy
>>
>> ---------------------------------------------------------------------
>> 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
>
>



-- 
Olivier Lamy
http://twitter.com/olamy
http://www.linkedin.com/in/olamy

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


Re: maven-plugin-testing-harness with Maven 3

Posted by oliver <ol...@gmail.com>.
but then I have the problem that it does not work with Maven-2. One of our build server uses Maven-3 and the other Maven-2. I guess this can be handled by a profile section. Or is there another (better) way to do this?

regards,
Oliver


Am 27.01.2011 um 22:41 schrieb Olivier Lamy:

> Hello,
> With maven3, you have to use
> 
>    <dependency>
>      <groupId>org.apache.maven.plugin-testing</groupId>
>      <artifactId>maven-plugin-testing-harness</artifactId>
>      <version>2.0-alpha-1</version>
>      <scope>test</scope>
>    </dependency>
> 
> 
> 
> 2011/1/27 oliver <ol...@gmail.com>:
>> Hi,
>> 
>> I'm working at a Maven plugin for OOo which uses maven-plugin-testing-harness-1.2 for testing. With Maven-2 it works fine but with Maven-3 I'll get a
>> 
>> java.lang.IllegalAccessError: tried to access field org.codehaus.plexus.PlexusTestCase.container from class org.apache.maven.plugin.testing.AbstractMojoTestCase
>>        at org.apache.maven.plugin.testing.AbstractMojoTestCase.validateContainerStatus(AbstractMojoTestCase.java:447)
>>        at org.apache.maven.plugin.testing.AbstractMojoTestCase.lookupMojo(AbstractMojoTestCase.java:178)
>>        at org.apache.maven.plugin.testing.AbstractMojoTestCase.lookupMojo(AbstractMojoTestCase.java:127) ...
>> 
>> as error message during testing. Is there a chance to get the tests work also with Maven-3?
>> 
>> regards,
>> Oliver
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>> 
>> 
> 
> 
> 
> -- 
> Olivier Lamy
> http://twitter.com/olamy
> http://www.linkedin.com/in/olamy
> 
> ---------------------------------------------------------------------
> 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


Re: maven-plugin-testing-harness with Maven 3

Posted by Olivier Lamy <ol...@apache.org>.
Hello,
With maven3, you have to use

    <dependency>
      <groupId>org.apache.maven.plugin-testing</groupId>
      <artifactId>maven-plugin-testing-harness</artifactId>
      <version>2.0-alpha-1</version>
      <scope>test</scope>
    </dependency>



2011/1/27 oliver <ol...@gmail.com>:
> Hi,
>
> I'm working at a Maven plugin for OOo which uses maven-plugin-testing-harness-1.2 for testing. With Maven-2 it works fine but with Maven-3 I'll get a
>
> java.lang.IllegalAccessError: tried to access field org.codehaus.plexus.PlexusTestCase.container from class org.apache.maven.plugin.testing.AbstractMojoTestCase
>        at org.apache.maven.plugin.testing.AbstractMojoTestCase.validateContainerStatus(AbstractMojoTestCase.java:447)
>        at org.apache.maven.plugin.testing.AbstractMojoTestCase.lookupMojo(AbstractMojoTestCase.java:178)
>        at org.apache.maven.plugin.testing.AbstractMojoTestCase.lookupMojo(AbstractMojoTestCase.java:127) ...
>
> as error message during testing. Is there a chance to get the tests work also with Maven-3?
>
> regards,
> Oliver
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>



-- 
Olivier Lamy
http://twitter.com/olamy
http://www.linkedin.com/in/olamy

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