Showing posts with label svn. Show all posts
Showing posts with label svn. Show all posts

Wednesday, August 16, 2017

Solve unrelated svn blames while building projects with maven

Previously I have used Subversion as the version control system. Then moved the projects to Git. Converted all the Jenkins build jobs accordingly. But while building some sonar jobs got below error.

[ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.6:sonar (default-cli) on project YourTestProject: The svn blame command [svn blame --xml --non-interactive -x -w --username ******** --password ******** src/your/test/project/code/path/Main.java] failed: svn: 'src/your/test/project/code/path/' is not a working copy -> [Help 1]

Since we are using Git and so no need of any svn blames. Using below parameters disabled svn activities.

-Dsonar.scm.disabled=True

Hope this will help you too.


Cheers...!!

Thursday, June 9, 2016

Solve Jenkins and Subversion time sync issue

You will notice below warning when your Jenkins server and Subversion server have different times (not in a time sync status)

WARNING: clock of the subversion server appears to be out of sync. This can result in inconsistent check out behavior.

There are two ways to sync Jenkins server with svn.
  1. Based on Jenkins time and svn time
  2. Based on Jenkins revision number and snv revision number

Before build projects Jenkins takes updates from svn. If times are not synced changes will not reflect properly. To solve this issue you can configure Jenkins to take updates based on head revision. Fix is simple.
You just have to add @HEAD to the end of your svn url.

for example:
If your previous svn url is 'http://your.svn.server/svnroot/your/code/location'
add @HEAD to the end of url.
New url is 'http://your.svn.server/svnroot/your/code/location@HEAD'

This will solve Jenkins and svn out of sync issues.


Cheers..!!