I have come across an issue on StackOverflow and decided to experiment. I have been using the spring cloud encrypt functionality myself and didn't have any issue when I was installing it. I decided to use a fresh ubuntu 18.04 from AWS.
Below are the commands I have run to get the machine ready:
apt-get update
apt-get upgrade
apt-get install unzip zip openjdk-11-jdk
added export JAVA_HOME="/usr/lib/jvm/java-1.11.0-openjdk-amd64" to ~/.bashrc
spring install org.springframework.cloud:spring-cloud-cli:2.3.6.RELEASE [this failed]
mvn install failure output
INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.166 s
[INFO] Finished at: 2021-09-06T08:38:14Z
[INFO] ------------------------------------------------------------------------
[ERROR] The goal you specified requires a project to execute but there is no POM in this directory (/root). Please verify you invoked Maven from the correct directory. -> [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/MissingProjectException
spring install failure output
installing into: /root/.sdkman/candidates/springboot/2.3.6.RELEASE/lib/ext
Resolving dependencies..
startup failed:
General error during conversion: org.eclipse.aether.resolution.DependencyResolutionException: Could not find artifact org.springframework.cloud:spring-cloud-cli:jar:2.3.6.RELEASE in local (file:/root/.m2/repository/)
org.springframework.boot.cli.compiler.grape.DependencyResolutionFailedException: org.eclipse.aether.resolution.DependencyResolutionException: Could not find artifact org.springframework.cloud:spring-cloud-cli:jar:2.3.6.RELEASE in local (file:/root/.m2/repository/)
at org.springframework.boot.cli.compiler.grape.AetherGrapeEngine.resolve(AetherGrapeEngine.java:298)
at org.springframework.boot.cli.compiler.grape.AetherGrapeEngine.grab(AetherGrapeEngine.java:116)
at groovy.grape.Grape.grab(Grape.java:166)
at groovy.grape.GrabAnnotationTransformation.visit(GrabAnnotationTransformation.java:376)
at org.codehaus.groovy.transform.ASTTransformationVisitor$3.call(ASTTransformationVisitor.java:358)
at org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:965)
at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:642)
at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:618)
at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:595)
at org.springframework.boot.cli.compiler.GroovyCompiler.compile(GroovyCompiler.java:197)
at org.springframework.boot.cli.command.install.GroovyGrabDependencyResolver.resolve(GroovyGrabDependencyResolver.java:55)
at org.springframework.boot.cli.command.install.Installer.install(Installer.java:90)
at org.springframework.boot.cli.command.install.InstallCommand$InstallOptionHandler.run(InstallCommand.java:57)
at org.springframework.boot.cli.command.options.OptionHandler.run(OptionHandler.java:85)
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:64)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:49)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:107)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:58)
at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:88)
Caused by: org.eclipse.aether.resolution.DependencyResolutionException: Could not find artifact org.springframework.cloud:spring-cloud-cli:jar:2.3.6.RELEASE in local (file:/root/.m2/repository/)
at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:357)
at org.springframework.boot.cli.compiler.grape.AetherGrapeEngine.resolve(AetherGrapeEngine.java:293)
... 25 more
Caused by: org.eclipse.aether.resolution.ArtifactResolutionException: Could not find artifact org.springframework.cloud:spring-cloud-cli:jar:2.3.6.RELEASE in local (file:/root/.m2/repository/)
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)
... 26 more
Caused by: org.eclipse.aether.transfer.ArtifactNotFoundException: Could not find artifact org.springframework.cloud:spring-cloud-cli:jar:2.3.6.RELEASE in local (file:/root/.m2/repository/)
at org.eclipse.aether.connector.basic.ArtifactTransportListener.transferFailed(ArtifactTransportListener.java:48)
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:644)
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)
... 28 more
1 error
I have come across an issue on StackOverflow and decided to experiment. I have been using the spring cloud
encrypt
functionality myself and didn't have any issue when I was installing it. I decided to use a fresh ubuntu 18.04 from AWS.Below are the commands I have run to get the machine ready:
export JAVA_HOME="/usr/lib/jvm/java-1.11.0-openjdk-amd64"
to ~/.bashrcmvn install failure output
spring install failure output