I believe that the answer will be really easy, but I haven't figure out how to do it.
The problem is:
I have a third-party project, which is being cloned from github, so I'm not going to change anything there, but I need this project for my work with MUnit.
The project is mule-interceptor-module and it has a version 3.4-M4-SNAPSHOT.
I created a build in Jenkins and I want to get mule-interceptor-module-3.4-M4-SNAPSHOT.jar after it, but Jenkins REMOVES -SNAPSHOT from the jar name and updates pom.xml with new version: 3.4-M4 instead of 3.4-M4-SNAPSHOT. The project, which uses this one (munit) in its dependencies has 3.4-M4-SNAPSHOT. So I need the SNAPSHOT in version.
What I tried to do:
I tried to build the same project on the server, which my Jenkins is installed on, using just mvn clean install and I got mule-interceptor-module-3.4-M4-SNAPSHOT.jar.
The question is:
How to tune Jenkins so that I could finally have SNAPSHOT build?
My job setup:
- JDK: jdk 1.6.0_45
Source Code Management:
- Git
- Repository URL: https://github.com/mulesoft/mule-interceptor-module.git
- Branch Specifier (blank for default):3.4.x
- Repository browser: githubweb
- URL: https://github.com/mulesoft/mule-interceptor-module/
Pre Steps:
- Execute shell: git checkout 3.4.x
- Build:
- Root POM: pom.xml
- Goals and options: clean install
- Post steps:
- Run regardless of build result
- Build Settings: - Publish Checkstyle analysis results - Publish FindBugs analysis results
Jenkins Console output Jenkins Console output wirh -X
The solution:
- in Jenkins /Configuration/Build/Advanced check in Use private Maven repository
- Choose Strategy: Local to the workspace
- remove everything from /workspace folder by
rm -R *
@Grove: thanks you a lot for the support!
3.4-M4-SNAPSHOTas a suffix. Where is that 0 coming from? The only thing that says3.4.0is the dependency you're using. Are you sure you're looking at the right place? Maybe you're confusing the target output for a dependency it's using? What's the full file name of the jar jenkins is using? - Daniel Kaplan