From 3355be560d28824fcbb57a209008f0e8e4c6bf02 Mon Sep 17 00:00:00 2001 From: Michael Date: Fri, 12 Jan 2024 23:28:14 -0800 Subject: [PATCH] Update version for maven.compiler; update repo URL for win and macos --- MAC_LINUX_DOCKER.md | 6 +++--- README.md | 13 +++++++++---- WINDOWS.md | 2 +- pom.xml | 4 ++-- 4 files changed, 15 insertions(+), 10 deletions(-) diff --git a/MAC_LINUX_DOCKER.md b/MAC_LINUX_DOCKER.md index c6a857a..9e4ff9c 100755 --- a/MAC_LINUX_DOCKER.md +++ b/MAC_LINUX_DOCKER.md @@ -14,16 +14,16 @@ Create a freestyle job and configure it as follows: 1. Under `Source Code Management`, select `Git` and enter the following URL: ``` - https://github.com/managedkaos/apache-maven-hello-world + https://github.com/LinkedInLearning/learning-jenkins-3003221 ``` 1. **MAKE SURE TO SET THE `Branch Specifier` to `*/03_01`**. 1. Add a build step using `Invoke Top-Level Maven Target`. 1. Select the Maven version you configured in the previous step. 1. For the goal, enter `package`. -1. Add a build step using the `Execute shell` build step and enter: +1. Add a build step using the `Execute shell` build step and enter: ``` java -cp target/hello-1.0-SNAPSHOT.jar com.learningjenkins.App - ``` + ``` 1. Save the job and start the build. ## Troubleshooting Errors diff --git a/README.md b/README.md index 9829e60..2ceda5a 100755 --- a/README.md +++ b/README.md @@ -5,10 +5,12 @@ You will need to configure Maven as a global build tool. In the Jenkins web interface, go to: -`Manage Jenkins` -> `Global Tool Configuration` -> `Maven installations` -> `Add Maven`. +`Manage Jenkins` -> `Tools` -> `Maven installations` -> `Add Maven`. Give your Maven installation a name and check the option to `Install automatically`. +Select the `Save` button. + ## Setting up the Jenkins Job Create a freestyle job and configure it as follows: @@ -22,7 +24,9 @@ https://github.com/LinkedInLearning/learning-jenkins-3003221 5. For the goal, enter `package`. ## WINDOWS SYSTEMS -Select the `Execute Windows batch command` build step +Select `Add build step` -> `Execute Windows batch command`. + +Enter: ``` java -cp target/hello-1.0-SNAPSHOT.jar com.learningjenkins.App ``` @@ -31,7 +35,9 @@ Save the job and start the build. [Follow this link for more details on Windows](WINDOWS.md) ## MacOS, Linux, and Docker -Select the `Execute shell` build step. +Select `Add build step` -> `Execute shell`. + +Enter: ``` java -cp target/hello-1.0-SNAPSHOT.jar com.learningjenkins.App ``` @@ -44,4 +50,3 @@ Save the job and start the build. ERROR: Couldn't find any revision to build. Verify the repository and branch configuration for this job. ``` This error means you have probably entered the wrong branch under Source Code Management. You need to enter `*/03_01` for the branch. - diff --git a/WINDOWS.md b/WINDOWS.md index bd90b6a..29b5869 100755 --- a/WINDOWS.md +++ b/WINDOWS.md @@ -14,7 +14,7 @@ Create a freestyle job and configure it as follows: 1. Under `Source Code Management`, select `Git` and enter the following URL: ``` -https://github.com/managedkaos/apache-maven-hello-world +https://github.com/LinkedInLearning/learning-jenkins-3003221 ``` 2. **MAKE SURE TO SET THE `Branch Specifier` to `*/03_01`**. 3. Add a build step using `Invoke Top-Level Maven Target`. diff --git a/pom.xml b/pom.xml index 407b22a..7f32c05 100755 --- a/pom.xml +++ b/pom.xml @@ -14,8 +14,8 @@ UTF-8 - 1.7 - 1.7 + 1.8 + 1.8