-
Notifications
You must be signed in to change notification settings - Fork 267
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
mvn versions:set fails with older versions of mvn after 2.14.0 #865
Comments
Yes, it's been long stated in the documentation that the minimum version of Maven is 3.2.5. We don't support older versions. |
Any chance we could get the dependency fixed in, so we can continue using mvn versions:set without explicitly updating dependencies like below on our legacy scripts.(which were working fine until 2.14.0) |
@vamsikul do you mean dropping the dependency on Maven 3.2.5? |
Having the dependency error show up if we are not using mvn 3.2.5+ |
@slawekjaranowski I think we should detect the Maven version and throw an exception with a more explicit message if it's lower than the required version. -> #866 |
Fixed by #867 |
I assume that information was provided and fix done. |
Was expecting Behavior similar to version 2.13.0 , but it seems to fail after version 2.14.0+ , Wondering if there is an option to fix this?
Expected:
[..]$ mvn org.codehaus.mojo:versions-maven-plugin:2.13.0:set -DnewVersion=1.2.3 | grep ERROR | head -1
[ERROR] Failed to execute goal org.codehaus.mojo:versions-maven-plugin:2.13.0:set (default-cli) on project flow-project: The plugin org.codehaus.mojo:versions-maven-plugin:2.13.0 requires Maven version 3.2.5 -> [Help 1]
Actual:
[..]$mvn versions:set -DnewVersion=1.2.3 | grep ERROR | head -1
Dec 19, 2022 10:04:54 AM org.sonatype.guice.bean.reflect.Logs$JULSink warn
WARNING: Error injecting: org.codehaus.mojo.versions.SetMojo
com.google.inject.ConfigurationException: Guice configuration errors:
at org.codehaus.mojo.versions.SetMojo.class(Unknown Source)
while locating org.codehaus.mojo.versions.SetMojo
1 error
at com.google.inject.internal.InjectorImpl.getProvider(InjectorImpl.java:991)
at com.google.inject.internal.InjectorImpl.getProvider(InjectorImpl.java:950)
at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1000)
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:965)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1011)
at com.google.inject.internal.InjectorImpl$3.get(InjectorImpl.java:961)
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:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
[ERROR] Failed to execute goal org.codehaus.mojo:versions-maven-plugin:2.14.1:set (default-cli) on project flow-project: Execution default-cli of goal org.codehaus.mojo:versions-maven-plugin:2.14.1:set failed: Unable to load the mojo 'set' (or one of its required components) from the plugin 'org.codehaus.mojo:versions-maven-plugin:2.14.1': com.google.inject.ProvisionException: Guice provision errors:
mvn -version
Apache Maven 3.0.5 (r01de14724cdef164cd33c7c8c2fe155faf9602da; 2013-02-19 08:51:28-0500)
Maven home: /home/jenkins/binaries/apache-maven3.0.5
Java version: 1.8.0_282, vendor: Red Hat, Inc.
Java home: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.282.b08-1.el7_9.x86_64/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.10.0-1160.80.1.el7.x86_64", arch: "amd64", family: "unix"
The text was updated successfully, but these errors were encountered: