Deploy Failing For Tibco BW 6 Application Using Maven - maven-3

I am deploying my Tibco application ( built in BW 6.x version) via maven 3.5.3 version but deployment is failing. Not sure why its not able to deploy.
Below is error message.
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 12.323 s
[INFO] Finished at: 2018-06-08T10:01:12Z
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.tibco.plugins:bw6-maven-plugin:1.3.1:bwinstal
l (default-bwinstall) on project EmployeeApplication.application: Failed to depl
oy BW Application : Connection refused: connect -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal c
om.tibco.plugins:bw6-maven-plugin:1.3.1:bwinstall (default-bwinstall) on project
EmployeeApplication.application: Failed to deploy BW Application
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.ja
va:213)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.ja
va:154)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.ja
va: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.SingleThreaded
Builder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleSt
arter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
I have attached POM file used for my application.

check the dependencies in the parent pom and also the version has to be the same in all the dependent modules

Related

Another error during iOS build in Eclipse on MacBook using the example codenameone project

Thanks to the help by Shai and Steve, I am making progress to build the iOS Xcode project in Eclipse. After installing cocoapods (Failed to build iOS Xcode project in Eclipse using the example codenameone project) and JDK 11 (Cannot run program "xcodebuild" in Eclipse on MacBook using the example codenameone project), my build failed at a later stage. I posted the stack trace below, although I am not sure the cause of failure. One info line says "Failed to fix xcode project schemes. Make sure you have Cocoapods installed". I did "brew list cocoapods" and saw version 1.11.3_1 installed at /usr/local/Cellar/cocoapods. The info lines above that line suggest that repeated efforts to chmod a particular file (/Users/user2016/Downloads/mycnoapp/ios/target/codenameone/antProject/dist/ios-build/hooks/fix_xcode_schemes.rb) failed. However when I went into /Users/user2016/Downloads/mycnoapp/ios/target/codenameone/antProject/dist/ios-build/ and watched its content during build, I saw sub directories created in that directory then deleted but did not see the "hooks" subdirectory. I don't know how to debug further.
Thank you for your help.
[[1;34mINFO[m] Parsing: /Users/user2016/Downloads/mycnoapp/ios/target/codenameone/antProject/dist/ios-build/classes/com/codename1/media/RemoteControlCallback$6.class
[[1;34mINFO[m] Parsing: /Users/user2016/Downloads/mycnoapp/ios/target/codenameone/antProject/dist/ios-build/classes/com/codename1/media/AbstractMedia.class
[[1;34mINFO[m] Parsing: /Users/user2016/Downloads/mycnoapp/ios/target/codenameone/antProject/dist/ios-build/classes/com/codename1/media/RemoteControlCallback$4.class
[[1;34mINFO[m] Parsing: /Users/user2016/Downloads/mycnoapp/ios/target/codenameone/antProject/dist/ios-build/classes/com/codename1/media/MediaManager.class
[[1;34mINFO[m] Parsing: /Users/user2016/Downloads/mycnoapp/ios/target/codenameone/antProject/dist/ios-build/classes/com/codename1/media/AbstractMedia$2StateChangeListener.class
[[1;34mINFO[m]
Parsing: /Users/user2016/Downloads/mycnoapp/ios/target/codenameone/antProject/dist/ios-build/classes/com/codename1/media/AudioBuffer$1.class
[[1;34mINFO[m] Rewrite /Users/user2016/Downloads/mycnoapp/ios/target/codenameone/antProject/dist/ios-build/dist/MyCNOApp-src/cn1_globals.h with 1 changes
[[1;34mINFO[m] outputDirectory is: /Users/user2016/Downloads/mycnoapp/ios/target/codenameone/antProject/dist/ios-build/dist/MyCNOApp-src
[[1;34mINFO[m]
[[1;34mINFO[m] 43 native files
[[1;34mINFO[m] Native files total 1035K
[[1;34mINFO[m] Optimizer On: Removing unused methods and classes...
[[1;34mINFO[m] cullClasses()
[[1;34mINFO[m] cullClasses()
[[1;34mINFO[m] cullClasses()
[[1;34mINFO[m] cullClasses()
[[1;34mINFO[m] cullClasses()
unusued Method cull removed 5729 methods in 30 seconds
[[1;34mINFO[m] Rewrite /Users/user2016/Downloads/mycnoapp/ios/target/codenameone/antProject/dist/ios-build/dist/MyCNOApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata with 1 changes
[[1;34mINFO[m] Rewrite /Users/user2016/Downloads/mycnoapp/ios/target/codenameone/antProject/dist/ios-build/dist/MyCNOApp.xcodeproj/project.pbxproj with 60 changes
[[1;34mINFO[m] Rewrite /Users/user2016/Downloads/mycnoapp/ios/target/codenameone/antProject/dist/ios-build/dist/MyCNOApp-src/MyCNOApp-Info.plist with 5 changes
[[1;34mINFO[m] Process return code is 0
[[1;34mINFO[m] Executing:
[[1;34mINFO[m] echo chmod 0755 /Users/user2016/Downloads/mycnoapp/ios/target/codenameone/antProject/dist/ios-build/hooks/fix_xcode_schemes.rb
[[1;34mINFO[m] Executing with timeout -1
[[1;34mINFO[m] chmod 0755 /Users/user2016/Downloads/mycnoapp/ios/target/codenameone/antProject/dist/ios-build/hooks/fix_xcode_schemes.rb
[[1;34mINFO[m] Process return code is 0
[[1;34mINFO[m] Executing:
[[1;34mINFO[m] chmod 0755 /Users/user2016/Downloads/mycnoapp/ios/target/codenameone/antProject/dist/ios-build/hooks/fix_xcode_schemes.rb
[[1;34mINFO[m] Executing with timeout -1
[[1;34mINFO[m] Process return code is 0
[[1;34mINFO[m] Executing:
[[1;34mINFO[m] echo /Users/user2016/Downloads/mycnoapp/ios/target/codenameone/antProject/dist/ios-build/hooks/fix_xcode_schemes.rb
[[1;34mINFO[m] Executing with timeout -1
[[1;34mINFO[m] /Users/user2016/Downloads/mycnoapp/ios/target/codenameone/antProject/dist/ios-build/hooks/fix_xcode_schemes.rb
[[1;34mINFO[m] Process return code is 0
[[1;34mINFO[m] Executing:
[[1;34mINFO[m] /Users/user2016/Downloads/mycnoapp/ios/target/codenameone/antProject/dist/ios-build/hooks/fix_xcode_schemes.rb
[[1;34mINFO[m] Executing with timeout -1
[[1;34mINFO[m] /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- xcodeproj (LoadError)
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /Users/user2016/Downloads/mycnoapp/ios/target/codenameone/antProject/dist/ios-build/hooks/fix_xcode_schemes.rb:2:in `<main>'
[[1;34mINFO[m] Process return code is 1
[[1;34mINFO[m] Failed to fix xcode project schemes. Make sure you have Cocoapods installed.
[[1;34mINFO[m] [1m------------------------------------------------------------------------[m
[[1;34mINFO[m] [1mReactor Summary for mycnoapp 1.0-SNAPSHOT:[m
[[1;34mINFO[m]
[[1;34mINFO[m] mycnoapp ........................................... [1;32mSUCCESS[m [ 0.010 s]
[[1;34mINFO[m] mycnoapp-common .................................... [1;32mSUCCESS[m [ 7.675 s]
[[1;34mINFO[m] mycnoapp-ios ....................................... [1;31mFAILURE[m [ 54.198 s]
[[1;34mINFO[m] [1m------------------------------------------------------------------------[m
[[1;34mINFO[m] [1;31mBUILD FAILURE[m
[[1;34mINFO[m] [1m------------------------------------------------------------------------[m
[[1;34mINFO[m] Total time: 01:02 min
[[1;34mINFO[m] Finished at: 2023-01-23T16:51:42-05:00
[[1;34mINFO[m] [1m------------------------------------------------------------------------[m
[[1;31mERROR[m] Failed to execute goal [32mcom.codenameone:codenameone-maven-plugin:7.0.86:build[m [1m(build-ios)[m on project [36mmycnoapp-ios[m: [1;31miOS build failed[m -> [1m[Help 1][m
[1;31morg.apache.maven.lifecycle.LifecycleExecutionException[m: [1;31mFailed to execute goal [32mcom.codenameone:codenameone-maven-plugin:7.0.86:build[m [1m(build-ios)[m on project [36mmycnoapp-ios[m: [1;31miOS build failed[m[m
[1mat[m org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 ([1mMojoExecutor.java:375[m)
[1mat[m org.apache.maven.lifecycle.internal.MojoExecutor.doExecute ([1mMojoExecutor.java:351[m)
[1mat[m org.apache.maven.lifecycle.internal.MojoExecutor.execute ([1mMojoExecutor.java:215[m)
[1mat[m org.apache.maven.lifecycle.internal.MojoExecutor.execute ([1mMojoExecutor.java:171[m)
[1mat[m org.apache.maven.lifecycle.internal.MojoExecutor.execute ([1mMojoExecutor.java:163[m)
[1mat[m org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject ([1mLifecycleModuleBuilder.java:117[m)
[1mat[m org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject ([1mLifecycleModuleBuilder.java:81[m)
[1mat[m org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build ([1mSingleThreadedBuilder.java:56[m)
[1mat[m org.apache.maven.lifecycle.internal.LifecycleStarter.execute ([1mLifecycleStarter.java:128[m)
[1mat[m org.apache.maven.DefaultMaven.doExecute ([1mDefaultMaven.java:294[m)
[1mat[m org.apache.maven.DefaultMaven.doExecute ([1mDefaultMaven.java:192[m)
[1mat[m org.apache.maven.DefaultMaven.execute ([1mDefaultMaven.java:105[m)
[1mat[m org.apache.maven.cli.MavenCli.execute ([1mMavenCli.java:960[m)
[1mat[m org.apache.maven.cli.MavenCli.doMain ([1mMavenCli.java:293[m)
[1mat[m org.apache.maven.cli.MavenCli.main ([1mMavenCli.java:196[m)
[1mat[m jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 ([1mNative Method[m)
[1mat[m jdk.internal.reflect.NativeMethodAccessorImpl.invoke ([1mNativeMethodAccessorImpl.java:62[m)
[1mat[m jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke ([1mDelegatingMethodAccessorImpl.java:43[m)
[1mat[m java.lang.reflect.Method.invoke ([1mMethod.java:566[m)
[1mat[m org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced ([1mLauncher.java:282[m)
[1mat[m org.codehaus.plexus.classworlds.launcher.Launcher.launch ([1mLauncher.java:225[m)
[1mat[m org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode ([1mLauncher.java:406[m)
[1mat[m org.codehaus.plexus.classworlds.launcher.Launcher.main ([1mLauncher.java:347[m)
[1mCaused by[m: org.apache.maven.plugin.MojoExecutionException: [1;31miOS build failed[m
[1mat[m com.codename1.maven.CN1BuildMojo.doIOSLocalBuild ([1mCN1BuildMojo.java:1016[m)
[1mat[m com.codename1.maven.CN1BuildMojo.createAntProject ([1mCN1BuildMojo.java:564[m)
[1mat[m com.codename1.maven.CN1BuildMojo.executeImpl ([1mCN1BuildMojo.java:116[m)
[1mat[m com.codename1.maven.AbstractCN1Mojo.execute ([1mAbstractCN1Mojo.java:195[m)
[1mat[m org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo ([1mDefaultBuildPluginManager.java:137[m)
[1mat[m org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 ([1mMojoExecutor.java:370[m)
[1mat[m org.apache.maven.lifecycle.internal.MojoExecutor.doExecute ([1mMojoExecutor.java:351[m)
[1mat[m org.apache.maven.lifecycle.internal.MojoExecutor.execute ([1mMojoExecutor.java:215[m)
[1mat[m org.apache.maven.lifecycle.internal.MojoExecutor.execute ([1mMojoExecutor.java:171[m)
[1mat[m org.apache.maven.lifecycle.internal.MojoExecutor.execute ([1mMojoExecutor.java:163[m)
[1mat[m org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject ([1mLifecycleModuleBuilder.java:117[m)
[1mat[m org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject ([1mLifecycleModuleBuilder.java:81[m)
[1mat[m org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build ([1mSingleThreadedBuilder.java:56[m)
[1mat[m org.apache.maven.lifecycle.internal.LifecycleStarter.execute ([1mLifecycleStarter.java:128[m)
[1mat[m org.apache.maven.DefaultMaven.doExecute ([1mDefaultMaven.java:294[m)
[1mat[m org.apache.maven.DefaultMaven.doExecute ([1mDefaultMaven.java:192[m)
[1mat[m org.apache.maven.DefaultMaven.execute ([1mDefaultMaven.java:105[m)
[1mat[m org.apache.maven.cli.MavenCli.execute ([1mMavenCli.java:960[m)
[1mat[m org.apache.maven.cli.MavenCli.doMain ([1mMavenCli.java:293[m)
[1mat[m org.apache.maven.cli.MavenCli.main ([1mMavenCli.java:196[m)
[1mat[m jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 ([1mNative Method[m)
[1mat[m jdk.internal.reflect.NativeMethodAccessorImpl.invoke ([1mNativeMethodAccessorImpl.java:62[m)
[1mat[m jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke ([1mDelegatingMethodAccessorImpl.java:43[m)
[1mat[m java.lang.reflect.Method.invoke ([1mMethod.java:566[m)
[1mat[m org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced ([1mLauncher.java:282[m)
[1mat[m org.codehaus.plexus.classworlds.launcher.Launcher.launch ([1mLauncher.java:225[m)
[1mat[m org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode ([1mLauncher.java:406[m)
[1mat[m org.codehaus.plexus.classworlds.launcher.Launcher.main ([1mLauncher.java:347[m)
[[1;31mERROR[m]
[[1;31mERROR[m]
[[1;31mERROR[m] For more information about the errors and possible solutions, please read the following articles:
[[1;31mERROR[m] [1m[Help 1][m http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[[1;31mERROR[m]
[[1;31mERROR[m] After correcting the problems, you can resume the build with the command
[[1;31mERROR[m] [1mmvn <args> -rf :mycnoapp-ios[m
I did "build iOS Xcode Project" in Eclipse on the sample codename one project. The first encountered error says "Failed to execute goal com.codenameone:codenameone-maven-plugin:7.0.86:build (build-ios) on project mycnoapp-ios: iOS build failed".
You need to install cocoapods e.g. using:
sudo gem install cocoapods
In the command line.

Cannot run program "xcodebuild" in Eclipse on MacBook using the example codenameone project

I am trying to build an iOS Xcode project in Eclipse on MacBook Pro using codename one's example project. Shai and Steve at Codename One have helped to solve the cocoapods installation issue (Failed to build iOS Xcode project in Eclipse using the example codenameone project). In a subsequent build/run, another error showed up: "Cannot run program "xcodebuild" (in directory "/Users/user2016/Downloads/mycnoapp/ios/target/codenameone/antProject/dist/ios-build"): error=2, No such file or directory"
I can execute "xcodebuild" from the command line. There is no file under the "/Users/user2016/Downloads/mycnoapp/ios/target/codenameone/antProject/dist/ios-build" directory. I looked at all text files under the project tree but did not find how to fix this issue. I don't know whether the subsequent error on "failed to run retrolambda" is a result of the xcodebuild error.
Thank you for your help.
[[1;36mDEBUG[m] (f) project = MavenProject: com.example.mycnoapp:mycnoapp-ios:1.0-SNAPSHOT # /Users/user2016/Downloads/mycnoapp/ios/pom.xml
[[1;36mDEBUG[m] (f) remoteRepositories = [ id: central
url: https://repo.maven.apache.org/maven2
layout: default
snapshots: [enabled => false, update => daily]
releases: [enabled => true, update => daily]
blocked: false
]
[[1;36mDEBUG[m] (f) stubberIncludes = **
[[1;36mDEBUG[m] -- end configuration --
[[1;36mDEBUG[m] Classpath Elements: [/Users/user2016/Downloads/mycnoapp/ios/target/classes, /Users/user2016/Downloads/mycnoapp/common/target/mycnoapp-common-1.0-SNAPSHOT.jar]
[[1;36mDEBUG[m] Found jar file with dependencies at /Users/user2016/Downloads/mycnoapp/ios/target/mycnoapp-ios-1.0-SNAPSHOT-ios-source-jar-with-dependencies.jar. Will use that one unless it is out of date.
[[1;36mDEBUG[m] Designer is up to date
[[1;34mINFO[m] Running ANT build target ios-source
[[1;34mINFO[m] Generating Xcode Project to /Users/user2016/Downloads/mycnoapp/ios/target/mycnoapp-ios-1.0-SNAPSHOT-ios-source...
[[1;34mINFO[m] Executing with timeout -1
[[1;34mINFO[m] 1.11.3
[[1;34mINFO[m] Process return code is 0
[[1;34mINFO[m] Pods version: 1.11.3
[[1;34mINFO[m] Request Args:
[[1;34mINFO[m] -----------------
[[1;34mINFO[m] hyp.beamId=733db829-5aa1-46e9-959b-d9a3f1926c2f
[[1;34mINFO[m] java.version=17
[[1;34mINFO[m] maven.codenameone-maven-plugin=7.0.86
[[1;34mINFO[m] ios.newStorageLocation=true
[[1;34mINFO[m] maven.codenameone-core.version=LATEST
[[1;34mINFO[m] -------------------
[[1;34mINFO[m] Executing with timeout -1
[[1;34mINFO[m] Problem getting Xcode version: Cannot run program "xcodebuild" (in directory "/Users/user2016/Downloads/mycnoapp/ios/target/codenameone/antProject/dist/ios-build"): error=2, No such file or directory
java.io.IOException: Cannot run program "xcodebuild" (in directory "/Users/user2016/Downloads/mycnoapp/ios/target/codenameone/antProject/dist/ios-build"): error=2, No such file or directory
at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1143)
at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1073)
at com.codename1.builders.Executor.executeProcess(Executor.java:1613)
at com.codename1.builders.Executor.execStringWithThrow(Executor.java:1479)
at com.codename1.builders.Executor.execString(Executor.java:1490)
at com.codename1.builders.IPhoneBuilder.getXcodeVersion(IPhoneBuilder.java:2462)
at com.codename1.builders.IPhoneBuilder.build(IPhoneBuilder.java:278)
at com.codename1.maven.CN1BuildMojo.doIOSLocalBuild(CN1BuildMojo.java:1014)
at com.codename1.maven.CN1BuildMojo.createAntProject(CN1BuildMojo.java:564)
at com.codename1.maven.CN1BuildMojo.executeImpl(CN1BuildMojo.java:116)
at com.codename1.maven.AbstractCN1Mojo.execute(AbstractCN1Mojo.java:195)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2(MojoExecutor.java:370)
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute(MojoExecutor.java:351)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:215)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:171)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:163)
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:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:294)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:960)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:293)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:196)
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:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:347)
Caused by: java.io.IOException: error=2, No such file or directory
at java.base/java.lang.ProcessImpl.forkAndExec(Native Method)
at java.base/java.lang.ProcessImpl.<init>(ProcessImpl.java:314)
at java.base/java.lang.ProcessImpl.start(ProcessImpl.java:244)
at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1110)
... 34 more
[[1;36mDEBUG[m] Xcode version is 10
[[1;34mINFO[m] Executing:
[[1;34mINFO[m] /Users/user2016/.p2/pool/plugins/org.eclipse.justj.openjdk.hotspot.jre.full.macosx.x86_64_17.0.5.v20221102-0933/jre/bin/java -Dretrolambda.inputDir=/Users/user2016/Downloads/mycnoapp/ios/target/codenameone/antProject/dist/ios-build/classes -Dretrolambda.classpath=/Users/user2016/Downloads/mycnoapp/ios/target/codenameone/antProject/dist/ios-build/classes:/Users/user2016/.m2/repository/com/codenameone/codenameone-core/7.0.86/codenameone-core-7.0.86.jar -Dretrolambda.outputDir=/Users/user2016/Downloads/mycnoapp/ios/target/codenameone/antProject/dist/ios-build/classes_retrolamda -Dretrolambda.bytecodeVersion=49 -Dretrolambda.defaultMethods=true -jar /Users/user2016/.m2/repository/net/orfjackal/retrolambda/retrolambda/2.5.7/retrolambda-2.5.7.jar
[[1;34mINFO[m] Executing with timeout -1
[[1;34mINFO[m] Retrolambda 2.5.7
[[1;34mINFO[m] 00:00 INFO: Bytecode version: 49 (Java 5)
00:00 INFO: Default methods: true
[[1;34mINFO[m] 00:00 INFO: Input directory: /Users/user2016/Downloads/mycnoapp/ios/target/codenameone/antProject/dist/ios-build/classes
[[1;34mINFO[m] 00:00 INFO: Output directory: /Users/user2016/Downloads/mycnoapp/ios/target/codenameone/antProject/dist/ios-build/classes_retrolamda
[[1;34mINFO[m] 00:00 INFO: Classpath: [/Users/user2016/Downloads/mycnoapp/ios/target/codenameone/antProject/dist/ios-build/classes, /Users/user2016/.m2/repository/com/codenameone/codenameone-core/7.0.86/codenameone-core-7.0.86.jar]
[[1;34mINFO[m] 00:00 INFO: Included files: all
[[1;34mINFO[m] 00:00 INFO: JVM version: 17.0.5
[[1;34mINFO[m] 00:00 INFO: Agent enabled: false
[[1;34mINFO[m] 00:00 INFO: javac hacks: false
[[1;34mINFO[m] 00:00 ERROR: Failed to run Retrolambda
java.lang.IllegalStateException: Cannot initialize dumper; unexpected JDK implementation. Please run Retrolambda using the Java agent (enable forking in the Maven plugin).
at net.orfjackal.retrolambda.lambdas.LambdaClassDumper.install(LambdaClassDumper.java:38)
at net.orfjackal.retrolambda.Retrolambda.run(Retrolambda.java:67)
at net.orfjackal.retrolambda.Main.main(Main.java:28)
Suppressed: java.lang.RuntimeException: java.lang.IllegalAccessException: class net.orfjackal.retrolambda.lambdas.LambdaClassDumper cannot access a member of class java.lang.invoke.InnerClassLambdaMetafactory (in module java.base) with modifiers "private static final"
at net.orfjackal.retrolambda.lambdas.LambdaClassDumper.uninstall(LambdaClassDumper.java:48)
at net.orfjackal.retrolambda.lambdas.LambdaClassDumper.close(LambdaClassDumper.java:55)
at net.orfjackal.retrolambda.Retrolambda.run(Retrolambda.java:102)
... 1 more
Caused by: java.lang.IllegalAccessException: class net.orfjackal.retrolambda.lambdas.LambdaClassDumper cannot access a member of class java.lang.invoke.InnerClassLambdaMetafactory (in module java.base) with modifiers "private static final"
at java.base/jdk.internal.reflect.Reflection.newIllegalAccessException(Reflection.java:392)
at java.base/java.lang.reflect.AccessibleObject.checkAccess(AccessibleObject.java:674)
at java.base/java.lang.reflect.Field.checkAccess(Field.java:1102)
at java.base/java.lang.reflect.Field.set(Field.java:797)
at net.orfjackal.retrolambda.lambdas.LambdaClassDumper.uninstall(LambdaClassDumper.java:46)
... 3 more
Caused by: java.lang.RuntimeException: Failed to make a field non-final (private static final java.lang.invoke.ProxyClassesDumper java.lang.invoke.InnerClassLambdaMetafactory.dumper). This known to fail on Java 12 and newer. Prefer using Java 8 or try using the Java agent (fork=true in the Maven plugin).
at net.orfjackal.retrolambda.lambdas.LambdaClassDumper.makeNonFinal(LambdaClassDumper.java:65)
at net.orfjackal.retrolambda.lambdas.LambdaClassDumper.install(LambdaClassDumper.java:32)
... 2 more
Caused by: java.lang.NoSuchFieldException: modifiers
at java.base/java.lang.Class.getDeclaredField(Class.java:2610)
at net.orfjackal.retrolambda.lambdas.LambdaClassDumper.makeNonFinal(LambdaClassDumper.java:60)
... 3 more
[[1;34mINFO[m] Process return code is 1
[[1;34mINFO[m] [1m------------------------------------------------------------------------[m
[[1;34mINFO[m] [1mReactor Summary for mycnoapp 1.0-SNAPSHOT:[m
[[1;34mINFO[m]
[[1;34mINFO[m] mycnoapp ........................................... [1;32mSUCCESS[m [ 0.014 s]
[[1;34mINFO[m] mycnoapp-common .................................... [1;32mSUCCESS[m [ 11.667 s]
[[1;34mINFO[m] mycnoapp-ios ....................................... [1;31mFAILURE[m [ 1.903 s]
[[1;34mINFO[m] [1m------------------------------------------------------------------------[m
[[1;34mINFO[m] [1;31mBUILD FAILURE[m
[[1;34mINFO[m] [1m------------------------------------------------------------------------[m
[[1;34mINFO[m] Total time: 13.807 s
[[1;34mINFO[m] Finished at: 2023-01-22T14:59:44-05:00
[[1;34mINFO[m] [1m------------------------------------------------------------------------[m
[[1;31mERROR[m] Failed to execute goal [32mcom.codenameone:codenameone-maven-plugin:7.0.86:build[m [1m(build-ios)[m on project [36mmycnoapp-ios[m: [1;31miOS build failed[m -> [1m[Help 1][m
[1;31morg.apache.maven.lifecycle.LifecycleExecutionException[m: [1;31mFailed to execute goal [32mcom.codenameone:codenameone-maven-plugin:7.0.86:build[m [1m(build-ios)[m on project [36mmycnoapp-ios[m: [1;31miOS build failed[m[m
[1mat[m org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 ([1mMojoExecutor.java:375[m)
[1mat[m org.apache.maven.lifecycle.internal.MojoExecutor.doExecute ([1mMojoExecutor.java:351[m)
[1mat[m org.apache.maven.lifecycle.internal.MojoExecutor.execute ([1mMojoExecutor.java:215[m)
[1mat[m org.apache.maven.lifecycle.internal.MojoExecutor.execute ([1mMojoExecutor.java:171[m)
[1mat[m org.apache.maven.lifecycle.internal.MojoExecutor.execute ([1mMojoExecutor.java:163[m)
[1mat[m org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject ([1mLifecycleModuleBuilder.java:117[m)
[1mat[m org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject ([1mLifecycleModuleBuilder.java:81[m)
[1mat[m org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build ([1mSingleThreadedBuilder.java:56[m)
[1mat[m org.apache.maven.lifecycle.internal.LifecycleStarter.execute ([1mLifecycleStarter.java:128[m)
[1mat[m org.apache.maven.DefaultMaven.doExecute ([1mDefaultMaven.java:294[m)
[1mat[m org.apache.maven.DefaultMaven.doExecute ([1mDefaultMaven.java:192[m)
[1mat[m org.apache.maven.DefaultMaven.execute ([1mDefaultMaven.java:105[m)
[1mat[m org.apache.maven.cli.MavenCli.execute ([1mMavenCli.java:960[m)
[1mat[m org.apache.maven.cli.MavenCli.doMain ([1mMavenCli.java:293[m)
[1mat[m org.apache.maven.cli.MavenCli.main ([1mMavenCli.java:196[m)
[1mat[m jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 ([1mNative Method[m)
[1mat[m jdk.internal.reflect.NativeMethodAccessorImpl.invoke ([1mNativeMethodAccessorImpl.java:77[m)
[1mat[m jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke ([1mDelegatingMethodAccessorImpl.java:43[m)
[1mat[m java.lang.reflect.Method.invoke ([1mMethod.java:568[m)
[1mat[m org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced ([1mLauncher.java:282[m)
[1mat[m org.codehaus.plexus.classworlds.launcher.Launcher.launch ([1mLauncher.java:225[m)
[1mat[m org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode ([1mLauncher.java:406[m)
[1mat[m org.codehaus.plexus.classworlds.launcher.Launcher.main ([1mLauncher.java:347[m)
[1mCaused by[m: org.apache.maven.plugin.MojoExecutionException: [1;31miOS build failed[m
[1mat[m com.codename1.maven.CN1BuildMojo.doIOSLocalBuild ([1mCN1BuildMojo.java:1016[m)
[1mat[m com.codename1.maven.CN1BuildMojo.createAntProject ([1mCN1BuildMojo.java:564[m)
[1mat[m com.codename1.maven.CN1BuildMojo.executeImpl ([1mCN1BuildMojo.java:116[m)
[1mat[m com.codename1.maven.AbstractCN1Mojo.execute ([1mAbstractCN1Mojo.java:195[m)
[1mat[m org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo ([1mDefaultBuildPluginManager.java:137[m)
[1mat[m org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 ([1mMojoExecutor.java:370[m)
[1mat[m org.apache.maven.lifecycle.internal.MojoExecutor.doExecute ([1mMojoExecutor.java:351[m)
[1mat[m org.apache.maven.lifecycle.internal.MojoExecutor.execute ([1mMojoExecutor.java:215[m)
[1mat[m org.apache.maven.lifecycle.internal.MojoExecutor.execute ([1mMojoExecutor.java:171[m)
[1mat[m org.apache.maven.lifecycle.internal.MojoExecutor.execute ([1mMojoExecutor.java:163[m)
[1mat[m org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject ([1mLifecycleModuleBuilder.java:117[m)
[1mat[m org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject ([1mLifecycleModuleBuilder.java:81[m)
[1mat[m org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build ([1mSingleThreadedBuilder.java:56[m)
[1mat[m org.apache.maven.lifecycle.internal.LifecycleStarter.execute ([1mLifecycleStarter.java:128[m)
[1mat[m org.apache.maven.DefaultMaven.doExecute ([1mDefaultMaven.java:294[m)
[1mat[m org.apache.maven.DefaultMaven.doExecute ([1mDefaultMaven.java:192[m)
[1mat[m org.apache.maven.DefaultMaven.execute ([1mDefaultMaven.java:105[m)
[1mat[m org.apache.maven.cli.MavenCli.execute ([1mMavenCli.java:960[m)
[1mat[m org.apache.maven.cli.MavenCli.doMain ([1mMavenCli.java:293[m)
[1mat[m org.apache.maven.cli.MavenCli.main ([1mMavenCli.java:196[m)
[1mat[m jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 ([1mNative Method[m)
[1mat[m jdk.internal.reflect.NativeMethodAccessorImpl.invoke ([1mNativeMethodAccessorImpl.java:77[m)
[1mat[m jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke ([1mDelegatingMethodAccessorImpl.java:43[m)
[1mat[m java.lang.reflect.Method.invoke ([1mMethod.java:568[m)
[1mat[m org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced ([1mLauncher.java:282[m)
[1mat[m org.codehaus.plexus.classworlds.launcher.Launcher.launch ([1mLauncher.java:225[m)
[1mat[m org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode ([1mLauncher.java:406[m)
[1mat[m org.codehaus.plexus.classworlds.launcher.Launcher.main ([1mLauncher.java:347[m)
[[1;31mERROR[m]
[[1;31mERROR[m]
[[1;31mERROR[m] For more information about the errors and possible solutions, please read the following articles:
[[1;31mERROR[m] [1m[Help 1][m http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[[1;31mERROR[m]
[[1;31mERROR[m] After correcting the problems, you can resume the build with the command
[[1;31mERROR[m] [1mmvn <args> -rf :mycnoapp-ios[m
I tried "Build iOS Xcode Project" in Eclipse on the example project (named "myCNOApp") generated by Codename One's initializer. The build failed with the first error message as java.io.IOException: Cannot run program "xcodebuild" (in directory "/Users/user2016/Downloads/mycnoapp/ios/target/codenameone/antProject/dist/ios-build"): error=2, No such file or directory
You need to use JDK 11 to run the build. Not a newer version as support for older versions was removed from newer JDKs causing failures. I noticed you're using JDK 17 which is problematic in this case.

Apache Ranger compile failed at assembly stage

I was compiling Apache Ranger following the steps from offcial webstie and encounter below error.
Can anyone help to deal with this issue?
The Ranger version: 2.2-release.
hadoop#machiunbuntu:~/apps/ranger-2.2.0$ git branch
master
* ranger-2.2
Then I type mvn -DskipTests clean compile package install assembly:assembly, at the assembly stage compilation failed.
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:2.6:single (default) on project ranger-distro: Failed to create assembly: Error creating assembly archive admin: Problem creating TAR: entry 'ranger-2.2.0-admin/ews/lib/commons-collections-3.2.2.jar' closed at '14336' before the '588337' bytes specified in the header were written -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:2.6:single (default) on project ranger-distro: Failed to create assembly: Error creating assembly archive admin: Problem creating TAR: entry 'ranger-2.2.0-admin/ews/lib/commons-collections-3.2.2.jar' closed at '14336' before the '588337' bytes specified in the header were written
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
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:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
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:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
Caused by: org.apache.maven.plugin.MojoExecutionException: Failed to create assembly: Error creating assembly archive admin: Problem creating TAR: entry 'ranger-2.2.0-admin/ews/lib/commons-collections-3.2.2.jar' closed at '14336' before the '588337' bytes specified in the header were written
at org.apache.maven.plugin.assembly.mojos.AbstractAssemblyMojo.execute (AbstractAssemblyMojo.java:541)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
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:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
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:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
Caused by: org.apache.maven.plugin.assembly.archive.ArchiveCreationException: Error creating assembly archive admin: Problem creating TAR: entry 'ranger-2.2.0-admin/ews/lib/commons-collections-3.2.2.jar' closed at '14336' before the '588337' bytes specified in the header were written
at org.apache.maven.plugin.assembly.archive.DefaultAssemblyArchiver.createArchive (DefaultAssemblyArchiver.java:185)
at org.apache.maven.plugin.assembly.mojos.AbstractAssemblyMojo.execute (AbstractAssemblyMojo.java:484)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
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:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
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:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
Caused by: org.codehaus.plexus.archiver.ArchiverException: Problem creating TAR: entry 'ranger-2.2.0-admin/ews/lib/commons-collections-3.2.2.jar' closed at '14336' before the '588337' bytes specified in the header were written
at org.codehaus.plexus.archiver.AbstractArchiver.createArchive (AbstractArchiver.java:933)
at org.apache.maven.plugin.assembly.archive.archiver.AssemblyProxyArchiver.createArchive (AssemblyProxyArchiver.java:445)
at org.apache.maven.plugin.assembly.archive.DefaultAssemblyArchiver.createArchive (DefaultAssemblyArchiver.java:181)
at org.apache.maven.plugin.assembly.mojos.AbstractAssemblyMojo.execute (AbstractAssemblyMojo.java:484)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
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:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
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:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
Caused by: java.io.IOException: entry 'ranger-2.2.0-admin/ews/lib/commons-collections-3.2.2.jar' closed at '14336' before the '588337' bytes specified in the header were written
at org.codehaus.plexus.archiver.commonscompress.archivers.tar.TarArchiveOutputStream.closeArchiveEntry (TarArchiveOutputStream.java:353)
at org.codehaus.plexus.archiver.tar.TarArchiver.tarFile (TarArchiver.java:324)
at org.codehaus.plexus.archiver.tar.TarArchiver.execute (TarArchiver.java:171)
at org.codehaus.plexus.archiver.AbstractArchiver.createArchive (AbstractArchiver.java:916)
at org.apache.maven.plugin.assembly.archive.archiver.AssemblyProxyArchiver.createArchive (AssemblyProxyArchiver.java:445)
at org.apache.maven.plugin.assembly.archive.DefaultAssemblyArchiver.createArchive (DefaultAssemblyArchiver.java:181)
at org.apache.maven.plugin.assembly.mojos.AbstractAssemblyMojo.execute (AbstractAssemblyMojo.java:484)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
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:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
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:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
[ERROR]
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <args> -rf :ranger-distro
This seems to be some File system error more than maven issue, check if your disk has enough space to / you have the correct permissions to complete the build.
Usually when I am building ranger this works for me the fastest and best.
mvn clean compile package install -Dmaven.test.skip=true -Drat.skip=true -Dpmd.skip=true -Dfindbugs.skip=true -Dspotbugs.skip=true -Dcheckstyle.skip=true
You can try this after ensuring the above.

Jenkins build inside container - not able to deploy maven artifact to artifactory and getting 401 unauthorized error

We have on-prem self hosted jenkins server which is successfully running and deploying artifacts to repositories in artifactory. We also have our own self-hosted artifactory (oss version) where all our artifacts are stored.
I installed docker on jenkins server so that i can run builds inside a container and i am able to run the builds but not able to deploy from inside the container to artifactory and getting 401 (unauthorized) error.
I have successfully copied jenkin server's settings.xml (using which all other jobs are able to deploy to artifactory) inside the container and i can see my container job is picking correct user from settings.xml.
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on project test-project: Failed to deploy artifacts: Could not transfer artifact com.poc:test-project:jar:1.2.2-20210423.123456-1 from/to snapshots (http://my.artifactory.com/artifactory/libs-snapshot-local): Transfer failed for http://my.artifactory.com/artifactory/libs-snapshot-local/com.poc/test-project/1.2.2-SNAPSHOT/test-project-1.2.2-20210423.123456-1.jar 401 Unauthorized -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on project test-project: Failed to deploy artifacts: Could not transfer artifact com.poc:test-project:jar:1.2.2-20210423.123456-1 from/to snapshots (http://my.artifactory.com/artifactory/libs-snapshot-local): Transfer failed for http://my.artifactory.com/artifactory/libs-snapshot-local/com.poc/test-project/1.2.2-SNAPSHOT/test-project-1.2.2-20210423.123456-1.jar 401 Unauthorized
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
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:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:566)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
Can anyone help me resolving this issue ?
This would be
Your User is locked in Artifactory (this could be checked by trying to login to the UI. It wont let you if you are locked)
You are not using an API key (or encrypted password if your AF allows) to authenticate with (AF doesnt allow auth with plain text passwords)
The user you are deploying as doesn't have write permissions to the repository (or overwrite permissions if that Artifact already exists)
Are you certain that a user is being used and Jenkins isn't trying to deploy anonymously?
If you have access to the Artifactory logs that is the quickest way to determine the problem.

Why does my maven dependency fetching fail with a connection reset when running `docker build`?

I am trying to build a docker image of a maven project. When I run mvn dependency:go-offline in my project directory, the project builds successfully, but when I run the same command with docker build ., I get a connection reset
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.335 s
[INFO] Finished at: 2020-12-17T16:26:23Z
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:2.8:resolve-plugins (resolve-plugins) on project aida: Nested:: Could not transfer artifact org.apache.maven:maven-toolchain:jar:2.2.1 from/to central (https://repo.maven.apache.org/maven2): Transfer failed for https://repo.maven.apache.org/maven2/org/apache/maven/maven-toolchain/2.2.1/maven-toolchain-2.2.1.jar
[ERROR] org.apache.maven:maven-toolchain:jar:2.2.1
[ERROR]
[ERROR] from the specified remote repositories:
[ERROR] central (https://repo.maven.apache.org/maven2, releases=true, snapshots=false): Connection reset
[ERROR] -> [Help 1]
It fails on a different remote dependency every time. The first time it failed to get org.apache.maven:maven-toolchain:jar:2.2.1. The second time it failed to get org.codehaus.plexus:plexus-interpolation:jar:1.11. As shown by the links above, both repositories exist on the central repository. Every run seems to throw a similar error for a different package.
The error help page for Help 1 has a few possible causes, but I couldn't identify one that would only be true for docker environments. Network issues like proxies should equally apply to the host machine.
MCVE
Dockerfile
FROM maven:3.6.3-jdk-11 as target
WORKDIR /test
COPY ./pom.xml /test
RUN mvn dependency:go-offline
# RUN mvn -e dependency:go-offline # Alternate command for full stack trace
pom.xml
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>test</groupId>
<artifactId>test</artifactId>
<version>1.0-SNAPSHOT</version>
<dependencies>
<!-- https://mvnrepository.com/artifact/org.apache.commons/commons-lang3 -->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.4</version>
</dependency>
<!-- https://mvnrepository.com/artifact/commons-cli/commons-cli -->
<dependency>
<groupId>commons-cli</groupId>
<artifactId>commons-cli</artifactId>
<version>1.4</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.google.guava/guava -->
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>29.0-android</version>
</dependency>
<!-- https://mvnrepository.com/artifact/commons-codec/commons-codec -->
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<version>1.11</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.hamcrest/hamcrest -->
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest</artifactId>
<version>2.2</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>
</project>
Full error log output with docker build . Without verbose error trace mvn -e flag
Sending build context to Docker daemon 277.5kB
Step 1/4 : FROM maven:3.6.3-jdk-11 as target
---> 25b8de0642c0
Step 2/4 : WORKDIR /test
---> Using cache
---> c51be64ec620
Step 3/4 : COPY ./pom.xml /test
---> 5f96b065e0ce
Step 4/4 : RUN mvn dependency:go-offline
---> Running in 8eda9d2a4756
[INFO] Scanning for projects...
Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-compiler-plugin/3.8.0/maven-compiler-plugin-3.8.0.pom
Downloaded from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-compiler-plugin/3.8.0/maven-compiler-plugin-3.8.0.pom (12 kB at 55 kB/s)
(... # Many more lines like this)
Downloaded from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-dependency-plugin/2.8/maven-dependency-plugin-2.8.jar (153 kB at 2.9 MB/s)
[INFO]
[INFO] -----------------------------< test:test >------------------------------
[INFO] Building test 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] >>> maven-dependency-plugin:2.8:go-offline (default-cli) > :resolve-plugins # test >>>
[INFO]
[INFO] --- maven-dependency-plugin:2.8:resolve-plugins (resolve-plugins) # test ---
Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/maven-artifact/2.0.9/maven-artifact-2.0.9.pom
Downloaded from central: https://repo.maven.apache.org/maven2/org/apache/maven/maven-artifact/2.0.9/maven-artifact-2.0.9.pom (1.6 kB at 202 kB/s)
(... # Many more lines like this)
Downloaded from central: https://repo.maven.apache.org/maven2/org/apache/commons/commons-parent/9/commons-parent-9.pom (22 kB at 2.7 MB/s)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.223 s
[INFO] Finished at: 2020-12-17T22:46:18Z
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:2.8:resolve-plugins (resolve-plugins) on project test: Execution resolve-plugins of goal org.apache.maven.plugins:maven-dependency-plugin:2.8:resolve-plugins failed: Plugin org.apache.maven.plugins:maven-dependency-plugin:2.8 or one of its dependencies could not be resolved: Failed to collect dependencies at org.apache.maven.plugins:maven-dependency-plugin:jar:2.8 -> org.apache.maven:maven-project:jar:2.0.9 -> org.apache.maven:maven-settings:jar:2.0.9 -> org.apache.maven:maven-model:jar:2.0.9: Failed to read artifact descriptor for org.apache.maven:maven-model:jar:2.0.9: Could not transfer artifact org.apache.maven:maven-model:pom:2.0.9 from/to central (https://repo.maven.apache.org/maven2): Transfer failed for https://repo.maven.apache.org/maven2/org/apache/maven/maven-model/2.0.9/maven-model-2.0.9.pom: Connection reset -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException
The command '/bin/sh -c mvn dependency:go-offline' returned a non-zero code: 1
The full stack trace from with docker build . with mvn -e flag
GET request of: commons-beanutils/commons-beanutils/1.7.0/commons-beanutils-1.7.0.jar from central failed
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.MojoExecutor.executeForkedExecutions (MojoExecutor.java:355)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:200)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
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:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:566)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution resolve-plugins of goal org.apache.maven.plugins:maven-dependency-plugin:2.8:resolve-plugins failed: Plugin org.apache.maven.plugins:maven-dependency-plugin:2.8 or one of its dependencies could not be resolved: The following artifacts could not be resolved: commons-beanutils:commons-beanutils:jar:1.7.0, commons-digester:commons-digester:jar:1.6: Could not transfer artifact commons-beanutils:commons-beanutils:jar:1.7.0 from/to central (https://repo.maven.apache.org/maven2): GET request of: commons-beanutils/commons-beanutils/1.7.0/commons-beanutils-1.7.0.jar from central failed
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:109)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.MojoExecutor.executeForkedExecutions (MojoExecutor.java:355)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:200)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
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:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:566)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
Caused by: org.apache.maven.plugin.PluginResolutionException: Plugin org.apache.maven.plugins:maven-dependency-plugin:2.8 or one of its dependencies could not be resolved: The following artifacts could not be resolved: commons-beanutils:commons-beanutils:jar:1.7.0, commons-digester:commons-digester:jar:1.6: Could not transfer artifact commons-beanutils:commons-beanutils:jar:1.7.0 from/to central (https://repo.maven.apache.org/maven2): GET request of: commons-beanutils/commons-beanutils/1.7.0/commons-beanutils-1.7.0.jar from central failed
at org.apache.maven.plugin.internal.DefaultPluginDependenciesResolver.resolveInternal (DefaultPluginDependenciesResolver.java:221)
at org.apache.maven.plugin.internal.DefaultPluginDependenciesResolver.resolve (DefaultPluginDependenciesResolver.java:152)
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.createPluginRealm (DefaultMavenPluginManager.java:404)
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.setupPluginRealm (DefaultMavenPluginManager.java:374)
at org.apache.maven.plugin.DefaultBuildPluginManager.getPluginRealm (DefaultBuildPluginManager.java:234)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:105)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.MojoExecutor.executeForkedExecutions (MojoExecutor.java:355)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:200)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
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:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:566)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
Caused by: org.eclipse.aether.resolution.ArtifactResolutionException: The following artifacts could not be resolved: commons-beanutils:commons-beanutils:jar:1.7.0, commons-digester:commons-digester:jar:1.6: Could not transfer artifact commons-beanutils:commons-beanutils:jar:1.7.0 from/to central (https://repo.maven.apache.org/maven2): GET request of: commons-beanutils/commons-beanutils/1.7.0/commons-beanutils-1.7.0.jar from central failed
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.DefaultRepositorySystem.resolveDependencies (DefaultRepositorySystem.java:340)
at org.apache.maven.plugin.internal.DefaultPluginDependenciesResolver.resolveInternal (DefaultPluginDependenciesResolver.java:213)
at org.apache.maven.plugin.internal.DefaultPluginDependenciesResolver.resolve (DefaultPluginDependenciesResolver.java:152)
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.createPluginRealm (DefaultMavenPluginManager.java:404)
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.setupPluginRealm (DefaultMavenPluginManager.java:374)
at org.apache.maven.plugin.DefaultBuildPluginManager.getPluginRealm (DefaultBuildPluginManager.java:234)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:105)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.MojoExecutor.executeForkedExecutions (MojoExecutor.java:355)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:200)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
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:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:566)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
Caused by: org.eclipse.aether.transfer.ArtifactTransferException: Could not transfer artifact commons-beanutils:commons-beanutils:jar:1.7.0 from/to central (https://repo.maven.apache.org/maven2): GET request of: commons-beanutils/commons-beanutils/1.7.0/commons-beanutils-1.7.0.jar from central failed
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 java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1128)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:628)
at java.lang.Thread.run (Thread.java:834)
Caused by: org.apache.maven.wagon.TransferFailedException: GET request of: commons-beanutils/commons-beanutils/1.7.0/commons-beanutils-1.7.0.jar from central failed
at org.apache.maven.wagon.AbstractWagon.getTransfer (AbstractWagon.java:412)
at org.apache.maven.wagon.AbstractWagon.getTransfer (AbstractWagon.java:338)
at org.apache.maven.wagon.AbstractWagon.getTransfer (AbstractWagon.java:307)
at org.apache.maven.wagon.StreamWagon.getIfNewer (StreamWagon.java:97)
at org.apache.maven.wagon.StreamWagon.get (StreamWagon.java:61)
at org.eclipse.aether.transport.wagon.WagonTransporter$GetTaskRunner.run (WagonTransporter.java:567)
at org.eclipse.aether.transport.wagon.WagonTransporter.execute (WagonTransporter.java:435)
at org.eclipse.aether.transport.wagon.WagonTransporter.get (WagonTransporter.java:412)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector$GetTaskRunner.runTask (BasicRepositoryConnector.java:457)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run (BasicRepositoryConnector.java:364)
at org.eclipse.aether.util.concurrency.RunnableErrorForwarder$1.run (RunnableErrorForwarder.java:75)
at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1128)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:628)
at java.lang.Thread.run (Thread.java:834)
Caused by: javax.net.ssl.SSLException: Connection reset
at sun.security.ssl.Alert.createSSLException (Alert.java:127)
at sun.security.ssl.TransportContext.fatal (TransportContext.java:350)
at sun.security.ssl.TransportContext.fatal (TransportContext.java:293)
at sun.security.ssl.TransportContext.fatal (TransportContext.java:288)
at sun.security.ssl.SSLTransport.decode (SSLTransport.java:144)
at sun.security.ssl.SSLSocketImpl.decode (SSLSocketImpl.java:1411)
at sun.security.ssl.SSLSocketImpl.readApplicationRecord (SSLSocketImpl.java:1376)
at sun.security.ssl.SSLSocketImpl$AppInputStream.read (SSLSocketImpl.java:963)
at org.apache.maven.wagon.providers.http.httpclient.impl.io.SessionInputBufferImpl.streamRead (SessionInputBufferImpl.java:137)
at org.apache.maven.wagon.providers.http.httpclient.impl.io.SessionInputBufferImpl.read (SessionInputBufferImpl.java:197)
at org.apache.maven.wagon.providers.http.httpclient.impl.io.ContentLengthInputStream.read (ContentLengthInputStream.java:176)
at org.apache.maven.wagon.providers.http.httpclient.conn.EofSensorInputStream.read (EofSensorInputStream.java:135)
at java.nio.channels.Channels$ReadableByteChannelImpl.read (Channels.java:388)
at org.apache.maven.wagon.AbstractWagon.transfer (AbstractWagon.java:597)
at org.apache.maven.wagon.AbstractWagon.getTransfer (AbstractWagon.java:395)
at org.apache.maven.wagon.AbstractWagon.getTransfer (AbstractWagon.java:338)
at org.apache.maven.wagon.AbstractWagon.getTransfer (AbstractWagon.java:307)
at org.apache.maven.wagon.StreamWagon.getIfNewer (StreamWagon.java:97)
at org.apache.maven.wagon.StreamWagon.get (StreamWagon.java:61)
at org.eclipse.aether.transport.wagon.WagonTransporter$GetTaskRunner.run (WagonTransporter.java:567)
at org.eclipse.aether.transport.wagon.WagonTransporter.execute (WagonTransporter.java:435)
at org.eclipse.aether.transport.wagon.WagonTransporter.get (WagonTransporter.java:412)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector$GetTaskRunner.runTask (BasicRepositoryConnector.java:457)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run (BasicRepositoryConnector.java:364)
at org.eclipse.aether.util.concurrency.RunnableErrorForwarder$1.run (RunnableErrorForwarder.java:75)
at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1128)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:628)
at java.lang.Thread.run (Thread.java:834)
Caused by: java.net.SocketException: Connection reset
at java.net.SocketInputStream.read (SocketInputStream.java:186)
at java.net.SocketInputStream.read (SocketInputStream.java:140)
at sun.security.ssl.SSLSocketInputRecord.read (SSLSocketInputRecord.java:476)
at sun.security.ssl.SSLSocketInputRecord.readFully (SSLSocketInputRecord.java:459)
at sun.security.ssl.SSLSocketInputRecord.decodeInputRecord (SSLSocketInputRecord.java:243)
at sun.security.ssl.SSLSocketInputRecord.decode (SSLSocketInputRecord.java:181)
at sun.security.ssl.SSLTransport.decode (SSLTransport.java:110)
at sun.security.ssl.SSLSocketImpl.decode (SSLSocketImpl.java:1411)
at sun.security.ssl.SSLSocketImpl.readApplicationRecord (SSLSocketImpl.java:1376)
at sun.security.ssl.SSLSocketImpl$AppInputStream.read (SSLSocketImpl.java:963)
at org.apache.maven.wagon.providers.http.httpclient.impl.io.SessionInputBufferImpl.streamRead (SessionInputBufferImpl.java:137)
at org.apache.maven.wagon.providers.http.httpclient.impl.io.SessionInputBufferImpl.read (SessionInputBufferImpl.java:197)
at org.apache.maven.wagon.providers.http.httpclient.impl.io.ContentLengthInputStream.read (ContentLengthInputStream.java:176)
at org.apache.maven.wagon.providers.http.httpclient.conn.EofSensorInputStream.read (EofSensorInputStream.java:135)
at java.nio.channels.Channels$ReadableByteChannelImpl.read (Channels.java:388)
at org.apache.maven.wagon.AbstractWagon.transfer (AbstractWagon.java:597)
at org.apache.maven.wagon.AbstractWagon.getTransfer (AbstractWagon.java:395)
at org.apache.maven.wagon.AbstractWagon.getTransfer (AbstractWagon.java:338)
at org.apache.maven.wagon.AbstractWagon.getTransfer (AbstractWagon.java:307)
at org.apache.maven.wagon.StreamWagon.getIfNewer (StreamWagon.java:97)
at org.apache.maven.wagon.StreamWagon.get (StreamWagon.java:61)
at org.eclipse.aether.transport.wagon.WagonTransporter$GetTaskRunner.run (WagonTransporter.java:567)
at org.eclipse.aether.transport.wagon.WagonTransporter.execute (WagonTransporter.java:435)
at org.eclipse.aether.transport.wagon.WagonTransporter.get (WagonTransporter.java:412)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector$GetTaskRunner.runTask (BasicRepositoryConnector.java:457)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run (BasicRepositoryConnector.java:364)
at org.eclipse.aether.util.concurrency.RunnableErrorForwarder$1.run (RunnableErrorForwarder.java:75)
at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1128)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:628)
at java.lang.Thread.run (Thread.java:834)
[ERROR]
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException
The command '/bin/sh -c mvn -e dependency:go-offline' returned a non-zero code: 1
System information
Apache Maven 3.6.0
Docker version 20.10.1, build 831ebea
Java version: 11.0.9.1, vendor: Ubuntu, runtime: /usr/lib/jvm/java-11-openjdk-amd64
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "4.15.0-126-generic", arch: "amd64", family: "unix"
This solution is based on this excellent (and comprehensive) post, Fix a Random Network Connection Reset Issue in Docker/Kubernetes.
The Connection Reset is due to an INVALID TCP packet going across a firewall and the destination address not being rewritten to reflect the port that the Docker is listening on. To quote the article:
When the INVALID packet goes through the firewall, conntrack does not rewrite its destination address to the Pod’s IP address/port. Instead, the destination is the host’s IP address, with a port nobody is listening. A RST packet is sent back and causes the connection to be closed.
Since this rewrite step is only needed for the Docker, the running mvn dependency:go-offline on the host encounters no problems.
To fix the Docker issue, the author suggests adding a rule to drop INVALID packets to the host iptables. To add this rule, I used
sudo iptables -A INPUT -i eth0 -m state --state INVALID -j DROP
You may experience this issue on any host Docker machine that doesn't have dropping INVALID packets as a default in its iptables rules. The post author reproduced the connection reset on Ubuntu and Debian. Fedora/CentOs has the INVALID drop line in its default iptables rules, and so should not suffer from this problem.

Resources