Skip to content
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 · 20 comments
Closed

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

defnull opened this issue Jan 25, 2017 · 20 comments

Comments

@defnull
Copy link

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
Copy link
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.

@alexcojocaru
Copy link
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.

@alexcojocaru
Copy link
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.

@defnull
Copy link
Author

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
Copy link
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).

@defnull
Copy link
Author

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.

@bradford-scott
Copy link

@alexcojocaru I am unable to path to multiple initialization scripts as when I attempt to do so using the pathInitScript tag it throws an error stating the path to the script is invalid when it isn't. If i have a singular script it is fine

@alexcojocaru
Copy link
Owner

I will give this a try later and get back to you.
In the meanwhile, could you tell me which maven version you are using?

@alexcojocaru
Copy link
Owner

There is an automated test for this use case:
https://github.com/alexcojocaru/elasticsearch-maven-plugin/tree/master/src/it/runforked-with-init-scripts
and it's been passing consistently.

@bradford-scott
Copy link

bradford-scott commented Jul 14, 2020 via email

@bradford-scott
Copy link

bradford-scott commented Jul 14, 2020 via email

@bradford-scott
Copy link

bradford-scott commented Jul 14, 2020 via email

@alexcojocaru
Copy link
Owner

That error does not seem related to org.eclipse.aether.RepositorySystem

Could you double check that the file path in the error message matches the file you have in the project?
Try enabling the DEBUG level logging on the plugin (using the logLevel property, see the doc for details), and see if that gives you more details.

@bradford-scott
Copy link

bradford-scott commented Jul 14, 2020 via email

@alexcojocaru
Copy link
Owner

I don't know, could be related. It would help if you run from the cmd line, as that's reproducible on my end.

@bradford-scott
Copy link

bradford-scott commented Jul 14, 2020 via email

@bradford-scott
Copy link

bradford-scott commented Jul 14, 2020 via email

@defnull
Copy link
Author

defnull commented Jul 14, 2020

@alexcojocaru I am unable to path to multiple initialization scripts as when I attempt to do so using the pathInitScript tag it throws an error stating the path to the script is invalid when it isn't. If i have a singular script it is fine

Why are you discussing a completely unrelated issue here?

@alexcojocaru
Copy link
Owner

That error does not seem related to org.eclipse.aether.RepositorySystem

There's nothing in the plugin output above that would be related to the original issue. @bradford-scott please open a separate issue, and add the plugin output to it, and let's continue the discussion there.

@dummyelastic
Copy link

@alexcojocaru is it possible to make it work for gradle also or if there is anything already existing for gradle?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants