Sonar + Jenkins job execution error - jenkins

It's been a week since I tried to deploy this solution locally on my machine and then deploy it to a production server.
However, I faced many difficulties and incomprehension, that is what I did:
Sonar installation via apt-get and launch of it on port 9000 of localhost.
Installation of Jenkins via apt-get and launch of it on port 8080 of localhost.
Download the Sonar plugin for Jenkins.
After trying to running a job, it failed because :
ERROR: Error during SonarQube Scanner execution org.sonarqube.ws.client.HttpException:
The full error stack is:
ERROR: Error during SonarQube Scanner execution
org.sonarqube.ws.client.HttpException: Error 500 on http:/localhost:9000/api/ce/submit?projectKey=sonar.org:projectname&projectName=devops : {"errors":[{"msg":"An error has occurred. Please contact your administrator"}]}
at org.sonarqube.ws.client.BaseResponse.failIfNotSuccessful(BaseResponse.java:36)
at org.sonar.scanner.bootstrap.ScannerWsClient.failIfUnauthorized(ScannerWsClient.java:106)
at org.sonar.scanner.bootstrap.ScannerWsClient.call(ScannerWsClient.java:75)
at org.sonar.scanner.report.ReportPublisher.upload(ReportPublisher.java:177)
at org.sonar.scanner.report.ReportPublisher.execute(ReportPublisher.java:131)
at org.sonar.scanner.phases.PublishPhaseExecutor.publishReportJob(PublishPhaseExecutor.java:72)
at org.sonar.scanner.phases.PublishPhaseExecutor.executeOnRoot(PublishPhaseExecutor.java:54)
at org.sonar.scanner.phases.AbstractPhaseExecutor.execute(AbstractPhaseExecutor.java:83)
at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:175)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:143)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:128)
at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:262)
at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:257)
at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:247)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:143)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:128)
at org.sonar.scanner.task.ScanTask.execute(ScanTask.java:47)
at org.sonar.scanner.task.TaskContainer.doAfterStart(TaskContainer.java:86)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:143)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:128)
at org.sonar.scanner.bootstrap.GlobalContainer.executeTask(GlobalContainer.java:118)
at org.sonar.batch.bootstrapper.Batch.executeTask(Batch.java:117)
at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:63)
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.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
at com.sun.proxy.$Proxy0.execute(Unknown Source)
at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:233)
at org.sonarsource.scanner.api.EmbeddedScanner.runAnalysis(EmbeddedScanner.java:151)
at org.sonarsource.scanner.cli.Main.runAnalysis(Main.java:123)
at org.sonarsource.scanner.cli.Main.execute(Main.java:77)
at org.sonarsource.scanner.cli.Main.main(Main.java:61)
http://localhost:9000/api/ce/submit?projectKey=sonar.org:projectname&projectName=devops
: {"errors":[{"msg":"An error has occurred. Please contact your administrator"}]}
When I searched on the SonarQube logs I saw that :
2017.05.02 23:35:25 ERROR web[AVvKZ3JA+DB4lMWaAACV][o.s.s.w.WebServiceEngine] Fail to process
request http:/localhost:9000/api/qualityprofiles/restore
java.lang.IllegalStateException: Can't read file part at
org.sonar.server.ws.ServletRequest.readPart(ServletRequest.java:102)
...
Caused by: java.io.IOException: The temporary upload location [/root/Documents/sonarqube-6.3.1/temp/tc/work/Tomcat/localhost/ROOT] is not valid

As seen in "The temporary upload location is not valid", make sure that the folder /root/Documents/sonarqube-6.3.1/temp/tc/work/Tomcat/localhost/ROOT
does exist
is 775 by the user running Sonar.
Or (as seen here) you can define the temporary folder to another location
JVM_OPTIONS="-Xrs -Xms256m -Xmx512m -Djava.io.tmpdir=/opt/another/tmp"
See this thread and this thread as examples.

Related

