Error in SonarQube when launching svn blame - maven

I recently upgraded my SonarQube server from 4.5.2 to 5.0.1, then to 5.1 (see edit below).
Suddenly, the analysis of a multi-module Maven project failed with the following error :
[INFO] [12:02:05.045] Sensor SCM Sensor...
[INFO] [12:02:05.169] SCM provider for this project is: svn
[INFO] [12:02:05.169] Retrieve SCM blame information...
[INFO] [12:02:05.185] 650 files to be analyzed
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] myproject ......................................... FAILURE [3:21.165s]
[INFO] module1 ........................................... SKIPPED
[INFO] module2 ........................................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2:42.429s
[INFO] Finished at: Thu Feb 26 11:30:01 CET 2015
[INFO] Final Memory: 73M/2020M
[DEBUG] [11:30:01.789] Executing: svn blame --xml --non-interactive -x -w src/main/java/MyClass.java
[ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.5:sonar (default-cli) on project myproject: java.io.IOException: Cannot run progra
m "svn" (in directory "C:\somedirectory\module1"): CreateProcess error=2, The system cannot find the file specified
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:216)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:317)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:152)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:555)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoExecutionException: java.io.IOException: Cannot run program "svn" (in directory "C:\somedirectory\module1"): CreateProcess error=2, The system cannot find the file specified
at org.codehaus.mojo.sonar.bootstrap.ExceptionHandling.handle(ExceptionHandling.java:41)
at org.codehaus.mojo.sonar.bootstrap.RunnerBootstraper.execute(RunnerBootstraper.java:139)
at org.codehaus.mojo.sonar.SonarMojo.execute(SonarMojo.java:138)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:106)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
... 19 more
Somehow, the command svn did not find the file src/main/java/MyClass.java in directory C:\somedirectory\module1, although that file is definitely there. If I copy-paste the command SonarQube is trying to execute in a command prompt svn blame --xml --non-interactive -x -w src/main/java/MyClass.java inside directory C:\somedirectory\module1 then the command is working fine.
svn command is correctly on the PATH, as can be seen in the "Library Path" field on "System Info" page in SonarQube server. SonarQube server is hosted on the same server where mvn sonar:sonar was executed (Windows Server 2008 R2).
svn is being launched by SonarQube to retrieve blame history. As I understand, there were some changes made in SonarQube 5.0 concerning SCM support (change to built-in). My workaround for now is to disable the SCM sensor in SonarQube (using -Dsonar.scm.disabled=true or directly in the SonarQube server, under "Settings > General Settings > SCM").
This is not related to this question since I only encountered that behaviour when I upgraded to SonarQube 5.0.1.
JRE used : 1.7.0_51 (64 bits)
EDIT :
After an upgrade to SonarQube 5.1, the error is still here but the message is different and more clear. I have reinstalled a SVN client (TortoiseSVN) and restarted both Jenkins and SonarQube but the error stays:
SCM provider was set to "svn" but no SCM provider found for this key. No SCM provider installed
[ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.5:sonar (default-cli) on project bombardier: SCM provider was set to "svn" but no SCM provider found for this key. No SCM provider installed -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.5:sonar (default-cli) on project bombardier: SCM provider was set to "svn" but no SCM provider found for this key. No SCM provider installed
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:216)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:317)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:152)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:555)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoExecutionException: SCM provider was set to "svn" but no SCM provider found for this key. No SCM provider installed
at org.codehaus.mojo.sonar.bootstrap.ExceptionHandling.handle(ExceptionHandling.java:41)
at org.codehaus.mojo.sonar.bootstrap.RunnerBootstraper.execute(RunnerBootstraper.java:139)
at org.codehaus.mojo.sonar.SonarMojo.execute(SonarMojo.java:138)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:106)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
... 19 more
Caused by: java.lang.IllegalArgumentException: SCM provider was set to "svn" but no SCM provider found for this key. No SCM provider installed
at org.sonar.batch.scm.ScmConfiguration.setProviderIfSupported(ScmConfiguration.java:123)
at org.sonar.batch.scm.ScmConfiguration.considerOldScmUrl(ScmConfiguration.java:133)
at org.sonar.batch.scm.ScmConfiguration.start(ScmConfiguration.java:109)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.invokeMethod(ReflectionLifecycleStrategy.java:110)
at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.start(ReflectionLifecycleStrategy.java:89)
at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.start(AbstractInjectionFactory.java:84)
at org.picocontainer.behaviors.AbstractBehavior.start(AbstractBehavior.java:169)
at org.picocontainer.behaviors.Stored$RealComponentLifecycle.start(Stored.java:132)
at org.picocontainer.behaviors.Stored.start(Stored.java:110)
at org.picocontainer.DefaultPicoContainer.potentiallyStartAdapter(DefaultPicoContainer.java:1015)
at org.picocontainer.DefaultPicoContainer.startAdapters(DefaultPicoContainer.java:1008)
at org.picocontainer.DefaultPicoContainer.start(DefaultPicoContainer.java:766)
at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:91)
at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:77)
at org.sonar.batch.scan.ScanTask.scan(ScanTask.java:57)
at org.sonar.batch.scan.ScanTask.execute(ScanTask.java:45)
at org.sonar.batch.bootstrap.TaskContainer.doAfterStart(TaskContainer.java:135)
at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:92)
at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:77)
at org.sonar.batch.bootstrap.GlobalContainer.executeTask(GlobalContainer.java:158)
at org.sonar.batch.bootstrapper.Batch.executeTask(Batch.java:95)
at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:67)
at org.sonar.runner.batch.IsolatedLauncher.execute(IsolatedLauncher.java:48)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:87)
at org.sonar.runner.impl.BatchLauncher$1.run(BatchLauncher.java:75)
at java.security.AccessController.doPrivileged(Native Method)
at org.sonar.runner.impl.BatchLauncher.doExecute(BatchLauncher.java:69)
at org.sonar.runner.impl.BatchLauncher.execute(BatchLauncher.java:50)
at org.sonar.runner.api.EmbeddedRunner.doExecute(EmbeddedRunner.java:102)
at org.sonar.runner.api.Runner.execute(Runner.java:100)
at org.codehaus.mojo.sonar.bootstrap.RunnerBootstraper.execute(RunnerBootstraper.java:135)
... 22 more

use the below command which will disable the svn related issues
-Dsonar.scm.disabled=True
this will disable the svn

I experienced same issue after installing SonarQube 5.1, go to Update Center:
http://your_domain:port/updatecenter/available
search for the "SVN", click "Install"
https://docs.sonarqube.org/display/PLUG/SVN+Plugin
Something like this will appear:
SonarQube needs to be restarted in order to install the following
plugins: sonar-scm-svn-plugin-1.0.jar
Restart your SonarQube.

This issue can be solve by two way,
1. by setting the sonar.properties -Dsonar.scm.disabled=True, this is valid only for sonarrunner.bat sonar analysis,
2. If your doing using any other type analysis then login with admin default admin is admin/admin(username/password).http://yourDomin:port/settings/index(e.g http://localhost:9000/settings/index) then in category select the scm and disable the scm sensor set as true.
3.or else u can add the svn plugin to the sonar http://your_domain:port/updatecenter/available after login as admin(admin/admin), search for the available plugin and select the svn and install it..

I had this problem and it was caused by not having an active installation of SVN on the build machine that was running the sonar analysis. It doesn't matter what the sonar box has installed. It's the build agent which needs to do the SVN blame.
I was using CentOS. The magic was
sudo yum install svn
The final trick was to make sure that the build machine was using the same version of SVN for checkout as the version I installed. If the build machine was natively using a different version you may have to make sure it cleans the whole workspace before its next check out too.
Finally, don't forget that Sonar needs your SVN credentials too!

Please check that the SonarQube process has the same enviroment variables, as you are using for testing.

I have just installed SonarQube 5.0.1 on a Redhat Linux machine and I have exactly the same problem.
Instead of disabling the scm stats plugin, I have installed a svn client (svnkit.x86_64) and the build is executed successfully with SCM activated.
So I guess on Windows, you should install a svn client and put it on the PATH.

Related

Does a maven plugin exist to gracefully check elevated privilege?

Does anyone know of a maven plugin which can gracefully check that the maven process is running with elevated privileges on Windows.
I searched using Google, the Maven Users mailing list archive, Commons Exec mailing list archives, stackoverflow but I've only found people saying Run As Administrator. The search terms I used included
elevated
maven
exec-maven-plugin
administrator
privileged
commons-exec
I'd just like a way to check for elevated privileges and end the maven build early with a user friendly error message before time is wasted executing a bunch of maven plugins only to fail at the end when trying to execute exec-maven-plugin with an error like
Downloaded: http://somehost:8082/artifactory/repo/org/apache/commons/commons-exec/1.3/commons-exec-1.3.jar (54 kB at 85 kB/s)
[ERROR] Command execution failed.
java.io.IOException: Cannot run program "C:\Program Files (x86)\InstallAnywhere 2017\build.exe" (in directory "C:\Downloads\New Builds\Artifactory Downloads\Maven Implementation\InstallerSharedDownloa
d\WindowsDownload"): CreateProcess error=740, The requested operation requires elevation
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
at java.lang.Runtime.exec(Runtime.java:620)
at org.apache.commons.exec.launcher.Java13CommandLauncher.exec(Java13CommandLauncher.java:61)
at org.apache.commons.exec.DefaultExecutor.launch(DefaultExecutor.java:279)
at org.apache.commons.exec.DefaultExecutor.executeInternal(DefaultExecutor.java:336)
at org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:166)
at org.codehaus.mojo.exec.ExecMojo.executeCommandLine(ExecMojo.java:804)
at org.codehaus.mojo.exec.ExecMojo.executeCommandLine(ExecMojo.java:751)
at org.codehaus.mojo.exec.ExecMojo.execute(ExecMojo.java:313)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:154)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:146)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:309)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:194)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:107)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:993)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:345)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:191)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: java.io.IOException: CreateProcess error=740, The requested operation requires elevation
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.<init>(ProcessImpl.java:386)
at java.lang.ProcessImpl.start(ProcessImpl.java:137)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
... 30 more
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 02:13 min
[INFO] Finished at: 2017-07-31T14:27:38-04:00
[INFO] Final Memory: 21M/298M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.6.0:exec (My Command Runner) on project WindowsDownload: Command execution failed.: Cannot run program "C:\Program Files (x86)\Inst
allAnywhere 2017\build.exe" (in directory "C:\Downloads\New Builds\Artifactory Downloads\Maven Implementation\InstallerSharedDownload\WindowsDownload"): CreateProcess error=740, The requested operatio
n requires elevation -> [Help 1]
[ERROR]

Usage of maven-release-plugin in Jenkins with integrity (MKS) as Source Code Management

Please notice the second question in the end of this one!
I have got some trouble using Jenkins, the maven-release-plugin and integrity (using MKS) as source code Management (scm).
Well, I try to release my project from MKS via Jenkins to Sonartype Nexus. If I use "deploy" as maven goal within the maven-release-plugin, everything is fine and the release is deployed correct, BUT it is saved as a snapshot in Nexus.
To avoid this snapshot problem I decided to use the maven-release-plugin with release:perform. It should change the version number to a version without snapshot (like: 1.0.0), release it and add snapshot to the version number back again when the release was done. Version is increased also (like 1.0.1-SNAPSHOT).
But if I use "release:prepare" or "release:perform" as maven goals the output tells me:
[ERROR] No SCM URL was provided to perform the release from
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 24.405s
[INFO] Finished at: Fri Feb 14 11:56:40 CET 2014
[INFO] Final Memory: 10M/245M
[INFO] ------------------------------------------------------------------------
Waiting for Jenkins to finish collecting data
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.0:perform (default-cli) on project javatests-test04: No SCM URL was provided to perform the release from -> [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/MojoFailureException
After I searched a now for a long time but did not found the answer I needed I came up with the idea to open this new question.
I tried things like:
adding information to pom.xml but not even sure if maven realized it (did not know what the correct URL would be for me was or if I even have one so I didn't changed it)
original from this site:
<scm>
<connection>scm:git:git#github.com:user/project.git</connection>
<url>scm:git:git#github.com:user/project.git</url>
<developerConnection>scm:git:git#github.com:user/project.git</developerConnection>
</scm>
my version:
<scm>
<connection>scm:integrity|myUser#myServer:7001|#p=d:/MKS/Tools/Tools.pj#s=Tests/Tests.pj#javatests-test04 </connection>
<url>scm:git:git#github.com:user/project.git</url>
<developerConnection>scm:integrity|myUser#myServer:7001|#p=d:/MKS/Tools/Tools.pj#s=Tests/Tests.pj#javatests-test04</developerConnection>
</scm>
I changed the maven goal as a second try(same with -Dproject.scm.developerConnerction):
release:perform -DconnectionUrl=scm:integrity:myUser#myMksServer:7001|#p=d:/MKS/Tools/Tools.pj#s=Tests/Tests.pj#javatests-test04
but it leads to a new error:
[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-release-plugin:2.0:prepare
(default-cli) on project javatests-test04: The provider given in the
SCM URL could not be found: No such provider: 'integrity'.
I fact it works fine with "deploy" as maven goal, I am sure this is not the fault of wrong paths to project or to Sonartype Nexus.
Can anybody help me and/or tell me what my Maven goal should be like?
Do I have th change things in the pom? in the master pom? I want the release statement work...
I found a workaround that worked for me:
The plugin genreates some environment variables. Most of them are given and created automatic and one (IS_M2RELEASEBUILD) is editable in in the advanced settings of the option point "maven release build"
My solution:
1.) Check the "Maven release build" in the build environment to gain access to some values later.
2.) Create a "Conditional Step (Single)" as a Pre Step AND as a Post Step
2.1) Both should have a Boolean condition with a token: ${ENV,var="IS_M2RELEASEBUILD"}
2.2) Both should have "call Maven goal" as build step.
Goal for the pre step: *versions:set -DnewVersion=${MVN_RELEASE_VERSION}*
Goal for the post step: *versions:set -DnewVersion=${MVN_DEV_VERSION}*
The value of this variables are the same you enter when a release build is started.
3.) As "normal" build step i simple call a maven goal with "compile"
4.) Add Post-Build-Action: Integrity - CM Checkin with path to your MKS project and other options that are maybe needed here.
5.) Finished! (Dont forget to set your Distribution options in your pom.xml to tell Jenkins and Maven where the release results should be saved)
EDIT: I FOUND A WORKAROUND! SEE ANSWEAR WITH SOLUTION!
Okay, i have done 1 step in the right direction!
Just needed to add a reference into the pom.xml of my project to the currently used maven-release-plugin:
<build>
<plugins>
<plugin>
<artifactId>maven-release-plugin</artifactId>
<version>2.4.1</version>
<configuration>
<checkModificationExcludes>
<checkModificationExclude>**/*pom.xml*</checkModificationExclude>
<checkModificationExclude>**/*.log</checkModificationExclude>
<checkModificationExclude>**/*.jar</checkModificationExclude>
<checkModificationExclude>**/target/**</checkModificationExclude>
</checkModificationExcludes>
</configuration>
</plugin>
</plugins>
</build>
BUT:
Now i have some other problems:
Console tells me that the login to MKS fails. The called user has got read AND write permissions, path to project and to Jenkins server are set right. I also made sure that the MKS folder is first in my path envionment variables. Just for your information: of course i used a real user with real password and real server and not "myUser", "myPassword" or "myServer"
I am pretty sure that i use the right configurations for my scm (developer-)connetction settings, because before the release takes part i download the projects content from MKS to my server with success! No error comes up here...
Usage of "scm:validate" tells me:
[INFO] --- maven-scm-plugin:1.9:validate (default-cli) # javatests-test04 ---
[INFO] MKS Integrity API Version: 4.10
[INFO] connectionUrl scm connection string is valid.
[INFO] MKS Integrity API Version: 4.10
[INFO] project.scm.connection scm connection string is valid.
[INFO] MKS Integrity API Version: 4.10
[INFO] project.scm.developerConnection scm connection string is valid.
What could be the reason for connections failures?
Console:
[...some more console output...]
Executing Maven: -B -f (pathToProject)\workspace\pom.xml -DdevelopmentVersion=0.0.5-SNAPSHOT -DreleaseVersion=0.0.4 -Dusername=myUser -Dresume=false compile release:prepare -Dpassword=**********
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building my test project 0.0.4-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-release-plugin:2.4.1:prepare (default-cli) # javatests-test04 ---
[some other debug infos]
[DEBUG] -- end configuration --
[DEBUG] User/Password information supplied: myUser/myPasswort
[DEBUG] Host/Port information supplied: myServer:7001
[INFO] MKS Integrity API Version: 4.10
[DEBUG] Configuration Path: #p=d:/MKS/Tools/Tools.pj#s=Tests/Tests.pj#javatests-test04
[INFO] Verifying that there are no local modifications...
[INFO] ignoring changes on: **\release.properties, **\pom.xml.next, **\*pom.xml*, **\*.jar, **\pom.xml.releaseBackup, **\pom.xml.backup, **\pom.xml.branch, **\target\**, **\pom.xml.tag, **\*.log
[DEBUG] User/Password information supplied: myUser/myPasswort
[DEBUG] Host/Port information supplied: myServer:7001
[INFO] MKS Integrity API Version: 4.10
[DEBUG] Configuration Path: #p=d:/MKS/Tools/Tools.pj#s=Tests/Tests.pj#javatests-test04
[INFO] Attempting to connect with the MKS Integrity Server
[INFO] Creating session for myUser/***********
[INFO] Attempting to establish connection using myUser#myServer:7001
com.mks.connect.BlimpException: Attempt to launch MKS Integrity Client Timed out. To solve this please try the following:
- Verify that the user you are logged in as has read and write permissions to the Integrity Client install directory.
- Make sure the Integrity Client install directory is the very first entry in the path.
at com.mks.connect.ClientCmdRunnerImpl.icInitialize(Native Method)
at com.mks.connect.ClientCmdRunnerImpl.checkIntegrityClientForLaunch(ClientCmdRunnerImpl.java:71)
at com.mks.connect.ClientCmdRunnerImpl.executePreCondition(ClientCmdRunnerImpl.java:95)
at com.mks.connect.AbstractCmdRunner.executeCommand(AbstractCmdRunner.java:235)
at com.mks.connect.AbstractCmdRunner.execute(AbstractCmdRunner.java:394)
at org.apache.maven.scm.provider.integrity.APISession.connect(APISession.java:134)
at org.apache.maven.scm.provider.integrity.command.login.IntegrityLoginCommand.executeLoginCommand(IntegrityLoginCommand.java:66)
at org.apache.maven.scm.command.login.AbstractLoginCommand.executeCommand(AbstractLoginCommand.java:45)
at org.apache.maven.scm.command.AbstractCommand.execute(AbstractCommand.java:59)
at org.apache.maven.scm.provider.integrity.IntegrityScmProvider.login(IntegrityScmProvider.java:182)
at org.apache.maven.scm.provider.AbstractScmProvider.login(AbstractScmProvider.java:742)
at org.apache.maven.scm.provider.AbstractScmProvider.status(AbstractScmProvider.java:784)
at org.apache.maven.shared.release.phase.ScmCheckModificationsPhase.execute(ScmCheckModificationsPhase.java:126)
at org.apache.maven.shared.release.DefaultReleaseManager.prepare(DefaultReleaseManager.java:234)
at org.apache.maven.shared.release.DefaultReleaseManager.prepare(DefaultReleaseManager.java:169)
at org.apache.maven.shared.release.DefaultReleaseManager.prepare(DefaultReleaseManager.java:146)
at org.apache.maven.shared.release.DefaultReleaseManager.prepare(DefaultReleaseManager.java:107)
at org.apache.maven.plugins.release.PrepareReleaseMojo.prepareRelease(PrepareReleaseMojo.java:277)
at org.apache.maven.plugins.release.PrepareReleaseMojo.execute(PrepareReleaseMojo.java:232)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.jvnet.hudson.maven3.launcher.Maven3Launcher.main(Maven3Launcher.java:117)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:329)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:239)
at org.jvnet.hudson.maven3.agent.Maven3Main.launch(Maven3Main.java:178)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at hudson.maven.Maven3Builder.call(Maven3Builder.java:134)
at hudson.maven.Maven3Builder.call(Maven3Builder.java:69)
at hudson.remoting.UserRequest.perform(UserRequest.java:118)
at hudson.remoting.UserRequest.perform(UserRequest.java:48)
at hudson.remoting.Request$2.run(Request.java:328)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
[ERROR] MKS API Exception: Attempt to launch MKS Integrity Client Timed out. To solve this please try the following:
- Verify that the user you are logged in as has read and write permissions to the Integrity Client install directory.
- Make sure the Integrity Client install directory is the very first entry in the path.
[INFO] exited with return code -1
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 39.694s
[INFO] Finished at: Mon Feb 17 16:49:07 CET 2014
[INFO] Final Memory: 17M/310M
[INFO] ------------------------------------------------------------------------
Waiting for Jenkins to finish collecting data
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.4.1:prepare (default-cli) on project javatests-test04: An error occurred during the status check process: Can't login.
[ERROR] Exit Code: -1
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.4.1:prepare (default-cli) on project javatests-test04: An error occurred during the status check process: Can't login.
Exit Code: -1
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.jvnet.hudson.maven3.launcher.Maven3Launcher.main(Maven3Launcher.java:117)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:329)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:239)
at org.jvnet.hudson.maven3.agent.Maven3Main.launch(Maven3Main.java:178)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at hudson.maven.Maven3Builder.call(Maven3Builder.java:134)
at hudson.maven.Maven3Builder.call(Maven3Builder.java:69)
at hudson.remoting.UserRequest.perform(UserRequest.java:118)
at hudson.remoting.UserRequest.perform(UserRequest.java:48)
at hudson.remoting.Request$2.run(Request.java:328)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
Caused by: org.apache.maven.plugin.MojoExecutionException: An error occurred during the status check process: Can't login.
Exit Code: -1
at org.apache.maven.plugins.release.PrepareReleaseMojo.prepareRelease(PrepareReleaseMojo.java:281)
at org.apache.maven.plugins.release.PrepareReleaseMojo.execute(PrepareReleaseMojo.java:232)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
... 30 more
Caused by: org.apache.maven.shared.release.ReleaseExecutionException: An error occurred during the status check process: Can't login.
Exit Code: -1
at org.apache.maven.shared.release.phase.ScmCheckModificationsPhase.execute(ScmCheckModificationsPhase.java:131)
at org.apache.maven.shared.release.DefaultReleaseManager.prepare(DefaultReleaseManager.java:234)
at org.apache.maven.shared.release.DefaultReleaseManager.prepare(DefaultReleaseManager.java:169)
at org.apache.maven.shared.release.DefaultReleaseManager.prepare(DefaultReleaseManager.java:146)
at org.apache.maven.shared.release.DefaultReleaseManager.prepare(DefaultReleaseManager.java:107)
at org.apache.maven.plugins.release.PrepareReleaseMojo.prepareRelease(PrepareReleaseMojo.java:277)
... 33 more
Caused by: org.apache.maven.scm.ScmException: Can't login.
Exit Code: -1
at org.apache.maven.scm.provider.AbstractScmProvider.login(AbstractScmProvider.java:746)
at org.apache.maven.scm.provider.AbstractScmProvider.status(AbstractScmProvider.java:784)
at org.apache.maven.shared.release.phase.ScmCheckModificationsPhase.execute(ScmCheckModificationsPhase.java:126)
... 38 more
[ERROR]
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[JENKINS] Archiving pathToWorkspace\workspace\pom.xml to pathToRepository/javatests-test04/0.0.4-SNAPSHOT/javatests-test04-0.0.4-SNAPSHOT.pom
[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/MojoExecutionException
channel stopped
Finished: FAILURE
Thanks for your Help! :)

"Peer Not Authenticated" in maven when trying to run a job in JENKINS

When I try running a maven job in Jenkins, the build is not successful.
The error message in the console displays the following :
[INFO] ------------------------------------------------------------------------
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven- resources-plugin/2.5/maven-resources-plugin-2.5.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.640s
[INFO] Finished at: Tue Aug 20 11:21:36 EST 2013
[INFO] Final Memory: 6M/16M
[INFO] ------------------------------------------------------------------------
mavenExecutionResult exceptions not empty
message : Plugin org.apache.maven.plugins:maven-resources-plugin:2.5 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.5
cause : Failed to read artifact descriptor for org.apache.maven.plugins:maven- resources-plugin:jar:2.5
Stack trace :
org.apache.maven.plugin.PluginResolutionException: Plugin org.apache.maven.plugins:maven-resources-plugin:2.5 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.5
at org.apache.maven.plugin.internal.DefaultPluginDependenciesResolver.resolve(DefaultPluginDependenciesResolver.java:129)
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getPluginDescriptor(DefaultMavenPluginManager.java:142)
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getMojoDescriptor(DefaultMavenPluginManager.java:261)
at org.apache.maven.plugin.DefaultBuildPluginManager.getMojoDescriptor(DefaultBuildPluginManager.java:185)
at org.apache.maven.lifecycle.internal.DefaultLifecycleExecutionPlanCalculator.setupMojoExecution(DefaultLifecycleExecutionPlanCalculator.java:152)
at org.apache.maven.lifecycle.internal.DefaultLifecycleExecutionPlanCalculator.setupMojoExecutions(DefaultLifecycleExecutionPlanCalculator.java:139)
at org.apache.maven.lifecycle.internal.DefaultLifecycleExecutionPlanCalculator.calculateExecutionPlan(DefaultLifecycleExecutionPlanCalculator.java:116)
at org.apache.maven.lifecycle.internal.DefaultLifecycleExecutionPlanCalculator.calculateExecutionPlan(DefaultLifecycleExecutionPlanCalculator.java:129)
at org.apache.maven.lifecycle.internal.BuilderCommon.resolveBuildPlan(BuilderCommon.java:92)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.jvnet.hudson.maven3.launcher.Maven3Launcher.main(Maven3Launcher.java:79)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:329)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:239)
at org.jvnet.hudson.maven3.agent.Maven3Main.launch(Maven3Main.java:158)
at hudson.maven.Maven3Builder.call(Maven3Builder.java:100)
at hudson.maven.Maven3Builder.call(Maven3Builder.java:66)
at hudson.remoting.UserRequest.perform(UserRequest.java:118)
at hudson.remoting.UserRequest.perform(UserRequest.java:48)
at hudson.remoting.Request$2.run(Request.java:326)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:724)
Caused by: org.sonatype.aether.resolution.ArtifactDescriptorException: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.5
at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:296)
at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.readArtifactDescriptor(DefaultArtifactDescriptorReader.java:186)
at org.sonatype.aether.impl.internal.DefaultRepositorySystem.readArtifactDescriptor(DefaultRepositorySystem.java:279)
at org.apache.maven.plugin.internal.DefaultPluginDependenciesResolver.resolve(DefaultPluginDependenciesResolver.java:115)
... 33 more
Caused by: org.sonatype.aether.resolution.ArtifactResolutionException: Could not transfer artifact org.apache.maven.plugins:maven-resources-plugin:pom:2.5 from/to central (http://repo.maven.apache.org/maven2): peer not authenticated
at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:538)
at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:216)
at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:193)
at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:281)
... 36 more
Caused by: org.sonatype.aether.transfer.ArtifactTransferException: Could not transfer artifact org.apache.maven.plugins:maven-resources-plugin:pom:2.5 from/to central (http://repo.maven.apache.org/maven2): peer not authenticated
at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(WagonRepositoryConnector.java:951)
at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(WagonRepositoryConnector.java:941)
at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$GetTask.run(WagonRepositoryConnector.java:669)
at org.sonatype.aether.util.concurrency.RunnableErrorForwarder$1.run(RunnableErrorForwarder.java:60)
... 3 more
Caused by: org.apache.maven.wagon.TransferFailedException: peer not authenticated
at org.apache.maven.wagon.shared.http4.AbstractHttpClientWagon.fillInputData(AbstractHttpClientWagon.java:892)
at org.apache.maven.wagon.StreamWagon.getInputStream(StreamWagon.java:116)
at org.apache.maven.wagon.StreamWagon.getIfNewer(StreamWagon.java:88)
at org.apache.maven.wagon.StreamWagon.get(StreamWagon.java:61)
at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$GetTask.run(WagonRepositoryConnector.java:601)
... 4 more
Caused by: javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated
at sun.security.ssl.SSLSessionImpl.getPeerCertificates(SSLSessionImpl.java:397)
at org.apache.maven.wagon.providers.http.httpclient.conn.ssl.AbstractVerifier.verify(AbstractVerifier.java:126)
at org.apache.maven.wagon.providers.http.httpclient.conn.ssl.SSLSocketFactory.createLayeredSocket(SSLSocketFactory.java:628)
at org.apache.maven.wagon.shared.http4.ConfigurableSSLSocketFactoryDecorator.createLayeredSocket(ConfigurableSSLSocketFactoryDecorator.java:57)
at org.apache.maven.wagon.providers.http.httpclient.impl.conn.DefaultClientConnectionOperator.updateSecureConnection(DefaultClientConnectionOperator.java:232)
at org.apache.maven.wagon.providers.http.httpclient.impl.conn.ManagedClientConnectionImpl.layerProtocol(ManagedClientConnectionImpl.java:401)
at org.apache.maven.wagon.providers.http.httpclient.impl.client.DefaultRequestDirector.establishRoute(DefaultRequestDirector.java:842)
at org.apache.maven.wagon.providers.http.httpclient.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:649)
at org.apache.maven.wagon.providers.http.httpclient.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:480)
at org.apache.maven.wagon.providers.http.httpclient.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:906)
at org.apache.maven.wagon.providers.http.httpclient.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:805)
at org.apache.maven.wagon.shared.http4.AbstractHttpClientWagon.execute(AbstractHttpClientWagon.java:746)
at org.apache.maven.wagon.shared.http4.AbstractHttpClientWagon.fillInputData(AbstractHttpClientWagon.java:886)
... 8 more
channel stopped
Picked up JAVA_TOOL_OPTIONS: -agentlib:jvmhook
Picked up _JAVA_OPTIONS: -Xrunjvmhook - Xbootclasspath/a:C:\PROGRA~1\HP\QUICKT~1\bin\JAVA_S~1\classes;C:\PROGRA~1\HP\QUICKT~1\bin\J AVA_S~1\classes\jasmine.jar
Finished: FAILURE
I'm able to get to know the root cause of the error is some authentication issue("peer not authenticated"). But not able to get it resolved as I am not aware what authetication I need to key in and where to key in.
Additional details : I am using Maven 3.0.3 and JDK 1.7
Thanks in advance for your time in helping me resolving the issue. Let me know if you need any additional info.
Thanks
When using SSL to connect to maven repositories you'll need to make sure that the certificates for the repository are trusted by the JVM running maven. Refer to the Guide to Remote repository access through authenticated HTTPS.
Also, as mentioned by rec in an answer to maven release -> peer not authenticated, with newer versions of maven you can disable the certificate validation of the maven http wagon temporarily to confirm if the certificate is indeed the source of the problem:
-Dmaven.wagon.http.ssl.insecure=true -Dmaven.wagon.http.ssl.allowall=true
Solution 4 “Peer Not Authenticated” while adding maven "jitpack.io" in app's gradle.build.
Simple solution is install java 8 if you have lower version.
We tried with Oracle java8 and it works. :)
Note : Tried a lot of solutions those are on stackoverflow.com but none of them work for me.
Assuming you have set Java Home - JAVA_HOME env variable and using it to run maven;
Pre-req is that you have exported the .cer certificate (via browser ex)
cd %JAVA_HOME%\jre\lib\security
%JAVA_HOME%\jre\bin\keytool -v -alias mavensrvNewCer -import -file d:\pathtoexportedcertificate.cer -keystore trust.jks
set MAVEN_OPTS=-Xmx512m -Djavax.net.ssl.trustStore=%JAVA_HOME%/jre/lib/security/trust.jks -Djavax.net.ssl.trustStorePassword=changeit -Djavax.net.ssl.keyStore=%JAVA_HOME%/jre/lib/security/trust.jks -Djavax.net.ssl.keyStoreType=jks -Djavax.net.ssl.keyStorePassword=changeit
mvn install

Sonar INVALID HASH

After upgrading to 3.5.1, our Sonar shows INVALID HASH error in one of our slave machine (we have 1 master and 3 slaves). I found all file size under C:\Users\xxxxx.sonar\cache_tmp is zero. But other directories like C:\Users\xxxxx.sonar\cache\1b8de6f094e072c092b4ef1b332fdbf0 still has file (like commons-dbcp-1.3.jar) and the file is correct.
This is the error message, is there any suggestion for it?
[ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.0:sonar (default-cli) on project XXXXXXXX: Can not execute Sonar: INVALID HASH: File C:\Users\xxxxx\.sonar\cache\_tmp\1374226573512-28 was expected to have hash 099c91d9bb47f3c7f98b0e1825f593df but was downloaded with hash d41d8cd98f00b204e9800998ecf8427e -> [Help 1]
17:36:11 org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.0:sonar (default-cli) on project XXXXXXXX: Can not execute Sonar
17:36:11 at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
17:36:11 at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
17:36:11 at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
17:36:11 at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
17:36:11 at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
17:36:11 at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
17:36:11 at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
17:36:11 at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
17:36:11 at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
17:36:11 at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
17:36:11 at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
17:36:11 at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
17:36:11 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
17:36:11 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
17:36:11 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
17:36:11 at java.lang.reflect.Method.invoke(Method.java:597)
17:36:11 at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
17:36:11 at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
17:36:11 at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
17:36:11 at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
And it still doesn't work after adding 'SONAR_USER_HOME' environment variable
(http://docs.codehaus.org/display/SONAR/Frequently+Asked+Questions#FrequentlyAskedQuestions-INVALIDHASH)
you should try to delete the local cache. A file has been corrupted during download. The FAQ is going to be updated.
Thanks
I faced the same issue,
Solution there was space problem in user home directory, so I created a soft link .sonar in user home directory to tmp directory and it worked or you can pass sonar.userHome=/usr/tmp to get it working.
Issue while running sonar Qube on Jenkins
SonarQube Runner 2.3
Java 1.7.0_75 Oracle Corporation (64-bit)
Linux 2.6.32-504.12.2.el6.x86_64 amd64
INFO: Runner configuration file: NONE
INFO: Project configuration file: /usr/local/build/jenkins_home/head_fast_gradle/workbench/build/tmp/sonarRunner/sonar-project.properties
INFO: Default locale: "en_US", source code encoding: "US-ASCII" (analysis is platform dependent)
INFO: Work directory: /usr/local/build/jenkins_home/head_fast_gradle/workbench/build/sonar
INFO: SonarQube Server 4.5.4
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
Total time: 0.487s
Final Memory: 3M/481M
INFO: ------------------------------------------------------------------------
ERROR: Error during Sonar runner execution
ERROR: Fail to download libraries from server
ERROR: Caused by: INVALID HASH: File /fmac/users/bldmgr/.sonar/cache/_tmp/1432846057632-440 was expected to have hash 60dd4c0ee91e594a20faa75f80182956 but was downloaded with hash d41d8cd98f00b204e9800998ecf8427e
ERROR:
ERROR: To see the full stack trace of the errors, re-run SonarQube Runner with the -e switch.
ERROR: Re-run SonarQube Runner using the -X switch to enable full debug logging.
:sonarRunner FAILED
When I inspected this url, http://mysonar:9000/sonar/api/plugins/installed, the hash of one plugin was uncorrect.
I restarted the sonar server and the hash value at this url was updated with the correct value.
Note that the jar of the plugin was not modified on the server. In my case the corruption was not in the cache but in the server itself.
I use sonar version 6.7.

Building Hadoop with Maven - "Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.6:run (create-testdirs)"

I'm trying to build the Hadoop trunk using Maven. I got the project with svn. But then, I tried mvn clean install. But I'm getting the following error:
[INFO] Apache Hadoop Main ................................ SUCCESS [1.616s]
[INFO] Apache Hadoop Project POM ......................... FAILURE [0.322s]
[INFO] Apache Hadoop Annotations ......................... SKIPPED
[INFO] Apache Hadoop Project Dist POM .................... SKIPPED
.... etc ....
.... etc ....
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.361s
[INFO] Finished at: Sat Jun 15 20:52:13 IST 2013
[INFO] Final Memory: 18M/43M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.6:run (create-testdirs) on project hadoop-project: Error executing ant tasks: /home/sreejith/svn/hadoop-trunk/hadoop-project/target/antrun/build-main.xml (No such file or directory) -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.6:run (create-testdirs) on project hadoop-project: Error executing ant tasks: /home/sreejith/svn/hadoop-trunk/hadoop-project/target/antrun/build-main.xml (No such file or directory)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.MojoExecutionException: Error executing ant tasks: /home/sreejith/svn/hadoop-trunk/hadoop-project/target/antrun/build-main.xml (No such file or directory)
at org.apache.maven.plugin.antrun.AntRunMojo.execute(AntRunMojo.java:287)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
... 19 more
Caused by: java.io.FileNotFoundException: /home/sreejith/svn/hadoop-trunk/hadoop-project/target/antrun/build-main.xml (No such file or directory)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(FileOutputStream.java:212)
at java.io.FileOutputStream.<init>(FileOutputStream.java:104)
at org.codehaus.plexus.util.FileUtils.fileWrite(FileUtils.java:470)
at org.apache.maven.plugin.antrun.AntRunMojo.writeTargetToProjectFile(AntRunMojo.java:499)
at org.apache.maven.plugin.antrun.AntRunMojo.execute(AntRunMojo.java:226)
... 21 more
I googled all I could. Could someone give me a clue why this is happening?
Found a solution. Do a sudo chown -R username parent-directory if you haven't already. Now try, mvn install -DskipTests. Everything should go fine and you should get BUILD SUCCESS.
P.S: Thanks ThomasJungblut
Try running 'protoc' and verify that it has the right GCC libraries installed. That was a problem I had on a build from source. It happened when I ran the command in a window where I had sourced a bunch of library configs for a software program, which seemed to screw up the proper library loading.
I had built and installed the google protoc from source, and downloaded maven, and installed, and worked off the raw git of hadoop-common. No other prep work changed from standard Centos6.

Resources