Browse Source

Update version for maven.compiler; update repo URL for win and macos

03_01
Michael 1 year ago
parent
commit
3355be560d
4 changed files with 15 additions and 10 deletions
  1. +3
    -3
      MAC_LINUX_DOCKER.md
  2. +9
    -4
      README.md
  3. +1
    -1
      WINDOWS.md
  4. +2
    -2
      pom.xml

+ 3
- 3
MAC_LINUX_DOCKER.md View File

@ -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: 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. **MAKE SURE TO SET THE `Branch Specifier` to `*/03_01`**.
1. Add a build step using `Invoke Top-Level Maven Target`. 1. Add a build step using `Invoke Top-Level Maven Target`.
1. Select the Maven version you configured in the previous step. 1. Select the Maven version you configured in the previous step.
1. For the goal, enter `package`. 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 java -cp target/hello-1.0-SNAPSHOT.jar com.learningjenkins.App
```
```
1. Save the job and start the build. 1. Save the job and start the build.
## Troubleshooting Errors ## Troubleshooting Errors


+ 9
- 4
README.md View File

@ -5,10 +5,12 @@ You will need to configure Maven as a global build tool.
In the Jenkins web interface, go to: 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`. Give your Maven installation a name and check the option to `Install automatically`.
Select the `Save` button.
## Setting up the Jenkins Job ## Setting up the Jenkins Job
Create a freestyle job and configure it as follows: 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`. 5. For the goal, enter `package`.
## WINDOWS SYSTEMS ## 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 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) [Follow this link for more details on Windows](WINDOWS.md)
## MacOS, Linux, and Docker ## 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 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. 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. This error means you have probably entered the wrong branch under Source Code Management. You need to enter `*/03_01` for the branch.

+ 1
- 1
WINDOWS.md View File

@ -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: 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`**. 2. **MAKE SURE TO SET THE `Branch Specifier` to `*/03_01`**.
3. Add a build step using `Invoke Top-Level Maven Target`. 3. Add a build step using `Invoke Top-Level Maven Target`.


+ 2
- 2
pom.xml View File

@ -14,8 +14,8 @@
<properties> <properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties> </properties>
<dependencies> <dependencies>


Loading…
Cancel
Save