Section 5 Revision control with GIT - mvn build failed

Is anyone can provide the zip file generated by the start.spring.io page and share the exact mvn:alpine version? I do not know java, so rather than wasting time trying to understand why the build failed I wish I could get the same source and version used in the video.
Answers
-
Hi @bauger,
If you provide details about your environment (local, cloud, OS and version), the command you ran and the error you experienced, I may try to reproduce it.
Regards,
Luis.0 -
Hi Luis,
please see below. Thanks for your help.
Beatrice
- OS
$ uname -srm
Linux 4.19.0-18-amd64 x86_64
- Docker version
$ sudo docker version
Client: Docker Engine - Community
Version: 20.10.12
API version: 1.41
Go version: go1.16.12
Git commit: e91ed57
Built: Mon Dec 13 11:45:37 2021
OS/Arch: linux/amd64
Context: default
Experimental: trueServer: Docker Engine - Community
Engine:
Version: 20.10.12
API version: 1.41 (minimum version 1.12)
Go version: go1.16.12
Git commit: 459d0df
Built: Mon Dec 13 11:43:46 2021
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.4.12
GitCommit: 7b11cfaabd73bb80907dd23182b9347b4245eb5d
runc:
Version: 1.0.2
GitCommit: v1.0.2-0-g52b36a2
docker-init:
Version: 0.19.0
GitCommit: de40ad0maven:alpine image
https://hub.docker.com/layers/maven/library/maven/alpine/images/sha256-7445f83cd169b9f0b185e443e755ece1e37d3cf1e2e90f9180afad2fdb9d2bc4?context=explorecommand to build image:
$ sudo docker container run --rm -it -v m2:/root/.m2 -v /home/bea/Lecture/Learning/LinuxFoundation/DevOps_Bootcamp/LFS261/git/hellocd:/app maven:alpine mvn spring-boot:run -f app/pom.xml
and outputs:
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------< com.example:hellocd >-------------------------
[INFO] Building hellocd 0.0.1-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] >>> spring-boot-maven-plugin:2.6.3:run (default-cli) > test-compile @ hellocd >>>
[INFO]
[INFO] --- maven-resources-plugin:3.2.0:resources (default-resources) @ hellocd ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Using 'UTF-8' encoding to copy filtered properties files.
[INFO] Copying 1 resource
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ hellocd ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 1 source file to /app/target/classes
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.516 s
[INFO] Finished at: 2022-02-09T17:50:35Z
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project hellocd: Fatal error compiling: invalid target release: 11 -> [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/MojoExecutionException0 -
Hi Beatrice,
Sorry for taking long in providing feedback, but it's not so easy to do the tests.
I was able to reproduce the issue on Ubuntu 20.04.4 LTS. What distro and version did you tried with?Regards,
Luis.0 -
Hi Luis,
thanks for taking time trying to reproduce the issue on your end. I'm running docker on Debian 4.19.208-1 (2021-09-29) x86_64 GNU/Linux.
I finally used another alpine version to be able to continue following the tutorial.
Béatrice
0 -
Hi Béatrice,
It's a pleasure! Can you tell me what Alpine version worked for you, please?
Thanks,
Luis.0 -
Hi Luis,
unfortunately this section is before the Jenkins introduction, so I do not have any script to check. And due to resources constraint I had to prune Docker images no longer used. I'm afraid I cannot trace back with alpine version I used for sure. But, in the following section where the Docker image is written in a Jenkinsfile I used the maven:3.6.1-jdk-8-alpine.
Thanks
Béatrice
0 -
Hi Béatrice,
Yep, the deployments are sensitive to different versions. We keep investigating in our end.
Regards,
Luis.0 -
Thanks for pitching in @luisviveropena . @bauger maven:3.8-openjdk-11-slim image tag works with the latest version of the code. I have updated the lab guide and should be published soon.
2 -
It's a pleasure, @gouravshah .
I have updated the lab guide and should be published soon.
Wonderful!
Luis.
0 -
Hi,
I'm also experiencing issues compiling the build. The solution is to use maven:3.8-openjdk-11 image?
attached the file with more details.executed:
$ docker container run --rm -it -v m2:/root/.m2 -v /home/admin/Documents/Bootcamp/DevOps_SRE/Git/hellocd:/app maven:alpine mvn spring-boot:run -f /app/pom.xml -XImage:
REPOSITORY TAG IMAGE ID CREATED SIZE
maven alpine 7445f83cd169 2 years ago 122MB0 -
I can confirm, it works with image maven:3.8-openjdk-11-slim , solution pointed by @gouravshah
@manuel.nhiuana said:
Hi,
I'm also experiencing issues compiling the build. The solution is to use maven:3.8-openjdk-11 image?
attached the file with more details.executed:
$ docker container run --rm -it -v m2:/root/.m2 -v /home/admin/Documents/Bootcamp/DevOps_SRE/Git/hellocd:/app maven:alpine mvn spring-boot:run -f /app/pom.xml -XImage:
REPOSITORY TAG IMAGE ID CREATED SIZE
maven alpine 7445f83cd169 2 years ago 122MB1 -
Hi @manuel.nhiuana , yes, maven:3.8-openjdk-11-slim is the version that Gourav tested and confirmed it's working
I'm glad it worked for you too.
Many regards,
Luis.1
Categories
- 8.9K All Categories
- 13 LFX Mentorship
- 66 LFX Mentorship: Linux Kernel
- 363 Linux Foundation Boot Camps
- 231 Cloud Engineer Boot Camp
- 70 Advanced Cloud Engineer Boot Camp
- 25 DevOps Engineer Boot Camp
- 4 Cloud Native Developer Boot Camp
- 867 Training Courses
- 15 LFC110 Class Forum
- 16 LFD102 Class Forum
- 102 LFD103 Class Forum
- 3 LFD121 Class Forum
- 55 LFD201 Class Forum
- 1 LFD213 Class Forum - Discontinued
- 128 LFD232 Class Forum
- 19 LFD254 Class Forum
- 434 LFD259 Class Forum
- 86 LFD272 Class Forum
- 1 LFD272-JP クラス フォーラム
- 16 LFS200 Class Forum
- 696 LFS201 Class Forum
- LFS201-JP クラス フォーラム
- 271 LFS211 Class Forum
- 50 LFS216 Class Forum
- 26 LFS241 Class Forum
- 28 LFS242 Class Forum
- 19 LFS243 Class Forum
- 6 LFS244 Class Forum
- 9 LFS250 Class Forum
- LFS250-JP クラス フォーラム
- 110 LFS253 Class Forum
- 794 LFS258 Class Forum
- 7 LFS258-JP クラス フォーラム
- 51 LFS260 Class Forum
- 79 LFS261 Class Forum
- 14 LFS262 Class Forum
- 76 LFS263 Class Forum
- 14 LFS264 Class Forum
- 10 LFS266 Class Forum
- 8 LFS267 Class Forum
- 9 LFS268 Class Forum
- 6 LFS269 Class Forum
- 181 LFS272 Class Forum
- 1 LFS272-JP クラス フォーラム
- 188 LFW211 Class Forum
- 104 LFW212 Class Forum
- 879 Hardware
- 207 Drivers
- 74 I/O Devices
- 43 Monitors
- 115 Multimedia
- 205 Networking
- 98 Printers & Scanners
- 82 Storage
- 724 Linux Distributions
- 82 Debian
- 64 Fedora
- 12 Linux Mint
- 13 Mageia
- 22 openSUSE
- 126 Red Hat Enterprise
- 33 Slackware
- 13 SUSE Enterprise
- 347 Ubuntu
- 448 Linux System Administration
- 33 Cloud Computing
- 64 Command Line/Scripting
- Github systems admin projects
- 89 Linux Security
- 74 Network Management
- 105 System Management
- 45 Web Management
- 50 Mobile Computing
- 18 Android
- 19 Development
- 1.2K New to Linux
- 1.1K Getting Started with Linux
- 500 Off Topic
- 120 Introductions
- 193 Small Talk
- 19 Study Material
- 749 Programming and Development
- 241 Kernel Development
- 474 Software Development
- 902 Software
- 247 Applications
- 178 Command Line
- 2 Compiling/Installing
- 72 Games
- 314 Installation
- 20 All In Program
- 20 All In Forum
Upcoming Training
-
August 20, 2018
Kubernetes Administration (LFS458)
-
August 20, 2018
Linux System Administration (LFS301)
-
August 27, 2018
Open Source Virtualization (LFS462)
-
August 27, 2018
Linux Kernel Debugging and Security (LFD440)