You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Karl Heinz Marbaise <kh...@gmx.de> on 2016/10/09 09:29:59 UTC
Re: shared: maven-artifact-transfer
Hi,
I'm trying to continue to write tests for the component, but at the
momemt it seemed to me that I oversight something...(I'm blockhead at
the moment)....
The pom of the component:
https://gist.github.com/khmarbaise/2ed49e791bab6a374b7862691dbfd7b5
and the output if i try to run: mvn clean verify...
https://gist.github.com/khmarbaise/f55b679b775850836f321b78273ca573
So based on the error message (at the end):
2) No implementation for org.eclipse.aether.impl.VersionRangeResolver
was bound.
while locating org.eclipse.aether.impl.VersionRangeResolver
It looks like it's missing an implementation for
VersionRangeResolver...which is part of
<dependency>
<groupId>org.eclipse.aether</groupId>
<artifactId>aether-impl</artifactId>
<version>0.9.0.M2</version>
<scope>provided</scope>
</dependency>
So it should mean that I need to change from provided to test
scope...but this does not help here...the error message keeps the same...
Maybe someone of you have a hint an idea ?
Kind regards
Karl Heinz Marbaise
On 24/09/16 18:27, Robert Scholte wrote:
> On Sat, 24 Sep 2016 11:15:41 +0200, Karl Heinz Marbaise
> <kh...@gmx.de> wrote:
>
>> Hi,
>>
>> So I'm trying to write more tests on the component...in particular for
>> the new parts like ProjectInstaller etc. I started with
>> ProjectInstaller...(Created gist for that:
>> https://gist.github.com/khmarbaise/1ed421983480e3fef624bf6c8f4844b6).
>>
>> If I try to run that I'm getting always errors like this:
>>
>>
>> testShouldInstallSingleArtifact(org.apache.maven.shared.project.install.ProjectInstallerTest)
>> Time elapsed: 0.134 sec <<< ERROR!
>> org.codehaus.plexus.component.repository.exception.ComponentLookupException:
>>
>> com.google.inject.ProvisionException: Guice provision errors:
>>
>> 1) Error injecting:
>> org.apache.maven.shared.artifact.install.internal.Maven31ArtifactInstaller
>>
>> at ClassRealm[plexus.core, parent: null]
>> at ClassRealm[plexus.core, parent: null]
>> while locating
>> org.apache.maven.shared.artifact.install.ArtifactInstaller annotated
>> with @com.google.inject.name.Named(value=maven31)
>>
>> 1 error
>> role: org.apache.maven.shared.artifact.install.ArtifactInstaller
>> roleHint: maven31
>> at
>> org.apache.maven.shared.project.install.ProjectInstallerTest.setUp(ProjectInstallerTest.java:46)
>>
>> Caused by: com.google.inject.ProvisionException:
>> Guice provision errors:
>>
>> I had expected that the ArtifactInstaller will be selected
>> automatically based on the running Maven version (3.3.9)...
>
> No, it is just a JUnit-test like any other. The version of the Maven
> dependencies are those specified in the pom.xml. Only when using the
> Maven runtime, these dependencies are stripped out and the runtime
> versions are used (Plexus Classworld).
>
> Robert
>
>>
>> maybe someone has an idea/tip/hint what I'm doing wrong...
>>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
Re: shared: maven-artifact-transfer
Posted by Robert Scholte <rf...@apache.org>.
Hi Karl Heinz,
The VersionRangeResolver is an interface for which Maven has a default
implementation.
Since maven-transfer-utils depends on Maven 3.0, there's the
org.apache.maven.repository.internal.DefaultVersionRangeResolver which
implements the Sonatype version of VersionRangeResolver.
There's simply no Eclipse version implementation available for
VersionRangeResolver.
In case of unittests, you will always fall back on Sonatype's Aether, only
with integration tests you can test Eclipse's Aether.
Robert
On Sun, 09 Oct 2016 11:29:59 +0200, Karl Heinz Marbaise
<kh...@gmx.de> wrote:
> Hi,
>
> I'm trying to continue to write tests for the component, but at the
> momemt it seemed to me that I oversight something...(I'm blockhead at
> the moment)....
>
> The pom of the component:
> https://gist.github.com/khmarbaise/2ed49e791bab6a374b7862691dbfd7b5
>
> and the output if i try to run: mvn clean verify...
>
> https://gist.github.com/khmarbaise/f55b679b775850836f321b78273ca573
>
>
> So based on the error message (at the end):
>
> 2) No implementation for org.eclipse.aether.impl.VersionRangeResolver
> was bound.
> while locating org.eclipse.aether.impl.VersionRangeResolver
>
> It looks like it's missing an implementation for
> VersionRangeResolver...which is part of
>
> <dependency>
> <groupId>org.eclipse.aether</groupId>
> <artifactId>aether-impl</artifactId>
> <version>0.9.0.M2</version>
> <scope>provided</scope>
> </dependency>
>
> So it should mean that I need to change from provided to test
> scope...but this does not help here...the error message keeps the same...
>
>
> Maybe someone of you have a hint an idea ?
>
>
> Kind regards
> Karl Heinz Marbaise
>
>
> On 24/09/16 18:27, Robert Scholte wrote:
>> On Sat, 24 Sep 2016 11:15:41 +0200, Karl Heinz Marbaise
>> <kh...@gmx.de> wrote:
>>
>>> Hi,
>>>
>>> So I'm trying to write more tests on the component...in particular for
>>> the new parts like ProjectInstaller etc. I started with
>>> ProjectInstaller...(Created gist for that:
>>> https://gist.github.com/khmarbaise/1ed421983480e3fef624bf6c8f4844b6).
>>>
>>> If I try to run that I'm getting always errors like this:
>>>
>>>
>>> testShouldInstallSingleArtifact(org.apache.maven.shared.project.install.ProjectInstallerTest)
>>> Time elapsed: 0.134 sec <<< ERROR!
>>> org.codehaus.plexus.component.repository.exception.ComponentLookupException:
>>>
>>> com.google.inject.ProvisionException: Guice provision errors:
>>>
>>> 1) Error injecting:
>>> org.apache.maven.shared.artifact.install.internal.Maven31ArtifactInstaller
>>>
>>> at ClassRealm[plexus.core, parent: null]
>>> at ClassRealm[plexus.core, parent: null]
>>> while locating
>>> org.apache.maven.shared.artifact.install.ArtifactInstaller annotated
>>> with @com.google.inject.name.Named(value=maven31)
>>>
>>> 1 error
>>> role: org.apache.maven.shared.artifact.install.ArtifactInstaller
>>> roleHint: maven31
>>> at
>>> org.apache.maven.shared.project.install.ProjectInstallerTest.setUp(ProjectInstallerTest.java:46)
>>>
>>> Caused by: com.google.inject.ProvisionException:
>>> Guice provision errors:
>>>
>>> I had expected that the ArtifactInstaller will be selected
>>> automatically based on the running Maven version (3.3.9)...
>>
>> No, it is just a JUnit-test like any other. The version of the Maven
>> dependencies are those specified in the pom.xml. Only when using the
>> Maven runtime, these dependencies are stripped out and the runtime
>> versions are used (Plexus Classworld).
>>
>> Robert
>>
>>>
>>> maybe someone has an idea/tip/hint what I'm doing wrong...
>>>
>
> ---------------------------------------------------------------------
> 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