Fail to find sonarqube while using jenkins

I m using jenkins and I need my sonarqube to make some analysis on my code.
I use docker to manage both images and mapped the port so that they are accessible from outside. It works great, I can open and login in both portals.
My problem is that when I try to run my jenkins build and ask sonarqube for informations, it throws me the following error :
ERROR: Error during SonarQube Scanner execution
org.sonarsource.scanner.api.internal.ScannerException: Unable to execute SonarQube
at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory$1.run(IsolatedLauncherFactory.java:84)
at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory$1.run(IsolatedLauncherFactory.java:71)
at java.security.AccessController.doPrivileged(Native Method)
at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.createLauncher(IsolatedLauncherFactory.java:71)
at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.createLauncher(IsolatedLauncherFactory.java:67)
at org.sonarsource.scanner.api.EmbeddedScanner.doStart(EmbeddedScanner.java:218)
at org.sonarsource.scanner.api.EmbeddedScanner.start(EmbeddedScanner.java:156)
at org.sonarsource.scanner.cli.Main.execute(Main.java:70)
at org.sonarsource.scanner.cli.Main.main(Main.java:60)
Caused by: java.lang.IllegalStateException: Fail to download libraries from server
at org.sonarsource.scanner.api.internal.Jars.downloadFiles(Jars.java:93)
at org.sonarsource.scanner.api.internal.Jars.download(Jars.java:70)
at org.sonarsource.scanner.api.internal.JarDownloader.download(JarDownloader.java:39)
at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory$1.run(IsolatedLauncherFactory.java:75)
... 8 more
Caused by: java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:589)
at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.Platform.connectSocket(Platform.java:101)
at org.sonarsource.scanner.api.internal.shaded.okhttp.Connection.connectSocket(Connection.java:198)
at org.sonarsource.scanner.api.internal.shaded.okhttp.Connection.connect(Connection.java:172)
at org.sonarsource.scanner.api.internal.shaded.okhttp.Connection.connectAndSetOwner(Connection.java:358)
at org.sonarsource.scanner.api.internal.shaded.okhttp.OkHttpClient$1.connectAndSetOwner(OkHttpClient.java:117)
at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:329)
at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:246)
at org.sonarsource.scanner.api.internal.shaded.okhttp.Call.getResponse(Call.java:276)
at org.sonarsource.scanner.api.internal.shaded.okhttp.Call$ApplicationInterceptorChain.proceed(Call.java:234)
at org.sonarsource.scanner.api.internal.shaded.okhttp.Call.getResponseWithInterceptorChain(Call.java:196)
at org.sonarsource.scanner.api.internal.shaded.okhttp.Call.execute(Call.java:79)
at org.sonarsource.scanner.api.internal.ServerConnection.callUrl(ServerConnection.java:114)
at org.sonarsource.scanner.api.internal.ServerConnection.downloadString(ServerConnection.java:99)
at org.sonarsource.scanner.api.internal.Jars.downloadFiles(Jars.java:78)
... 11 more
ERROR:
ERROR: Re-run SonarQube Scanner using the -X switch to enable full debug logging.
Build step 'Execute SonarQube Scanner' marked build as failure
Finished: FAILURE
I don't know at all what's going wrong here.
What I did :
I have registered a server key in the "user=>token=>generate a token for user" in sonarqube and use it inside of my jenkins app
This error means that your Jenkins server can't access your sonar server. Maybe the IP or domain is set wrong. Maybe the networking between them isn't set up correctly.
Somewhere in your Jenkins console log you should see something like this:
Injecting SonarQube environment variables using the configuration: Sonarqube Local
[workspace] $ mvn sonar:sonar -Dsonar.host.url=http://sonar.yourserver.com -Dsonar.login=******
Make sure that this sonar.host.url is set correctly. Then make sure you can access this from your jenkins server.

Error while running sonar-scanner and sonar server on diffrent machine

