Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Information Provided
-
4.7.0
-
None
-
Unknown
Description
When a plugin has been installed but is no more vailable (for instance when trying to use an older version of Camel Jbang), there is currently an error and the command is failing even if this plugin is not used.
> jbang '-Dcamel.jbang.version=4.6.0' camel@apache/camel init 'testdebug.camel.yaml'
2024-07-25 11:20:02.430 ERROR 242181 --- [ main] .main.download.MavenDependencyDownloader : Error downloading: org.apache.camel:camel-jbang-plugin-generate:4.6.0 due to: org.apache.camel.main.download.DownloadException: Cannot resolve dependencies in https://repo1.maven.org/maven2, https://maven.repository.redhat.com/ga java.util.concurrent.ExecutionException: org.apache.camel.main.download.DownloadException: Cannot resolve dependencies in https://repo1.maven.org/maven2, https://maven.repository.redhat.com/ga at java.base/java.util.concurrent.FutureTask.report(FutureTask.java:122) ~[?:?] at java.base/java.util.concurrent.FutureTask.get(FutureTask.java:205) ~[?:?] at org.apache.camel.main.download.DownloadThreadPool.awaitCompletion(DownloadThreadPool.java:75) [camel-kamelet-main-4.6.0.jar:4.6.0] at org.apache.camel.main.download.DownloadThreadPool.download(DownloadThreadPool.java:67) [camel-kamelet-main-4.6.0.jar:4.6.0] at org.apache.camel.main.download.MavenDependencyDownloader.doDownloadDependency(MavenDependencyDownloader.java:265) [camel-kamelet-main-4.6.0.jar:4.6.0] at org.apache.camel.main.download.MavenDependencyDownloader.downloadDependency(MavenDependencyDownloader.java:230) [camel-kamelet-main-4.6.0.jar:4.6.0] at org.apache.camel.main.download.MavenDependencyDownloader.downloadDependency(MavenDependencyDownloader.java:215) [camel-kamelet-main-4.6.0.jar:4.6.0] at org.apache.camel.dsl.jbang.core.common.PluginHelper.downloadPlugin(PluginHelper.java:99) [camel-jbang-core-4.6.0.jar:4.6.0] at org.apache.camel.dsl.jbang.core.common.PluginHelper.addPlugins(PluginHelper.java:80) [camel-jbang-core-4.6.0.jar:4.6.0] at org.apache.camel.dsl.jbang.core.commands.CamelJBangMain.run(CamelJBangMain.java:156) [camel-jbang-core-4.6.0.jar:4.6.0] at org.apache.camel.dsl.jbang.core.commands.CamelJBangMain.run(CamelJBangMain.java:61) [camel-jbang-core-4.6.0.jar:4.6.0] at main.CamelJBang.main(CamelJBang.java:36) [CamelJBang.jar:?] Caused by: org.apache.camel.main.download.DownloadException: Cannot resolve dependencies in https://repo1.maven.org/maven2, https://maven.repository.redhat.com/ga at org.apache.camel.main.download.MavenDependencyDownloader.resolveDependenciesViaAether(MavenDependencyDownloader.java:566) ~[camel-kamelet-main-4.6.0.jar:4.6.0] at org.apache.camel.main.download.MavenDependencyDownloader.lambda$doDownloadDependency$0(MavenDependencyDownloader.java:281) ~[camel-kamelet-main-4.6.0.jar:4.6.0] at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572) ~[?:?] at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317) ~[?:?] at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[?:?] at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[?:?] at java.base/java.lang.Thread.run(Thread.java:1583) ~[?:?] Caused by: org.apache.camel.tooling.maven.MavenResolutionException: The following artifacts could not be resolved: org.apache.camel:camel-jbang-plugin-generate:jar:4.6.0 (absent): Could not find artifact org.apache.camel:camel-jbang-plugin-generate:jar:4.6.0 in central (https://repo1.maven.org/maven2) at org.apache.camel.tooling.maven.MavenDownloaderImpl.resolveArtifacts(MavenDownloaderImpl.java:462) ~[camel-tooling-maven-4.6.0.jar:4.6.0] at org.apache.camel.main.download.MavenDependencyDownloader.resolveDependenciesViaAether(MavenDependencyDownloader.java:560) ~[camel-kamelet-main-4.6.0.jar:4.6.0] at org.apache.camel.main.download.MavenDependencyDownloader.lambda$doDownloadDependency$0(MavenDependencyDownloader.java:281) ~[camel-kamelet-main-4.6.0.jar:4.6.0] at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572) ~[?:?] at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317) ~[?:?] at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[?:?] at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[?:?] at java.base/java.lang.Thread.run(Thread.java:1583) ~[?:?] Caused by: org.eclipse.aether.resolution.DependencyResolutionException: The following artifacts could not be resolved: org.apache.camel:camel-jbang-plugin-generate:jar:4.6.0 (absent): Could not find artifact org.apache.camel:camel-jbang-plugin-generate:jar:4.6.0 in central (https://repo1.maven.org/maven2) at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:365) ~[maven-resolver-impl-1.9.20.jar:1.9.20] at org.apache.camel.tooling.maven.MavenDownloaderImpl.resolveArtifacts(MavenDownloaderImpl.java:451) ~[camel-tooling-maven-4.6.0.jar:4.6.0] at org.apache.camel.main.download.MavenDependencyDownloader.resolveDependenciesViaAether(MavenDependencyDownloader.java:560) ~[camel-kamelet-main-4.6.0.jar:4.6.0] at org.apache.camel.main.download.MavenDependencyDownloader.lambda$doDownloadDependency$0(MavenDependencyDownloader.java:281) ~[camel-kamelet-main-4.6.0.jar:4.6.0] at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572) ~[?:?] at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317) ~[?:?] at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[?:?] at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[?:?] at java.base/java.lang.Thread.run(Thread.java:1583) ~[?:?] Caused by: org.eclipse.aether.resolution.ArtifactResolutionException: The following artifacts could not be resolved: org.apache.camel:camel-jbang-plugin-generate:jar:4.6.0 (absent): Could not find artifact org.apache.camel:camel-jbang-plugin-generate:jar:4.6.0 in central (https://repo1.maven.org/maven2) at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:473) ~[maven-resolver-impl-1.9.20.jar:1.9.20] at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:261) ~[maven-resolver-impl-1.9.20.jar:1.9.20] at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:353) ~[maven-resolver-impl-1.9.20.jar:1.9.20] at org.apache.camel.tooling.maven.MavenDownloaderImpl.resolveArtifacts(MavenDownloaderImpl.java:451) ~[camel-tooling-maven-4.6.0.jar:4.6.0] at org.apache.camel.main.download.MavenDependencyDownloader.resolveDependenciesViaAether(MavenDependencyDownloader.java:560) ~[camel-kamelet-main-4.6.0.jar:4.6.0] at org.apache.camel.main.download.MavenDependencyDownloader.lambda$doDownloadDependency$0(MavenDependencyDownloader.java:281) ~[camel-kamelet-main-4.6.0.jar:4.6.0] at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572) ~[?:?] at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317) ~[?:?] at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[?:?] at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[?:?] at java.base/java.lang.Thread.run(Thread.java:1583) ~[?:?] Caused by: org.eclipse.aether.transfer.ArtifactNotFoundException: Could not find artifact org.apache.camel:camel-jbang-plugin-generate:jar:4.6.0 in central (https://repo1.maven.org/maven2) at org.eclipse.aether.connector.basic.ArtifactTransportListener.transferFailed(ArtifactTransportListener.java:42) ~[maven-resolver-connector-basic-1.9.20.jar:1.9.20] at org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run(BasicRepositoryConnector.java:417) ~[maven-resolver-connector-basic-1.9.20.jar:1.9.20] at org.eclipse.aether.connector.basic.BasicRepositoryConnector.get(BasicRepositoryConnector.java:260) ~[maven-resolver-connector-basic-1.9.20.jar:1.9.20] at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:537) ~[maven-resolver-impl-1.9.20.jar:1.9.20] at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:449) ~[maven-resolver-impl-1.9.20.jar:1.9.20] at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:261) ~[maven-resolver-impl-1.9.20.jar:1.9.20] at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:353) ~[maven-resolver-impl-1.9.20.jar:1.9.20] at org.apache.camel.tooling.maven.MavenDownloaderImpl.resolveArtifacts(MavenDownloaderImpl.java:451) ~[camel-tooling-maven-4.6.0.jar:4.6.0] at org.apache.camel.main.download.MavenDependencyDownloader.resolveDependenciesViaAether(MavenDependencyDownloader.java:560) ~[camel-kamelet-main-4.6.0.jar:4.6.0] at org.apache.camel.main.download.MavenDependencyDownloader.lambda$doDownloadDependency$0(MavenDependencyDownloader.java:281) ~[camel-kamelet-main-4.6.0.jar:4.6.0] at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572) ~[?:?] at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317) ~[?:?] at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[?:?] at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[?:?] at java.base/java.lang.Thread.run(Thread.java:1583) ~[?:?] ERROR: Failed to read file META-INF/services/org/apache/camel/camel-jbang-plugin/camel-jbang-plugin-generate in dependency org.apache.camel:camel-jbang-plugin-generate:4.6.0. camel-jbang-plugin-generate not found. Exit