You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Benson Margulies <bi...@gmail.com> on 2014/07/25 21:16:26 UTC

Using plugin-testing-harness in a 3.0.x environment

I am building a plugin that has to support 3.0.4, and I want to use
the plugin testing harness.

So, into my pom went:

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

When I tried to run the test that resulted, I found that I got missing
class errors unless I also added:

 <dependency>
            <groupId>org.eclipse.aether</groupId>
            <artifactId>aether-api</artifactId>
            <version>1.0.0.v20140518</version>
            <scope>test</scope>
        </dependency>

and maven-core 3.0.4.

Once I had done all of that, I am now faced with guice having trouble
with Guava. My own code does use Guava 16.0.1.

Is there a way to make all this fit together? Should I just use a
newer p-t-h even if I'm running with Maven 3.0.4?


java.lang.IllegalAccessError: tried to access method
com.google.common.collect.MapMaker.makeComputingMap(Lcom/google/common/base/Function;)Ljava/util/concurrent/ConcurrentMap;
from class com.google.inject.internal.Annotations$AnnotationChecker
at com.google.inject.internal.Annotations$AnnotationChecker.<init>(Annotations.java:104)
at com.google.inject.internal.Annotations.<clinit>(Annotations.java:122)
at com.google.inject.Key.ensureRetainedAtRuntime(Key.java:362)
at com.google.inject.Key.strategyFor(Key.java:354)
at com.google.inject.Key.get(Key.java:222)

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


Re: Using plugin-testing-harness in a 3.0.x environment

Posted by Igor Fedorenko <ig...@ifedorenko.com>.
You need to use plugin testing 2.1 with maven 3.0.x.

I don't know what version of Guava was included in maven 3.0.x, but your
plugin will need to use compatible version to be able to use plugin
testing. unit tests currently have one flat classpath, so can't have
multiple versions of the same dependency.

--
Regards,
Igor

On 2014-07-25, 23:16, Benson Margulies wrote:
> I am building a plugin that has to support 3.0.4, and I want to use
> the plugin testing harness.
>
> So, into my pom went:
>
>    <dependency>
>              <groupId>org.apache.maven.plugin-testing</groupId>
>              <artifactId>maven-plugin-testing-harness</artifactId>
>              <version>3.0.0</version>
>              <scope>test</scope>
>          </dependency>
>
> When I tried to run the test that resulted, I found that I got missing
> class errors unless I also added:
>
>   <dependency>
>              <groupId>org.eclipse.aether</groupId>
>              <artifactId>aether-api</artifactId>
>              <version>1.0.0.v20140518</version>
>              <scope>test</scope>
>          </dependency>
>
> and maven-core 3.0.4.
>
> Once I had done all of that, I am now faced with guice having trouble
> with Guava. My own code does use Guava 16.0.1.
>
> Is there a way to make all this fit together? Should I just use a
> newer p-t-h even if I'm running with Maven 3.0.4?
>
>
> java.lang.IllegalAccessError: tried to access method
> com.google.common.collect.MapMaker.makeComputingMap(Lcom/google/common/base/Function;)Ljava/util/concurrent/ConcurrentMap;
> from class com.google.inject.internal.Annotations$AnnotationChecker
> at com.google.inject.internal.Annotations$AnnotationChecker.<init>(Annotations.java:104)
> at com.google.inject.internal.Annotations.<clinit>(Annotations.java:122)
> at com.google.inject.Key.ensureRetainedAtRuntime(Key.java:362)
> at com.google.inject.Key.strategyFor(Key.java:354)
> at com.google.inject.Key.get(Key.java:222)
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>

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