I have installed sonarqube server on the windows machine. It is working for the .net/php projects successfully with sonar-scanner(sonar-scanner on same machine).
But for the iOS project, I am using the free plugin for objective C. For this I am using the MAC machine and trying to run sonar-scanner from mac, I also configured the server host url in sonar-runner.properties.
The version details are as below:
Searver: sonarqube-5.4
Objective-c version: sonar-objective-c-plugin-0.4.0
xcode: 6 and latest xctool
OCLint latest version
I am getting following error.
ERROR: Error during SonarQube Scanner execution
java.lang.IllegalStateException: Unable to register extension org.sonar.plugins.objectivec.core.ObjectiveCSourceImporter
at org.sonar.core.platform.ComponentContainer.addExtension(ComponentContainer.java:241)
at org.sonar.batch.bootstrap.ExtensionInstaller.doInstall(ExtensionInstaller.java:68)
at org.sonar.batch.bootstrap.ExtensionInstaller.install(ExtensionInstaller.java:49)
at org.sonar.batch.scan.ModuleScanContainer.addExtensions(ModuleScanContainer.java:172)
at org.sonar.batch.scan.ModuleScanContainer.doBeforeStart(ModuleScanContainer.java:92)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:133)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:120)
at org.sonar.batch.scan.ProjectScanContainer.scan(ProjectScanContainer.java:264)
at org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:259)
at org.sonar.batch.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:249)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:135)
at org.sonar.batch.scan.ProjectScanContainer.startComponents(ProjectScanContainer.java:127)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:120)
at org.sonar.batch.task.ScanTask.execute(ScanTask.java:55)
at org.sonar.batch.task.TaskContainer.doAfterStart(TaskContainer.java:86)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:135)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:120)
at org.sonar.batch.bootstrap.GlobalContainer.executeTask(GlobalContainer.java:122)
at org.sonar.batch.bootstrapper.Batch.executeTask(Batch.java:119)
at org.sonar.runner.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:67)
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:483)
at org.sonar.runner.impl.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:61)
at com.sun.proxy.$Proxy0.execute(Unknown Source)
at org.sonar.runner.api.EmbeddedRunner.doExecute(EmbeddedRunner.java:274)
at org.sonar.runner.api.EmbeddedRunner.runAnalysis(EmbeddedRunner.java:165)
at org.sonar.runner.api.EmbeddedRunner.runAnalysis(EmbeddedRunner.java:152)
at org.sonarsource.scanner.cli.Main.runAnalysis(Main.java:118)
at org.sonarsource.scanner.cli.Main.execute(Main.java:80)
at org.sonarsource.scanner.cli.Main.main(Main.java:66)
Caused by: java.lang.NoClassDefFoundError: org/sonar/api/resources/ProjectFileSystem
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2693)
at java.lang.Class.getDeclaredMethods(Class.java:1967)
at org.picocontainer.injectors.AdaptingInjection$1.run(AdaptingInjection.java:203)
at java.security.AccessController.doPrivileged(Native Method)
at org.picocontainer.injectors.AdaptingInjection.injectionMethodAnnotated(AdaptingInjection.java:200)
at org.picocontainer.injectors.AdaptingInjection.methodAnnotatedInjectionAdapter(AdaptingInjection.java:171)
at org.picocontainer.injectors.AdaptingInjection.createComponentAdapter(AdaptingInjection.java:70)
at org.picocontainer.behaviors.AbstractBehaviorFactory.createComponentAdapter(AbstractBehaviorFactory.java:44)
at org.picocontainer.behaviors.OptInCaching.createComponentAdapter(OptInCaching.java:45)
at org.picocontainer.DefaultPicoContainer.addComponent(DefaultPicoContainer.java:536)
at org.picocontainer.DefaultPicoContainer.access$300(DefaultPicoContainer.java:84)
at org.picocontainer.DefaultPicoContainer$AsPropertiesPicoContainer.addComponent(DefaultPicoContainer.java:1149)
at org.sonar.core.platform.ComponentContainer.addExtension(ComponentContainer.java:239)
... 31 more
Caused by: java.lang.ClassNotFoundException: org.sonar.api.resources.ProjectFileSystem
at org.sonar.classloader.ParentFirstStrategy.loadClass(ParentFirstStrategy.java:39)
at org.sonar.classloader.ClassRealm.loadClass(ClassRealm.java:87)
at org.sonar.classloader.ClassRealm.loadClass(ClassRealm.java:76)
... 45 more
ERROR:
ERROR: Re-run SonarQube Scanner using the -X switch to enable full debug logging.
+ returnValue=1
+ set +x
sonar-objective-c-plugin 0.4.0 is not compatible with SonarQube 5.3+.
There is a ticket at plugin tracking issue system: java.lang.NoClassDefFoundError: org/sonar/api/resources/ProjectFileSystem
Authors prepared a snapshot which should solve this problem: https://drive.google.com/file/d/0B8TMhTccVIJ-d1lvN3dxb1M4a3c/view

Failed to install MStest plugin : Jenkins

I try to install the MSTest for showing the results from .trx file.
As I install through Download Now and Install after Restart, My Jenkins is taking so long time to restart so I tried with Install without restart.
It shows the following error
enter code here
Emma plugin
Failure -
java.io.IOException: Failed to dynamically deploy this plugin
at hudson.model.UpdateCenter$InstallationJob._run(UpdateCenter.java:1317)
at hudson.model.UpdateCenter$DownloadJob.run(UpdateCenter.java:1116)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at hudson.remoting.AtmostOneThreadExecutor$Worker.run(AtmostOneThreadExecutor.java:104)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: Failed to install emma plugin
at hudson.PluginManager.dynamicLoad(PluginManager.java:473)
at hudson.model.UpdateCenter$InstallationJob._run(UpdateCenter.java:1313)
... 5 more
Caused by: java.io.IOException: Dependency maven-plugin (1.447) doesn't exist
at hudson.PluginWrapper.resolvePluginDependencies(PluginWrapper.java:480)
at hudson.PluginManager.dynamicLoad(PluginManager.java:463)
... 6 more
MSTest plugin Failure -
java.io.IOException: Failed to dynamically deploy this plugin
at hudson.model.UpdateCenter$InstallationJob._run(UpdateCenter.java:1317)
at hudson.model.UpdateCenter$DownloadJob.run(UpdateCenter.java:1116)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at hudson.remoting.AtmostOneThreadExecutor$Worker.run(AtmostOneThreadExecutor.java:104)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: Failed to install mstest plugin
at hudson.PluginManager.dynamicLoad(PluginManager.java:473)
at hudson.model.UpdateCenter$InstallationJob._run(UpdateCenter.java:1313)
... 5 more
Caused by: java.io.IOException: Dependency emma (1.29) doesn't exist
at hudson.PluginWrapper.resolvePluginDependencies(PluginWrapper.java:480)
at hudson.PluginManager.dynamicLoad(PluginManager.java:463)
... 6 more
It is because MSTest plugin depends on emma and maven-plugin. I suspect you have bad network condition while download these 2 dependencies.
First, try Download Now and Install after Restart but wait for a longer time until it get successfully installed. Jenkins will take care of the dependencies.
Or,
as an alternative, you can first install emma and maven-plugin, then install MSTest then.

Interconnection errors between Jenkins and Artifactory

I recently got an interconnection errors between Jenkins and Artifactory upon deployment of the job, the error re-appears frequently.
I would like to know from where the problem comes, and what’s the cause of the outbreak of the error.
We use the plugin version of Artifactory: Artifactory Plugin : 2.1.8
Stack trace in Jenkins log :
[ERROR] Internal error: java.lang.RuntimeException: Error occurred while publishing Build Info to Artifactory. Failed to send build info: HTTP response code: 403. HTTP response message: Interdit -> [Help 1]
org.apache.maven.InternalErrorException: Internal error: java.lang.RuntimeException: Error occurred while publishing Build Info to Artifactory.
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:168)
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:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
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:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
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$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.RuntimeException: Error occurred while publishing Build Info to Artifactory.
at org.jfrog.build.extractor.maven.BuildDeploymentHelper.deploy(BuildDeploymentHelper.java:87)
at org.jfrog.build.extractor.maven.BuildInfoRecorder.sessionEnded(BuildInfoRecorder.java:132)
at org.apache.maven.lifecycle.internal.DefaultExecutionEventCatapult.fire(DefaultExecutionEventCatapult.java:64)
at org.apache.maven.lifecycle.internal.DefaultExecutionEventCatapult.fire(DefaultExecutionEventCatapult.java:42)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:170)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
... 23 more
Caused by: java.io.IOException: Failed to send build info: HTTP response code: 403. HTTP response message: Interdit
at org.jfrog.build.client.ArtifactoryBuildInfoClient.throwHttpIOException(ArtifactoryBuildInfoClient.java:642)
at org.jfrog.build.client.ArtifactoryBuildInfoClient.sendBuildInfo(ArtifactoryBuildInfoClient.java:240)
at org.jfrog.build.extractor.maven.BuildDeploymentHelper.deploy(BuildDeploymentHelper.java:85)
... 29 more
Firstly, you're using a very old version of the plugin, released in August 2013 — the current newest version was released in April 2015. So you should ideally upgrade and check if you have the same issue.
But as the HTTP status code and message say, you're being forbidden from accessing the server. So most likely you have the wrong credentials, or your account has been blocked, or similar.
Make sure that the correct URL and credentials for the relevant server are entered in the Jenkins system config under Manage Jenkins → Configure System → Artifactory.
For each server configured, there is (since version 2.2.0) a Test Connection button which you can click to verify whether your server credentials are correct.

Error running mvn clean install

using Eclipse to try and build a maven project with Eclipse. Anyway when I try to run mvn clean install I get the following error
Failed to execute goal org.jboss.ws.plugins:maven-jaxws-tools-plugin:1.0.1.GA:wsconsume (default) on project sso: Error while running wsconsume: Process terminated with code 1
Its calling a MojoExecutionException.
Anyway I am getting the code from a subversion repository which works for others so its not the pom file. I done some googling and it mentions it could be the JBoss version I have running which could be causing the issue. I am using JBoss6.1.0. Also using Maven 3.0.4
Anyone have any ideas? If you need more info just let me know. Thanks.
EDIT: Full stack trace
[ERROR] Failed to execute goal org.jboss.ws.plugins:maven-jaxws-tools-plugin:1.0.1.GA:wsconsume (default) on project sso: Error while running wsconsume: Process terminated with code 1 -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.jboss.ws.plugins:maven-jaxws-tools-plugin:1.0.1.GA:wsconsume (default) on project sso: Error while running wsconsume
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:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
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 while running wsconsume
at org.jboss.ws.plugins.tools.AbstractWsConsumeMojo.execute(AbstractWsConsumeMojo.java:157)
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.lang.Exception: Process terminated with code 1
at org.jboss.ws.plugins.tools.WSContractDelegate.runConsumerOutOfProcess(WSContractDelegate.java:133)
at org.jboss.ws.plugins.tools.WSContractDelegate.runConsumer(WSContractDelegate.java:99)
at org.jboss.ws.plugins.tools.AbstractWsConsumeMojo.execute(AbstractWsConsumeMojo.java:149)
... 21 more
Well figured it out anyway. Turns out it was a windows limitation with file names. The file path was too long. As such once I moved it to a folder just below root, eg. C:/folder_here then it worked. Also switched to JDK 1.7 because another problem with windows means that if you use 1.6 you need to download another couple of jars. Anyway hope this helps someone else out.

Resources