On Sat, 24 Sep 2016 11:15:41 +0200, Karl Heinz Marbaise <[email protected]> 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...

Kind regards
Karl Heinz Marbaise

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to