New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No implementation for org.eclipse.aether.RepositorySystem was bound #28

Closed
defnull opened this Issue Jan 25, 2017 · 6 comments

Comments

Projects
None yet
2 participants
@defnull

defnull commented Jan 25, 2017

I am getting this error:

WARNUNG: Error injecting: com.github.alexcojocaru.mojo.elasticsearch.v2.RunForkedMojo
com.google.inject.ProvisionException: Guice provision errors:

1) No implementation for org.eclipse.aether.RepositorySystem was bound.
  while locating com.github.alexcojocaru.mojo.elasticsearch.v2.RunForkedMojo

1 error
    at com.google.inject.internal.InjectorImpl$3.get(InjectorImpl.java:999)
    at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1025)
    at org.sonatype.guice.bean.reflect.AbstractDeferredClass.get(AbstractDeferredClass.java:45)
    at com.google.inject.internal.ProviderInternalFactory.provision(ProviderInternalFactory.java:84)
    at com.google.inject.internal.InternalFactoryToInitializableAdapter.provision(InternalFactoryToInitializableAdapter.java:52)
    at com.google.inject.internal.ProviderInternalFactory$1.call(ProviderInternalFactory.java:70)
    at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:100)
    at org.sonatype.guice.plexus.lifecycles.PlexusLifecycleManager.onProvision(PlexusLifecycleManager.java:138)
    at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:108)
    at com.google.inject.internal.ProvisionListenerStackCallback.provision(ProvisionListenerStackCallback.java:55)
    at com.google.inject.internal.ProviderInternalFactory.circularGet(ProviderInternalFactory.java:68)
    at com.google.inject.internal.InternalFactoryToInitializableAdapter.get(InternalFactoryToInitializableAdapter.java:45)
    at com.google.inject.internal.InjectorImpl$3$1.call(InjectorImpl.java:990)
    at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1036)
    at com.google.inject.internal.InjectorImpl$3.get(InjectorImpl.java:986)
    at com.google.inject.Scopes$1$1.get(Scopes.java:59)
    at org.sonatype.guice.bean.locators.LazyBeanEntry.getValue(LazyBeanEntry.java:83)
    at org.sonatype.guice.plexus.locators.LazyPlexusBean.getValue(LazyPlexusBean.java:49)
    at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:253)
    at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:245)
    at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getConfiguredMojo(DefaultMavenPluginManager.java:455)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:92)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)

With the maven version shipped with Ubuntu 14.04 LTS

mvn --version
Apache Maven 3.0.5
Maven home: /usr/share/maven
Java version: 1.8.0_121, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-8-oracle/jre
Default locale: de_DE, platform encoding: UTF-8
OS name: "linux", version: "3.16.0-38-generic", arch: "amd64", family: "unix"

Is there any change to make this plugin compatible to the 3.0 branch of maven?

@alexcojocaru

This comment has been minimized.

Show comment
Hide comment
@alexcojocaru

alexcojocaru Jan 25, 2017

Owner

From https://wiki.eclipse.org/Aether/Using_Aether_in_Maven_Plugins: Maven 3.1.0 is the earliest version using Eclipse Aether, Maven 3.0.x uses the incompatible predecessor Sonatype Aether

It is possible to switch to the Sonatype Aether (which I believe is deprecated and still supported by newer versions of Maven). I can probably take a look at this, although I cannot commit to anything in the near future.

Owner

alexcojocaru commented Jan 25, 2017

From https://wiki.eclipse.org/Aether/Using_Aether_in_Maven_Plugins: Maven 3.1.0 is the earliest version using Eclipse Aether, Maven 3.0.x uses the incompatible predecessor Sonatype Aether

It is possible to switch to the Sonatype Aether (which I believe is deprecated and still supported by newer versions of Maven). I can probably take a look at this, although I cannot commit to anything in the near future.

@alexcojocaru

This comment has been minimized.

Show comment
Hide comment
@alexcojocaru

alexcojocaru Feb 13, 2017

Owner

I fixed this issue in the es5-maven30 branch: https://github.com/alexcojocaru/elasticsearch-maven-plugin/tree/es5-maven30. I am refraining from releasing this branch for the time being, for a couple of reasons:

  • going forward, the new aether API is the way to go; the old sonatype aether has been discotinued in 2011;
  • I don't want to maintain an additional branch just to support maven 3.0; that would create extra work when releasing new version of the plugin, when applying patches and when adding new features;
  • there doesn't seem to be much demand for maven 3.0 support.

If there is a way to configure this fix as a separate module on the project, in order to automate adding new feature, patches and releasing new version, let me know.

Owner

alexcojocaru commented Feb 13, 2017

I fixed this issue in the es5-maven30 branch: https://github.com/alexcojocaru/elasticsearch-maven-plugin/tree/es5-maven30. I am refraining from releasing this branch for the time being, for a couple of reasons:

  • going forward, the new aether API is the way to go; the old sonatype aether has been discotinued in 2011;
  • I don't want to maintain an additional branch just to support maven 3.0; that would create extra work when releasing new version of the plugin, when applying patches and when adding new features;
  • there doesn't seem to be much demand for maven 3.0 support.

If there is a way to configure this fix as a separate module on the project, in order to automate adding new feature, patches and releasing new version, let me know.

@alexcojocaru

This comment has been minimized.

Show comment
Hide comment
@alexcojocaru

alexcojocaru Feb 14, 2017

Owner

Everything seems to be against adding support for Maven 3.0.
The build on the feature branch failed in Travis:
https://travis-ci.org/alexcojocaru/elasticsearch-maven-plugin/builds/201322174

That is because Travis uses Apache Maven 3.2.5 for building Java projects and it does not provide support for customizing the Maven version: https://docs.travis-ci.com/user/languages/java/#Projects-Using-Maven.

Owner

alexcojocaru commented Feb 14, 2017

Everything seems to be against adding support for Maven 3.0.
The build on the feature branch failed in Travis:
https://travis-ci.org/alexcojocaru/elasticsearch-maven-plugin/builds/201322174

That is because Travis uses Apache Maven 3.2.5 for building Java projects and it does not provide support for customizing the Maven version: https://docs.travis-ci.com/user/languages/java/#Projects-Using-Maven.

@defnull

This comment has been minimized.

Show comment
Hide comment
@defnull

defnull Feb 15, 2017

Is there a way to catch that injection error and provide a more helpful error message? That would be totally fine I think. Or make sure the error message is google-able (perhaps a warning in the readme?)

defnull commented Feb 15, 2017

Is there a way to catch that injection error and provide a more helpful error message? That would be totally fine I think. Or make sure the error message is google-able (perhaps a warning in the readme?)

@alexcojocaru

This comment has been minimized.

Show comment
Hide comment
@alexcojocaru

alexcojocaru Feb 15, 2017

Owner

Sure. I will add a note to the README to describe the limitation.
If google indexed this page already, then the error is google-able (thanks to you).

Owner

alexcojocaru commented Feb 15, 2017

Sure. I will add a note to the README to describe the limitation.
If google indexed this page already, then the error is google-able (thanks to you).

@defnull

This comment has been minimized.

Show comment
Hide comment
@defnull

defnull Feb 15, 2017

Thanks for your great plugin by the way. It makes integration-testing A LOT easier, especially since elasticsearch dropped support for embedding nodes a while ago.

defnull commented Feb 15, 2017

Thanks for your great plugin by the way. It makes integration-testing A LOT easier, especially since elasticsearch dropped support for embedding nodes a while ago.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment