Cannot start groovy application with spring cli command - java

I downloaded and installed the latest version of spring cli (1.5.1), i created a groovy file with #RestController and #RequestMapping but when i try to run it i have these errors.
startup failed:
General error during conversion: org.eclipse.aether.resolution.DependencyResolutionException: Failed to collect dependencies at org.codehaus.groovy:groovy-templates:jar:2.4.7
org.springframework.boot.cli.compiler.grape.DependencyResolutionFailedException: org.eclipse.aether.resolution.DependencyResolutionException: Failed to collect dependencies at org.codehaus.groovy:groovy-templates:jar:2.4.7
at org.springframework.boot.cli.compiler.grape.AetherGrapeEngine.resolve(AetherGrapeEngine.java:322)
at org.springframework.boot.cli.compiler.grape.AetherGrapeEngine.grab(AetherGrapeEngine.java:127)
at groovy.grape.Grape.grab(Grape.java:167)
at groovy.grape.GrabAnnotationTransformation.visit(GrabAnnotationTransformation.java:378)
at org.codehaus.groovy.transform.ASTTransformationVisitor$3.call(ASTTransformationVisitor.java:321)
at org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:931)
at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:593)
at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:569)
at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:546)
at org.springframework.boot.cli.compiler.GroovyCompiler.compile(GroovyCompiler.java:205)
at org.springframework.boot.cli.command.run.SpringApplicationRunner.compile(SpringApplicationRunner.java:129)
at org.springframework.boot.cli.command.run.SpringApplicationRunner.compileAndRun(SpringApplicationRunner.java:101)
at org.springframework.boot.cli.command.run.RunCommand$RunOptionHandler.run(RunCommand.java:111)
at org.springframework.boot.cli.command.options.OptionHandler.run(OptionHandler.java:84)
at org.springframework.boot.cli.command.OptionParsingCommand.run(OptionParsingCommand.java:54)
at org.springframework.boot.cli.command.CommandRunner.run(CommandRunner.java:219)
at org.springframework.boot.cli.command.CommandRunner.runAndHandleErrors(CommandRunner.java:171)
at org.springframework.boot.cli.SpringCli.main(SpringCli.java:63)
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:497)
at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:87)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:50)
at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:51)
Caused by: org.eclipse.aether.resolution.DependencyResolutionException: Failed to collect dependencies at org.codehaus.groovy:groovy-templates:jar:2.4.7
at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:380)
at org.springframework.boot.cli.compiler.grape.AetherGrapeEngine.resolve(AetherGrapeEngine.java:317)
... 25 more
Caused by: org.eclipse.aether.collection.DependencyCollectionException: Failed to collect dependencies at org.codehaus.groovy:groovy-templates:jar:2.4.7
at org.eclipse.aether.internal.impl.DefaultDependencyCollector.collectDependencies(DefaultDependencyCollector.java:291)
at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:341)
... 26 more
Caused by: org.eclipse.aether.resolution.ArtifactDescriptorException: Failed to read artifact descriptor for org.codehaus.groovy:groovy-templates:jar:2.4.7
at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:335)
at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.readArtifactDescriptor(DefaultArtifactDescriptorReader.java:217)
at org.eclipse.aether.internal.impl.DefaultDependencyCollector.resolveCachedArtifactDescriptor(DefaultDependencyCollector.java:535)
at org.eclipse.aether.internal.impl.DefaultDependencyCollector.getArtifactDescriptorResult(DefaultDependencyCollector.java:519)...
... 27 more
Caused by: org.eclipse.aether.resolution.ArtifactResolutionException: Could not transfer artifact org.codehaus.groovy:groovy-templates:pom:2.4.7 from/to central (http://repo1.maven.org/maven2/): Connect to repo1.maven.org:80 timed out
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:444)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:246)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:223)
at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:320)
... 34 more
Caused by: org.eclipse.aether.transfer.ArtifactTransferException: Could not transfer artifact org.codehaus.groovy:groovy-templates:pom:2.4.7 from/to central (http://repo1.maven.org/maven2/): Connect to repo1.maven.org:80 timed out
at org.eclipse.aether.connector.basic.ArtifactTransportListener.transferFailed(ArtifactTransportListener.java:43)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run(BasicRepositoryConnector.java:355)
at org.eclipse.aether.util.concurrency.RunnableErrorForwarder$1.run(RunnableErrorForwarder.java:67)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector$DirectExecutor.execute(BasicRepositoryConnector.java:581)...
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:520)...
... 37 more...
I read to run it a couple of times and it should work but it doesn't.

Its most likely due to network or proxy related issue. Please follow the link
https://docs.spring.io/spring-boot/docs/current/reference/html/cli-maven-settings.html
Also you should set JAVA_TOOL_OPTIONS env variable:
-Dhttp.proxyHost=YOUR_PROXY_HOST -Dhttp.proxyPort=YOUR_PROXY_PORT -Dhttps.proxySet=true

Related

Maven NoSuchAlgorithmException when resolving dependencies

my maven installation recently started throwing a NoSuchAlgorithmException when trying to download plugins and/or dependencies. (See stacktrace below). I'm using Intellij Idea community edition, but have tried running mvn clean install from the CLI as well. Same issue.
I've tried a lot of options on SO and other websites but no success. What I've tried thus far are a few variations of the following (I'm on a Windows 10 system):
Upgrade to maven 3.5, was on 3.0
Upgrade and downgrade my java installation to Zulu 19.30.11-jdk19.0.1 and Microsoft jdk17.0.2. This included changing my JAVA_HOME and path variables.
Installed the https://repo.maven.apache.org/maven2/ SSL certificate (repo.maven.apache.org.crt) downloaded via chrome to java folder lib/security/cacerts using the KeyTool.
Add command line args: -Dmaven.wagon.http.ssl.insecure=true -Dmaven.wagon.http.ssl.allowall=true
Turn the computer off and on again :D
I have no idea why this is happening, but I hope someone can assist. If you need any further information, please let me know.
Stacktrace from CLI after running mvn clean install -X when trying to build this JavaFX project from Github source:
[ERROR] Failed to execute goal on project module1: Could not resolve dependencies for project com.dlsc.jpackagefx:module1:jar:1.0-SNAPSHOT: Failed to collect dependencies at org.openjfx:javafx-controls:jar:17.0.0.1: Failed to read artifact descriptor for org.openjfx:javafx-controls:jar:17.0.0.1: Could not transfer artifact org.openjfx:javafx-controls:pom:17.0.0.1 from/to central (https://repo.maven.apache.org/maven2): java.security.NoSuchAlgorithmException: Error constructing implementation (algorithm: Default, provider: SunJSSE, class: sun.security.ssl.SSLContextImpl$DefaultSSLContext): problem accessing trust store -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal on project module1: Could not resolve dependencies for project com.dlsc.jpackagefx:module1:jar:1.0-SNAPSHOT: Failed to collect dependencies at org.openjfx:javafx-controls:jar:17.0.0.1
at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.getDependencies(LifecycleDependencyResolver.java:221)
at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.resolveProjectDependencies(LifecycleDependencyResolver.java:127)
at org.apache.maven.lifecycle.internal.MojoExecutor.ensureDependenciesAreResolved(MojoExecutor.java:246)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:200)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:154)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:146)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:309)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:194)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:107)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:993)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:345)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:191)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
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)
Caused by: org.apache.maven.project.DependencyResolutionException: Could not resolve dependencies for project com.dlsc.jpackagefx:module1:jar:1.0-SNAPSHOT: Failed to collect dependencies at org.openjfx:javafx-controls:jar:17.0.0.1
at org.apache.maven.project.DefaultProjectDependenciesResolver.resolve(DefaultProjectDependenciesResolver.java:177)
at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.getDependencies(LifecycleDependencyResolver.java:195)
... 23 more
Caused by: org.eclipse.aether.collection.DependencyCollectionException: Failed to collect dependencies at org.openjfx:javafx-controls:jar:17.0.0.1
at org.eclipse.aether.internal.impl.DefaultDependencyCollector.collectDependencies(DefaultDependencyCollector.java:300)
at org.eclipse.aether.internal.impl.DefaultRepositorySystem.collectDependencies(DefaultRepositorySystem.java:325)
at org.apache.maven.project.DefaultProjectDependenciesResolver.resolve(DefaultProjectDependenciesResolver.java:169)
... 24 more
Caused by: org.eclipse.aether.resolution.ArtifactDescriptorException: Failed to read artifact descriptor for org.openjfx:javafx-controls:jar:17.0.0.1
at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:283)
at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.readArtifactDescriptor(DefaultArtifactDescriptorReader.java:199)
at org.eclipse.aether.internal.impl.DefaultDependencyCollector.resolveCachedArtifactDescriptor(DefaultDependencyCollector.java:544)
at org.eclipse.aether.internal.impl.DefaultDependencyCollector.getArtifactDescriptorResult(DefaultDependencyCollector.java:528)
at org.eclipse.aether.internal.impl.DefaultDependencyCollector.processDependency(DefaultDependencyCollector.java:418)
at org.eclipse.aether.internal.impl.DefaultDependencyCollector.processDependency(DefaultDependencyCollector.java:372)
at org.eclipse.aether.internal.impl.DefaultDependencyCollector.process(DefaultDependencyCollector.java:360)
at org.eclipse.aether.internal.impl.DefaultDependencyCollector.collectDependencies(DefaultDependencyCollector.java:263)
... 26 more
Caused by: org.eclipse.aether.resolution.ArtifactResolutionException: Could not transfer artifact org.openjfx:javafx-controls:pom:17.0.0.1 from/to central (https://repo.maven.apache.org/maven2): java.security.NoSuchAlgorithmException: Error constructing implementation (algorithm: Default, provider: SunJSSE, class: sun.security.ssl.SSLContextImpl$DefaultSSLContext)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:453)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:255)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:232)
at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:268)
... 33 more
Caused by: org.eclipse.aether.transfer.ArtifactTransferException: Could not transfer artifact org.openjfx:javafx-controls:pom:17.0.0.1 from/to central (https://repo.maven.apache.org/maven2): java.security.NoSuchAlgorithmException: Error constructing implementation (algorithm: Default, provider: SunJSSE, class: sun.security.ssl.SSLContextImpl$DefaultSSLContext)
at org.eclipse.aether.connector.basic.ArtifactTransportListener.transferFailed(ArtifactTransportListener.java:52)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run(BasicRepositoryConnector.java:364)
at org.eclipse.aether.util.concurrency.RunnableErrorForwarder$1.run(RunnableErrorForwarder.java:76)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector$DirectExecutor.execute(BasicRepositoryConnector.java:590)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector.get(BasicRepositoryConnector.java:258)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:529)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:430)
... 36 more
Caused by: org.apache.maven.wagon.TransferFailedException: java.security.NoSuchAlgorithmException: Error constructing implementation (algorithm: Default, provider: SunJSSE, class: sun.security.ssl.SSLContextImpl$DefaultSSLContext)
at org.apache.maven.wagon.providers.http.AbstractHttpClientWagon.fillInputData(AbstractHttpClientWagon.java:1068)
at org.apache.maven.wagon.providers.http.AbstractHttpClientWagon.fillInputData(AbstractHttpClientWagon.java:962)
at org.apache.maven.wagon.StreamWagon.getInputStream(StreamWagon.java:126)
at org.apache.maven.wagon.StreamWagon.getIfNewer(StreamWagon.java:88)
at org.apache.maven.wagon.StreamWagon.get(StreamWagon.java:61)
at org.eclipse.aether.transport.wagon.WagonTransporter$GetTaskRunner.run(WagonTransporter.java:569)
at org.eclipse.aether.transport.wagon.WagonTransporter.execute(WagonTransporter.java:436)
at org.eclipse.aether.transport.wagon.WagonTransporter.get(WagonTransporter.java:413)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector$GetTaskRunner.runTask(BasicRepositoryConnector.java:456)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run(BasicRepositoryConnector.java:359)
... 41 more
Caused by: java.net.SocketException: java.security.NoSuchAlgorithmException: Error constructing implementation (algorithm: Default, provider: SunJSSE, class: sun.security.ssl.SSLContextImpl$DefaultSSLContext)
at java.base/javax.net.ssl.DefaultSSLSocketFactory.throwException(SSLSocketFactory.java:267)
at java.base/javax.net.ssl.DefaultSSLSocketFactory.createSocket(SSLSocketFactory.java:289)
at org.apache.maven.wagon.providers.http.httpclient.conn.ssl.SSLConnectionSocketFactory.createLayeredSocket(SSLConnectionSocketFactory.java:363)
at org.apache.maven.wagon.providers.http.httpclient.conn.ssl.SSLConnectionSocketFactory.connectSocket(SSLConnectionSocketFactory.java:353)
at org.apache.maven.wagon.providers.http.httpclient.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:141)
at org.apache.maven.wagon.providers.http.httpclient.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:353)
at org.apache.maven.wagon.providers.http.httpclient.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:380)
at org.apache.maven.wagon.providers.http.httpclient.impl.execchain.MainClientExec.execute(MainClientExec.java:236)
at org.apache.maven.wagon.providers.http.httpclient.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184)
at org.apache.maven.wagon.providers.http.httpclient.impl.execchain.RetryExec.execute(RetryExec.java:88)
at org.apache.maven.wagon.providers.http.httpclient.impl.execchain.RedirectExec.execute(RedirectExec.java:110)
at org.apache.maven.wagon.providers.http.httpclient.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184)
at org.apache.maven.wagon.providers.http.httpclient.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82)
at org.apache.maven.wagon.providers.http.AbstractHttpClientWagon.execute(AbstractHttpClientWagon.java:834)
at org.apache.maven.wagon.providers.http.AbstractHttpClientWagon.fillInputData(AbstractHttpClientWagon.java:985)
... 50 more
Caused by: java.security.NoSuchAlgorithmException: Error constructing implementation (algorithm: Default, provider: SunJSSE, class: sun.security.ssl.SSLContextImpl$DefaultSSLContext)
at java.base/java.security.Provider$Service.newInstance(Provider.java:1868)
at java.base/sun.security.jca.GetInstance.getInstance(GetInstance.java:236)
at java.base/sun.security.jca.GetInstance.getInstance(GetInstance.java:164)
at java.base/javax.net.ssl.SSLContext.getInstance(SSLContext.java:185)
at java.base/javax.net.ssl.SSLContext.getDefault(SSLContext.java:110)
at java.base/javax.net.ssl.SSLSocketFactory.getDefault(SSLSocketFactory.java:83)
at java.base/javax.net.ssl.HttpsURLConnection.getDefaultSSLSocketFactory(HttpsURLConnection.java:336)
at org.apache.maven.wagon.providers.http.AbstractHttpClientWagon.createConnManager(AbstractHttpClientWagon.java:348)
at org.apache.maven.wagon.providers.http.AbstractHttpClientWagon.<clinit>(AbstractHttpClientWagon.java:274)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:480)
at com.google.inject.internal.DefaultConstructionProxyFactory$1.newInstance(DefaultConstructionProxyFactory.java:86)
at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:105)
at com.google.inject.internal.ConstructorInjector.access$000(ConstructorInjector.java:32)
at com.google.inject.internal.ConstructorInjector$1.call(ConstructorInjector.java:89)
at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:115)
at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:133)
at com.google.inject.internal.ProvisionListenerStackCallback.provision(ProvisionListenerStackCallback.java:68)
at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:87)
at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:267)
at com.google.inject.internal.InjectorImpl$2$1.call(InjectorImpl.java:1016)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1103)
at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1012)
at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1051)
at org.eclipse.sisu.space.AbstractDeferredClass.get(AbstractDeferredClass.java:48)
at com.google.inject.internal.ProviderInternalFactory.provision(ProviderInternalFactory.java:81)
at com.google.inject.internal.InternalFactoryToInitializableAdapter.provision(InternalFactoryToInitializableAdapter.java:53)
at com.google.inject.internal.ProviderInternalFactory$1.call(ProviderInternalFactory.java:65)
at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:115)
at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:133)
at com.google.inject.internal.ProvisionListenerStackCallback.provision(ProvisionListenerStackCallback.java:68)
at com.google.inject.internal.ProviderInternalFactory.circularGet(ProviderInternalFactory.java:63)
at com.google.inject.internal.InternalFactoryToInitializableAdapter.get(InternalFactoryToInitializableAdapter.java:45)
at com.google.inject.internal.InjectorImpl$2$1.call(InjectorImpl.java:1016)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1092)
at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1012)
at org.eclipse.sisu.inject.Guice4$1.get(Guice4.java:162)
at org.eclipse.sisu.inject.LazyBeanEntry.getValue(LazyBeanEntry.java:81)
at org.eclipse.sisu.plexus.LazyPlexusBean.getValue(LazyPlexusBean.java:51)
at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:263)
at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:255)
at org.eclipse.aether.internal.transport.wagon.PlexusWagonProvider.lookup(PlexusWagonProvider.java:67)
at org.eclipse.aether.transport.wagon.WagonTransporter.lookupWagon(WagonTransporter.java:280)
at org.eclipse.aether.transport.wagon.WagonTransporter.<init>(WagonTransporter.java:124)
at org.eclipse.aether.transport.wagon.WagonTransporterFactory.newInstance(WagonTransporterFactory.java:136)
at org.eclipse.aether.internal.impl.DefaultTransporterProvider.newTransporter(DefaultTransporterProvider.java:119)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector.<init>(BasicRepositoryConnector.java:124)
at org.eclipse.aether.connector.basic.BasicRepositoryConnectorFactory.newInstance(BasicRepositoryConnectorFactory.java:189)
at org.eclipse.aether.internal.impl.DefaultRepositoryConnectorProvider.newRepositoryConnector(DefaultRepositoryConnectorProvider.java:122)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:525)
... 37 more
Caused by: java.security.KeyManagementException: problem accessing trust store
at java.base/sun.security.ssl.SSLContextImpl$DefaultManagersHolder.<clinit>(SSLContextImpl.java:942)
at java.base/sun.security.ssl.SSLContextImpl$DefaultSSLContext.<init>(SSLContextImpl.java:1111)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:480)
at java.base/java.security.Provider$Service.newInstanceOf(Provider.java:1879)
at java.base/java.security.Provider$Service.newInstanceUtil(Provider.java:1886)
at java.base/java.security.Provider$Service.newInstance(Provider.java:1861)
... 89 more
After searching a bit further when updating to maven 3.8.7, I inspected my Path variables and noted the following System Variable:
MAVEN_OPTS
-Xmx512m -Djavax.net.ssl.trustStore=/Library/Java/JavaVirtualMachines/jdk-11.0.8.jdk/Contents/Home/lib/security/cacerts -Djavax.net.ssl.trustStorePassword=xxxxxxxx
This pointed to a specific certificate - leading all my maven versions to use an outdated or possibly deleted certificate. I deleted this variable and the maven build worked.
I checked all the other java and maven variables and made sure they make sense.

ArtifactDescriptorException when running a clojure hello world in a docker container

I'm getting ArtifactDescriptorException: Failed to read artifact descriptor for org.clojure:clojure:jar when running a literal hello world program using the command clojure -M file.clj in a docker container. No issue doing it locally. Some googling suggests it might be a maven issue but there're no dependencies so I don't see why it's trying to get anything from a maven repo.
Full error output:
org.clojure:clojure:jar:1.10.2
org.eclipse.aether.resolution.ArtifactDescriptorException: Failed to read artifact descriptor for org.clojure:clojure:jar:1.10.2
at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:255)
at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.readArtifactDescriptor(DefaultArtifactDescriptorReader.java:171)
at org.eclipse.aether.internal.impl.DefaultRepositorySystem.readArtifactDescriptor(DefaultRepositorySystem.java:255)
at clojure.tools.deps.alpha.extensions.maven$eval1068$fn__1070.invoke(maven.clj:107)
at clojure.lang.MultiFn.invoke(MultiFn.java:244)
at clojure.tools.deps.alpha$expand_deps$children_task__785$fn__787$fn__788.invoke(alpha.clj:403)
at clojure.tools.deps.alpha.util.concurrent$submit_task$task__502.invoke(concurrent.clj:34)
at clojure.lang.AFn.call(AFn.java:18)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: org.eclipse.aether.resolution.ArtifactResolutionException: Could not transfer artifact org.clojure:clojure:pom:1.10.2 from/to central (https://repo1.maven.org/maven2/): repo1.maven.org: Temporary failure in name resolution
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:424)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:229)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:207)
at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:240)
... 11 more
Caused by: org.eclipse.aether.transfer.ArtifactTransferException: Could not transfer artifact org.clojure:clojure:pom:1.10.2 from/to central (https://repo1.maven.org/maven2/): repo1.maven.org: Temporary failure in name resolution
at org.eclipse.aether.connector.basic.ArtifactTransportListener.transferFailed(ArtifactTransportListener.java:52)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run(BasicRepositoryConnector.java:369)
at org.eclipse.aether.util.concurrency.RunnableErrorForwarder$1.run(RunnableErrorForwarder.java:75)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector$DirectExecutor.execute(BasicRepositoryConnector.java:628)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector.get(BasicRepositoryConnector.java:262)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:499)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:401)
... 14 more
Caused by: java.net.UnknownHostException: repo1.maven.org: Temporary failure in name resolution
at java.base/java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)
at java.base/java.net.InetAddress$PlatformNameService.lookupAllHostAddr(InetAddress.java:929)
at java.base/java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1529)
at java.base/java.net.InetAddress$NameServiceAddresses.get(InetAddress.java:848)
at java.base/java.net.InetAddress.getAllByName0(InetAddress.java:1519)
at java.base/java.net.InetAddress.getAllByName(InetAddress.java:1378)
at java.base/java.net.InetAddress.getAllByName(InetAddress.java:1306)
at org.apache.http.impl.conn.SystemDefaultDnsResolver.resolve(SystemDefaultDnsResolver.java:45)
at org.apache.http.impl.conn.DefaultClientConnectionOperator.resolveHostname(DefaultClientConnectionOperator.java:263)
at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:162)
at org.apache.http.impl.conn.ManagedClientConnectionImpl.open(ManagedClientConnectionImpl.java:326)
at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:605)
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:440)
at org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:835)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:72)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:56)
at org.apache.http.impl.client.DecompressingHttpClient.execute(DecompressingHttpClient.java:164)
at org.eclipse.aether.transport.http.HttpTransporter.execute(HttpTransporter.java:290)
at org.eclipse.aether.transport.http.HttpTransporter.implGet(HttpTransporter.java:246)
at org.eclipse.aether.spi.connector.transport.AbstractTransporter.get(AbstractTransporter.java:67)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector$GetTaskRunner.runTask(BasicRepositoryConnector.java:457)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run(BasicRepositoryConnector.java:364)
... 19 more

Could not find artifact org.springframework.boot:spring-boot-starter:jar:2.0.0.BUILD-SNAPSHOT in local-developer-group while running spring-boot-cli

I'm trying to follow the instruction on how to run a Spring application from command line: getting-started-cli-example. After I run the application by entering spring run app.groovy I got the following error:
C:\Users\Administrator\Desktop>spring run app.groovy
startup failed:
General error during conversion: org.eclipse.aether.resolution.DependencyResolutionException: The fo
llowing artifacts could not be resolved: org.springframework.boot:spring-boot-starter:jar:2.0.0.BUIL
D-SNAPSHOT, org.springframework.boot:spring-boot-starter-web:jar:2.0.0.BUILD-SNAPSHOT: Could not fin
d artifact org.springframework.boot:spring-boot-starter:jar:2.0.0.BUILD-SNAPSHOT in local-developer-
group (http://192.168.10.245:8081/nexus/content/groups/public)
org.springframework.boot.cli.compiler.grape.DependencyResolutionFailedException: org.eclipse.aether.
resolution.DependencyResolutionException: The following artifacts could not be resolved: org.springf
ramework.boot:spring-boot-starter:jar:2.0.0.BUILD-SNAPSHOT, org.springframework.boot:spring-boot-sta
rter-web:jar:2.0.0.BUILD-SNAPSHOT: Could not find artifact org.springframework.boot:spring-boot-star
ter:jar:2.0.0.BUILD-SNAPSHOT in local-developer-group (http://192.168.10.245:8081/nexus/content/grou
ps/public)
at org.springframework.boot.cli.compiler.grape.AetherGrapeEngine.resolve(AetherGrapeEngine.java:322)
at org.springframework.boot.cli.compiler.grape.AetherGrapeEngine.grab(AetherGrapeEngine.java:127)
at groovy.grape.Grape.grab(Grape.java:167)
at groovy.grape.GrabAnnotationTransformation.visit(GrabAnnotationTransformation.java:378)
at org.codehaus.groovy.transform.ASTTransformationVisitor$3.call(ASTTransformationVisitor.java:321)
at org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:931)
at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:593)
at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:569)
at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:546)
at org.springframework.boot.cli.compiler.GroovyCompiler.compile(GroovyCompiler.java:205)
at org.springframework.boot.cli.command.run.SpringApplicationRunner.compile(SpringApplicationRunner.java:129)
at org.springframework.boot.cli.command.run.SpringApplicationRunner.compileAndRun(SpringApplicationRunner.java:101)
at org.springframework.boot.cli.command.run.RunCommand$RunOptionHandler.run(RunCommand.java:111)
at org.springframework.boot.cli.command.options.OptionHandler.run(OptionHandler.java:84)
at org.springframework.boot.cli.command.OptionParsingCommand.run(OptionParsingCommand.java:54)
at org.springframework.boot.cli.command.CommandRunner.run(CommandRunner.java:219)
at org.springframework.boot.cli.command.CommandRunner.runAndHandleErrors(CommandRunner.java:171)
at org.springframework.boot.cli.SpringCli.main(SpringCli.java:63)
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.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:87)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:50)
at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:51)
Caused by: org.eclipse.aether.resolution.DependencyResolutionException: The following artifacts coul
d not be resolved: org.springframework.boot:spring-boot-starter:jar:2.0.0.BUILD-SNAPSHOT, org.spring
framework.boot:spring-boot-starter-web:jar:2.0.0.BUILD-SNAPSHOT: Could not find artifact org.springf
ramework.boot:spring-boot-starter:jar:2.0.0.BUILD-SNAPSHOT in local-developer-group (http://192.168.
10.245:8081/nexus/content/groups/public)
at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:384)
at org.springframework.boot.cli.compiler.grape.AetherGrapeEngine.resolve(AetherGrapeEngine.java:317)
... 25 more
Caused by: org.eclipse.aether.resolution.ArtifactResolutionException: The following artifacts could
not be resolved: org.springframework.boot:spring-boot-starter:jar:2.0.0.BUILD-SNAPSHOT, org.springfr
amework.boot:spring-boot-starter-web:jar:2.0.0.BUILD-SNAPSHOT: Could not find artifact org.springfra
mework.boot:spring-boot-starter:jar:2.0.0.BUILD-SNAPSHOT in local-developer-group (http://192.168.10
.245:8081/nexus/content/groups/public)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:444)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:246)
at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:367)
... 26 more
Caused by: org.eclipse.aether.transfer.ArtifactNotFoundException: Could not find artifact org.spring
framework.boot:spring-boot-starter:jar:2.0.0.BUILD-SNAPSHOT in local-developer-group (http://192.168
.10.245:8081/nexus/content/groups/public)
at org.eclipse.aether.connector.basic.ArtifactTransportListener.transferFailed(ArtifactTransportListener.java:39)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run(BasicRepositoryConnector.java:355)
at org.eclipse.aether.util.concurrency.RunnableErrorForwarder$1.run(RunnableErrorForwarder.java:67)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
1 error
I tried to change the local-developer-group url in settings.xml of my maven installation to http://repo.spring.io/snapshot/ since the error report clearly says the required artifact cannot be found, but still I got the the same error. It seems the spring-boot-cli doesn't use the settings of my maven installation. But I couldn't think of another place where this url can be specified.
You should use the release version of spring-boot-cli instead of the cutting edge snapshot version: Manual installation.
The maven settings.xml spring-boot-cli uses is located in the .m2 directory.

I can not get the jar file by maven

I am treying to download the JXTA 2.7 by maven in Netbeans but i do not manage to to that. Do you have any idea why? I got the fellowing panel loading error;
org.apache.maven.project.ProjectBuildingException: Error resolving project artifact: Could not transfer artifact com.kenai.jxse:jxse:pom:2.7 from/to repository.jboss.org (http://repository.jboss.org/maven2): Access denied to: http://repository.jboss.org/maven2/com/kenai/jxse/jxse/2.7/jxse-2.7.pom, ReasonPhrase:Forbidden. for project com.kenai.jxse:jxse:jar:2.7
at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:296)
at org.apache.maven.project.DefaultMavenProjectBuilder.buildFromRepository(DefaultMavenProjectBuilder.java:236)
at org.apache.maven.project.DefaultMavenProjectBuilder.buildFromRepository(DefaultMavenProjectBuilder.java:251)
at org.apache.maven.project.DefaultMavenProjectBuilder.buildFromRepository(DefaultMavenProjectBuilder.java:258)
at org.netbeans.modules.maven.repository.ui.ArtifactMultiViewFactory.readMavenProject(ArtifactMultiViewFactory.java:237)
at org.netbeans.modules.maven.repository.ui.ArtifactMultiViewFactory.access$000(ArtifactMultiViewFactory.java:103)
at org.netbeans.modules.maven.repository.ui.ArtifactMultiViewFactory$1.run(ArtifactMultiViewFactory.java:166)
at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1411)
at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1991)
Caused by: org.sonatype.aether.resolution.ArtifactResolutionException: Could not transfer artifact com.kenai.jxse:jxse:pom:2.7 from/to repository.jboss.org (http://repository.jboss.org/maven2): Access denied to: http://repository.jboss.org/maven2/com/kenai/jxse/jxse/2.7/jxse-2.7.pom, ReasonPhrase:Forbidden.
at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:538)
at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:216)
at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:193)
at org.sonatype.aether.impl.internal.DefaultRepositorySystem.resolveArtifact(DefaultRepositorySystem.java:286)
at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:285)
... 8 more
Caused by: org.sonatype.aether.transfer.ArtifactTransferException: Could not transfer artifact com.kenai.jxse:jxse:pom:2.7 from/to repository.jboss.org (http://repository.jboss.org/maven2): Access denied to: http://repository.jboss.org/maven2/com/kenai/jxse/jxse/2.7/jxse-2.7.pom, ReasonPhrase:Forbidden.
at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(WagonRepositoryConnector.java:951)
at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(WagonRepositoryConnector.java:941)
at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$GetTask.run(WagonRepositoryConnector.java:669)
at org.sonatype.aether.util.concurrency.RunnableErrorForwarder$1.run(RunnableErrorForwarder.java:60)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Caused by: org.apache.maven.wagon.authorization.AuthorizationException: Access denied to: http://repository.jboss.org/maven2/com/kenai/jxse/jxse/2.7/jxse-2.7.pom, ReasonPhrase:Forbidden.
at org.apache.maven.wagon.shared.http4.AbstractHttpClientWagon.fillInputData(AbstractHttpClientWagon.java:835)
at org.apache.maven.wagon.StreamWagon.getInputStream(StreamWagon.java:116)
at org.apache.maven.wagon.StreamWagon.getIfNewer(StreamWagon.java:88)
at org.apache.maven.wagon.StreamWagon.get(StreamWagon.java:61)
at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$GetTask.run(WagonRepositoryConnector.java:601)
... 4 more
Looks like the repository (http://repository.jboss.org/maven2/com/kenai/jxse/jxse/2.7/jxse-2.7.pom) that you are using is deprecated and is disabled.
See this and this.
There is some more information in this jira issue: https://issues.jboss.org/browse/JBBUILD-682

Arquillian/Shrinkwrap MavenDependencyResolver behind proxy

I'm using Jenkins to execute a Maven Build which includes an EJB integration test using Arquillian.
The server hosting the Jenkins and running the build is behind a proxy, which shouldn't be a problem because the settings.xml contains the valid proxy settings. (On my local system with no proxy it's working just fine.)
Resolving the dependencies by maven (while running mvn install) works perfectly fine (started manually from bash or by Jenkins) but if I use the MavenDependencyResolver of Arquillian I get an Exception:
Exception
2011-06-09 06:03:59,391 ERROR my.package.test.util.ArchiveUtil - Could not resolve DBUnit Dependency
org.jboss.shrinkwrap.resolver.api.ResolutionException: Unable to collect dependeny tree for a resolution
at org.jboss.shrinkwrap.resolver.impl.maven.MavenBuilderImpl.resolveAsFiles(MavenBuilderImpl.java:320)
at org.jboss.shrinkwrap.resolver.impl.maven.MavenBuilderImpl.resolveAs(MavenBuilderImpl.java:376)
at org.jboss.shrinkwrap.resolver.impl.maven.MavenBuilderImpl.resolveAs(MavenBuilderImpl.java:353)
at org.jboss.shrinkwrap.resolver.impl.maven.MavenBuilderImpl$MavenArtifactBuilderImpl.resolveAs(MavenBuilderImpl.java:450)
at my.package.test.util.ArchiveUtil.createTestArchive(ArchiveUtil.java:125)
at my.package.test.util.ArchiveUtil.<clinit>(ArchiveUtil.java:36)
at my.package.test.util.AbstractTest.createTestArchive(AbstractTest.java:46)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.arquillian.impl.client.deployment.AnnotationDeploymentScenarioGenerator.invoke(AnnotationDeploymentScenarioGenerator.java:162)
at org.jboss.arquillian.impl.client.deployment.AnnotationDeploymentScenarioGenerator.generateDeployment(AnnotationDeploymentScenarioGenerator.java:100)
at org.jboss.arquillian.impl.client.deployment.AnnotationDeploymentScenarioGenerator.generate(AnnotationDeploymentScenarioGenerator.java:55)
at org.jboss.arquillian.impl.client.deployment.DeploymentGenerator.generateDeployment(DeploymentGenerator.java:76)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.arquillian.impl.core.ObserverImpl.invoke(ObserverImpl.java:90)
at org.jboss.arquillian.impl.core.EventContextImpl.invokeObservers(EventContextImpl.java:98)
at org.jboss.arquillian.impl.core.EventContextImpl.proceed(EventContextImpl.java:80)
at org.jboss.arquillian.impl.core.ManagerImpl.fire(ManagerImpl.java:126)
at org.jboss.arquillian.impl.core.ManagerImpl.fire(ManagerImpl.java:106)
at org.jboss.arquillian.impl.core.EventImpl.fire(EventImpl.java:67)
at org.jboss.arquillian.impl.client.ContainerEventController.execute(ContainerEventController.java:68)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.arquillian.impl.core.ObserverImpl.invoke(ObserverImpl.java:90)
at org.jboss.arquillian.impl.core.EventContextImpl.invokeObservers(EventContextImpl.java:98)
at org.jboss.arquillian.impl.core.EventContextImpl.proceed(EventContextImpl.java:80)
at org.jboss.arquillian.impl.TestContextHandler.createClassContext(TestContextHandler.java:68)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.arquillian.impl.core.ObserverImpl.invoke(ObserverImpl.java:90)
at org.jboss.arquillian.impl.core.EventContextImpl.proceed(EventContextImpl.java:87)
at org.jboss.arquillian.impl.TestContextHandler.createSuiteContext(TestContextHandler.java:54)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.arquillian.impl.core.ObserverImpl.invoke(ObserverImpl.java:90)
at org.jboss.arquillian.impl.core.EventContextImpl.proceed(EventContextImpl.java:87)
at org.jboss.arquillian.impl.core.ManagerImpl.fire(ManagerImpl.java:126)
at org.jboss.arquillian.impl.core.ManagerImpl.fire(ManagerImpl.java:106)
at org.jboss.arquillian.impl.EventTestRunnerAdaptor.beforeClass(EventTestRunnerAdaptor.java:70)
at org.jboss.arquillian.junit.Arquillian$2.evaluate(Arquillian.java:170)
at org.jboss.arquillian.junit.Arquillian.multiExecute(Arquillian.java:303)
at org.jboss.arquillian.junit.Arquillian.access$300(Arquillian.java:45)
at org.jboss.arquillian.junit.Arquillian$3.evaluate(Arquillian.java:187)
at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
at org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:127)
at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:59)
at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:120)
at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:103)
at org.apache.maven.surefire.Surefire.run(Surefire.java:169)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:350)
at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1021)
Caused by: org.sonatype.aether.collection.DependencyCollectionException: Failed to collect dependencies for [org.dbunit:dbunit:jar:2.4.8 ()]
at org.sonatype.aether.impl.internal.DefaultDependencyCollector.collectDependencies(DefaultDependencyCollector.java:251)
at org.sonatype.aether.impl.internal.DefaultRepositorySystem.collectDependencies(DefaultRepositorySystem.java:267)
at org.sonatype.aether.impl.internal.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:314)
at org.jboss.shrinkwrap.resolver.impl.maven.MavenRepositorySystem.resolveDependencies(MavenRepositorySystem.java:176)
at org.jboss.shrinkwrap.resolver.impl.maven.MavenBuilderImpl.resolveAsFiles(MavenBuilderImpl.java:316)
... 65 more
Caused by: org.sonatype.aether.resolution.ArtifactDescriptorException: Failed to read artifact descriptor for org.dbunit:dbunit:jar:2.4.8
at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:275)
at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.readArtifactDescriptor(DefaultArtifactDescriptorReader.java:171)
at org.sonatype.aether.impl.internal.DefaultDependencyCollector.process(DefaultDependencyCollector.java:419)
at org.sonatype.aether.impl.internal.DefaultDependencyCollector.collectDependencies(DefaultDependencyCollector.java:233)
... 69 more
Caused by: org.sonatype.aether.resolution.ArtifactResolutionException: Could not transfer artifact org.dbunit:dbunit:pom:2.4.8 from/to central (http://repo1.maven.org/maven2): Error transferring file: Connection timed out
at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:499)
at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:187)
at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:260)
... 72 more
Caused by: org.sonatype.aether.transfer.ArtifactTransferException: Could not transfer artifact org.dbunit:dbunit:pom:2.4.8 from/to central (http://repo1.maven.org/maven2): Error transferring file: Connection timed out
at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(WagonRepositoryConnector.java:934)
at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(WagonRepositoryConnector.java:925)
at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$GetTask.flush(WagonRepositoryConnector.java:681)
at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$GetTask.flush(WagonRepositoryConnector.java:675)
at org.sonatype.aether.connector.wagon.WagonRepositoryConnector.get(WagonRepositoryConnector.java:420)
at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:411)
... 74 more
Caused by: org.apache.maven.wagon.TransferFailedException: Error transferring file: Connection timed out
at org.apache.maven.wagon.providers.http.LightweightHttpWagon.resourceExists(LightweightHttpWagon.java:357)
at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$GetTask.run(WagonRepositoryConnector.java:566)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.net.ConnectException: Connection timed out
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:213)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:529)
at java.net.Socket.connect(Socket.java:478)
at sun.net.NetworkClient.doConnect(NetworkClient.java:163)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:394)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:529)
at sun.net.www.http.HttpClient.<init>(HttpClient.java:233)
at sun.net.www.http.HttpClient.New(HttpClient.java:306)
at sun.net.www.http.HttpClient.New(HttpClient.java:323)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:970)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:911)
at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:836)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1172)
at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:379)
at org.apache.maven.wagon.providers.http.LightweightHttpWagon.resourceExists(LightweightHttpWagon.java:334)
... 4 more
Java Source
//...
try {
ear.addAsLibrary(DependencyResolvers
.use(MavenDependencyResolver.class)
.artifact("org.dbunit:dbunit:1.4.8")
.resolveAs(JavaArchive.class).iterator().next());
} catch (Throwable t) {
LOGGER.error("Could not resolve DBUnit Dependency", t);
}
//...
pom.xml
<dependency>
<groupId>org.dbunit</groupId>
<artifactId>dbunit</artifactId>
<version>${dbunit.version}</version>
<scope>test</scope>
</dependency>
How can I make sure this java code gets there is a proxy (if the missing proxy is the issue). Do I have to use environment variable or a settings.xml?
Is there an other solution to get this dependency with Shrinkwarp, e.g. as a jar? (I guess this would be my preferred solution.)
Environment Details
Server OS: Ubuntu 10.04
Maven 3.03
Jenkins 1.413 running on Tomcat 7
Arquillian 1.0.0.Alpha5
Thank you.
Daniel
proxy support for dependency resolution is not currently supported.
However, you can specify a path to settings.xml, which is used to activate specific repositories mentioned directly or in active (activated profiles).
See for comprehensive example:
https://github.com/shrinkwrap/resolver/blob/master/impl-maven/src/test/java/org/jboss/shrinkwrap/resolver/impl/maven/integration/ProfilesUnitTestCase.java
Basically, to summarize settings.xml magic:
By default, ${user.home}/.m2/settings.xml
Can be overridden by setting a system property org.apache.maven.user-settings
or org.apache.maven.user-settings
Can use MavenDependencyResolver.configureFrom(path-to-settings.xml-file) in your test
Cheers,
Karel
This is the same problem I'm running into as well. I've tried setting the -Dhttp.proxyHost -Dhttp.proxyPort on the JVM running the test, but still with no success. I finally had to resolve the Maven dependency via command line so that it would download to my repository before the test would start working. It would seem reasonable to assume that the Maven dependency resolver, running with the JVM, would utilize the HttpConnection class of the JVM to download the library. That's not the case, apparently.

Categories

Resources