Experiencing trouble with NPM/Karma and Cloudbees - maven

I have the following pre-build script:
# install nodejs, if using cloudbees
curl -s -o use-node https://repository-cloudbees.forge.cloudbees.com/distributions/ci-addons/node/use-node
NODE_VERSION=0.11.1 source ./use-node
# install phantomjs, karma
npm cache clean
[ -d node_modules/phantomjs ] || npm install -g phantomjs
[ -d node_modules/karma ] || npm install -g karma
[ -d node_modules/karma-junit-reporter ] || npm install -g karma-junit-reporter
[ -d node_modules/karma-phantomjs-launcher ] || npm install -g karma-phantomjs-launcher
test -d $HOME/bin || mkdir $HOME/bin
test -L $HOME/bin/karma || ln -s /scratch/jenkins/addons/node/$node_name/bin/karma $HOME/bin/karma
test -L $HOME/bin/node || ln -s /scratch/jenkins/addons/node/$node_name/bin/node $HOME/bin/node
The above script fails with the following error message:
Started by user Balteo Balteo
Building remotely on s-b13180e5 in workspace /scratch/jenkins/workspace/bignibou-unit
Checkout:bignibou-unit / /scratch/jenkins/workspace/bignibou-unit - hudson.remoting.Channel#e764b98:s-b13180e5
Using strategy: Default
Last Built Revision: Revision 66fc46cd3b57973b88969981cd25872b36fbd3db (origin/HEAD, origin/master)
Fetching changes from 1 remote Git repository
Fetching upstream changes from origin
Seen branch in repository origin/HEAD
Seen branch in repository origin/master
Seen 2 remote branches
Commencing build of Revision 66fc46cd3b57973b88969981cd25872b36fbd3db (origin/HEAD, origin/master)
Checking out Revision 66fc46cd3b57973b88969981cd25872b36fbd3db (origin/HEAD, origin/master)
Warning : There are multiple branch changesets here
[bignibou-unit] $ /bin/sh -xe /tmp/hudson5627362406349041774.sh
+ curl -s -o use-node https://repository-cloudbees.forge.cloudbees.com/distributions/ci-addons/node/use-node
+ NODE_VERSION=0.11.1
+ source ./use-node
++ [[ -z 0.11.1 ]]
++ set -e
++ mkdir -p /scratch/jenkins/addons/node
+++ uname -m
++ ARCH=x86_64
++ node_name=node-0.11.1-x86_64
++ test -f /scratch/jenkins/addons/node/node-0.11.1-x86_64.tar.bz2
++ test -f /scratch/jenkins/addons/node/node-0.11.1-x86_64/bin/node
++ export PATH=/scratch/jenkins/addons/node/node-0.11.1-x86_64/bin:/opt/maven/latest/bin:/opt/jdk/jdk1.7.latest/bin:/opt/jdk/jdk1.7.latest/bin:/opt/jdk/latest/bin:/usr/lib64/qt-3.3/bin:/usr/lib64/ccache:/usr/local/bin:/usr/bin:/opt/maven/latest/bin:/opt/ant/latest/bin:/opt/android/android-sdk-linux/tools:/opt/gradle/latest/bin:/home/jenkins/bin:/opt/jdk/jdk.latest/bin
++ PATH=/scratch/jenkins/addons/node/node-0.11.1-x86_64/bin:/opt/maven/latest/bin:/opt/jdk/jdk1.7.latest/bin:/opt/jdk/jdk1.7.latest/bin:/opt/jdk/latest/bin:/usr/lib64/qt-3.3/bin:/usr/lib64/ccache:/usr/local/bin:/usr/bin:/opt/maven/latest/bin:/opt/ant/latest/bin:/opt/android/android-sdk-linux/tools:/opt/gradle/latest/bin:/home/jenkins/bin:/opt/jdk/jdk.latest/bin
+ npm cache clean
+ '[' -d node_modules/phantomjs ']'
+ '[' -d node_modules/karma ']'
+ '[' -d node_modules/karma-junit-reporter ']'
+ '[' -d node_modules/karma-phantomjs-launcher ']'
+ test -d /home/jenkins/bin
+ test -L /home/jenkins/bin/karma
+ test -L /home/jenkins/bin/node
Parsing POMs
[bignibou-unit] $ /opt/jdk/jdk1.7.latest/bin/java -cp /scratch/jenkins/maven3-agent.jar:/opt/maven/latest/boot/plexus-classworlds-2.4.jar org.jvnet.hudson.maven3.agent.Maven3Main /opt/maven/latest /scratch/jenkins/slave.jar /scratch/jenkins/maven3-interceptor.jar /scratch/jenkins/maven3-interceptor-commons.jar 59804
<===[JENKINS REMOTING CAPACITY]===>channel started
log4j:WARN No appenders could be found for logger (org.apache.commons.beanutils.converters.BooleanConverter).
log4j:WARN Please initialize the log4j system properly.
Executing Maven: -B -f /scratch/jenkins/workspace/bignibou-unit/pom.xml test
Nov 22, 2013 5:02:12 PM org.apache.maven.cli.event.ExecutionEventLogger projectDiscoveryStarted
INFO: Scanning for projects...
Nov 22, 2013 5:02:15 PM org.apache.maven.cli.event.ExecutionEventLogger projectStarted
INFO:
Nov 22, 2013 5:02:15 PM org.apache.maven.cli.event.ExecutionEventLogger projectStarted
INFO: ------------------------------------------------------------------------
Nov 22, 2013 5:02:15 PM org.apache.maven.cli.event.ExecutionEventLogger projectStarted
INFO: Building bignibou 0.1.0.BUILD-SNAPSHOT
Nov 22, 2013 5:02:15 PM org.apache.maven.cli.event.ExecutionEventLogger projectStarted
INFO: ------------------------------------------------------------------------
Downloading: https://repository-balteo.forge.cloudbees.com/snapshot/org/springframework/security/spring-security-core/3.2.0.CI-SNAPSHOT/maven-metadata.xml
Downloading: https://repository-balteo.forge.cloudbees.com/snapshot/org/springframework/security/spring-security-config/3.2.0.CI-SNAPSHOT/maven-metadata.xml
Downloading: https://repository-balteo.forge.cloudbees.com/snapshot/org/springframework/security/spring-security-web/3.2.0.CI-SNAPSHOT/maven-metadata.xml
Downloading: https://repository-balteo.forge.cloudbees.com/snapshot/org/springframework/security/spring-security-taglibs/3.2.0.CI-SNAPSHOT/maven-metadata.xml
Downloading: https://repository-balteo.forge.cloudbees.com/snapshot/org/springframework/security/spring-security-acl/3.2.0.CI-SNAPSHOT/maven-metadata.xml
Nov 22, 2013 5:02:28 PM org.apache.maven.cli.event.ExecutionEventLogger mojoStarted
INFO:
Nov 22, 2013 5:02:28 PM org.apache.maven.cli.event.ExecutionEventLogger mojoStarted
INFO: --- apt-maven-plugin:1.0.6:process (default) # bignibou ---
Nov 22, 2013 5:02:55 PM org.apache.maven.cli.event.ExecutionEventLogger mojoStarted
INFO:
Nov 22, 2013 5:02:55 PM org.apache.maven.cli.event.ExecutionEventLogger mojoStarted
INFO: --- aspectj-maven-plugin:1.2:compile (default) # bignibou ---
[WARNING] advice defined in com.bignibou.aop.AdvertisementExistsAndBelongsToMemberCheckAspect has not been applied [Xlint:adviceDidNotMatch]
[WARNING] advice defined in com.bignibou.aop.AdvertisementExistsCheckAspect has not been applied [Xlint:adviceDidNotMatch]
[WARNING] advice defined in org.springframework.mock.staticmock.AnnotationDrivenStaticEntityMockingControl has not been applied [Xlint:adviceDidNotMatch]
[WARNING] advice defined in org.springframework.mock.staticmock.AbstractMethodMockingControl has not been applied [Xlint:adviceDidNotMatch]
[WARNING] advice defined in org.springframework.mock.staticmock.AbstractMethodMockingControl has not been applied [Xlint:adviceDidNotMatch]
[WARNING] advice defined in org.springframework.scheduling.aspectj.AbstractAsyncExecutionAspect has not been applied [Xlint:adviceDidNotMatch]
Nov 22, 2013 5:04:08 PM org.apache.maven.cli.event.ExecutionEventLogger mojoStarted
INFO:
Nov 22, 2013 5:04:08 PM org.apache.maven.cli.event.ExecutionEventLogger mojoStarted
INFO: --- maven-resources-plugin:2.6:resources (default-resources) # bignibou ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 44 resources
Nov 22, 2013 5:04:10 PM org.apache.maven.cli.event.ExecutionEventLogger mojoStarted
INFO:
Nov 22, 2013 5:04:10 PM org.apache.maven.cli.event.ExecutionEventLogger mojoStarted
INFO: --- maven-compiler-plugin:2.5.1:compile (default-compile) # bignibou ---
[INFO] Nothing to compile - all classes are up to date
Nov 22, 2013 5:04:15 PM org.apache.maven.cli.event.ExecutionEventLogger mojoStarted
INFO:
Nov 22, 2013 5:04:15 PM org.apache.maven.cli.event.ExecutionEventLogger mojoStarted
INFO: --- aspectj-maven-plugin:1.2:test-compile (default) # bignibou ---
Nov 22, 2013 5:04:16 PM org.apache.maven.cli.event.ExecutionEventLogger mojoStarted
INFO:
Nov 22, 2013 5:04:16 PM org.apache.maven.cli.event.ExecutionEventLogger mojoStarted
INFO: --- maven-resources-plugin:2.6:testResources (default-testResources) # bignibou ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 9 resources
Nov 22, 2013 5:04:17 PM org.apache.maven.cli.event.ExecutionEventLogger mojoStarted
INFO:
Nov 22, 2013 5:04:17 PM org.apache.maven.cli.event.ExecutionEventLogger mojoStarted
INFO: --- maven-compiler-plugin:2.5.1:testCompile (default-testCompile) # bignibou ---
[INFO] Nothing to compile - all classes are up to date
Nov 22, 2013 5:04:18 PM org.apache.maven.cli.event.ExecutionEventLogger mojoStarted
INFO:
Nov 22, 2013 5:04:18 PM org.apache.maven.cli.event.ExecutionEventLogger mojoStarted
INFO: --- maven-karma-plugin:1.5:start (karma) # bignibou ---
karma start /scratch/jenkins/workspace/bignibou-unit/karma/config/karma.conf.js --browsers PhantomJS --single-run
Nov 22, 2013 5:04:19 PM org.apache.maven.cli.event.ExecutionEventLogger logResult
INFO: ------------------------------------------------------------------------
Nov 22, 2013 5:04:19 PM org.apache.maven.cli.event.ExecutionEventLogger logResult
INFO: BUILD FAILURE
Nov 22, 2013 5:04:19 PM org.apache.maven.cli.event.ExecutionEventLogger logStats
INFO: ------------------------------------------------------------------------
Nov 22, 2013 5:04:19 PM org.apache.maven.cli.event.ExecutionEventLogger logStats
INFO: Total time: 2:06.425s
Nov 22, 2013 5:04:19 PM org.apache.maven.cli.event.ExecutionEventLogger logStats
INFO: Finished at: Fri Nov 22 17:04:19 EST 2013
Nov 22, 2013 5:04:19 PM org.apache.maven.cli.event.ExecutionEventLogger logStats
INFO: Final Memory: 27M/117M
Nov 22, 2013 5:04:19 PM org.apache.maven.cli.event.ExecutionEventLogger sessionEnded
INFO: ------------------------------------------------------------------------
[JENKINS] Archiving /scratch/jenkins/workspace/bignibou-unit/pom.xml to /home/balteo/hudson_home/jobs/bignibou-unit/modules/com.bignibou$bignibou/builds/2013-11-22_22-01-58/archive/com.bignibou/bignibou/0.1.0.BUILD-SNAPSHOT/bignibou-0.1.0.BUILD-SNAPSHOT.pom
Waiting for Jenkins to finish collecting data
mavenExecutionResult exceptions not empty
message : Failed to execute goal com.kelveden:maven-karma-plugin:1.5:start (karma) on project bignibou: There was an error executing Karma.
cause : There was an error executing Karma.
Stack trace :
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.kelveden:maven-karma-plugin:1.5:start (karma) on project bignibou: There was an error executing Karma.
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:129)
at hudson.maven.Maven3Builder.call(Maven3Builder.java:67)
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.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: There was an error executing Karma.
at com.kelveden.karma.StartMojo.createKarmaProcess(StartMojo.java:209)
at com.kelveden.karma.StartMojo.execute(StartMojo.java:133)
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: java.io.IOException: Cannot run program "karma" (in directory "/scratch/jenkins/workspace/bignibou-unit"): error=2, No such file or directory
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1041)
at com.kelveden.karma.StartMojo.createKarmaProcess(StartMojo.java:205)
... 33 more
Caused by: java.io.IOException: error=2, No such file or directory
at java.lang.UNIXProcess.forkAndExec(Native Method)
at java.lang.UNIXProcess.<init>(UNIXProcess.java:135)
at java.lang.ProcessImpl.start(ProcessImpl.java:130)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1022)
... 34 more
channel stopped
[bignibou-unit] $ /bin/sh -xe /tmp/hudson6880094858310082268.sh
Finished: FAILURE

I tried the same thing based on the following blog post and was having the same issue.
http://jespertejlgaard.blogspot.com/2013/09/how-to-execute-your-maven-karma-plugin.html
I ended up discovering that the karma path for the symlink was incorrect.
It should be
test -L $HOME/bin/karma || ln -s /scratch/jenkins/addons/node/$node_name/lib/node_modules/karma/bin/karma $HOME/bin/karma
Also, since that symlink probably already exists, you'll probably want to remove the "test" part on the first execution so that the symlink gets created correctly (might need -sF), then put it back. I did this just in case.

Reading the log I suspect you are running two separate build steps?
If so, then you need to remember that environment variables are not retained between steps.
So your second maven step can't see karma / node etc.
Try combining the two steps.
If you are using the Jenkins Maven plugin, then don't, it causes more problems than it solves.

Related

How to set up swagger-jaxrs-server

I have generated swagger-jaxrs-server from open api code generator using this petstore.yaml from swagger openapi as input . I want to run sever in STS as maven project.
I tried
1) Adding Tomcat7 plugin in porm.xml
2) Maven --> update project
3) Run as --> maven clean
4) Run as --> maven build --> goal:tomcat7:run
But I am getting error as
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------< io.swagger:swagger-jaxrs-server >-------------------
[INFO] Building swagger-jaxrs-server 1.0.0
[INFO] --------------------------------[ war ]---------------------------------
[INFO]
[INFO] >>> tomcat7-maven-plugin:2.2:run (default-cli) > process-classes # swagger-jaxrs-server >>>
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # swagger-jaxrs-server ---
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory D:\Spring\openapi\jaxrs-spec-server-generated\jaxrs-spec-server-generated\src\main\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) # swagger-jaxrs-server ---
[INFO] No sources to compile
[INFO]
[INFO] <<< tomcat7-maven-plugin:2.2:run (default-cli) < process-classes # swagger-jaxrs-server <<<
[INFO]
[INFO]
[INFO] --- tomcat7-maven-plugin:2.2:run (default-cli) # swagger-jaxrs-server ---
[INFO] Running war on http://localhost:8080/swagger-jaxrs-server
[INFO] Creating Tomcat server configuration at D:\Spring\openapi\jaxrs-spec-server-generated\jaxrs-spec-server-generated\target\tomcat
[INFO] create webapp with contextPath: /swagger-jaxrs-server
Jan 23, 2023 12:22:09 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
Jan 23, 2023 12:22:09 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Tomcat
Jan 23, 2023 12:22:09 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.47
Jan 23, 2023 12:22:11 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8080"]

jenkins deploy war/ear to a container - why the .war file is renamed before it is deployed on the remoteserver

I'm new to jenkins and have a problem. I created a maven project (maven integration plugin 2.12.1) in jenkins (ver. 1.638). I got the source-code via git (maven web application).
Everything works fine, but at the end the .war which is moved/deployed via deploy plugin to the remote server has a wrong name.
I dont know why the .war file is renamed before it is deployed on the remoteserver.
It is called services.war instead of services_admin.war.
Screenshot jenkins:
https://i.stack.imgur.com/uc5wK.png
pom.xml:
<groupId>services_admin</groupId>[enter image description here][1]
<artifactId>services_admin</artifactId>
<name>services_admin</name>
<description>services_admin</description>
<build>
<resources>
<resource>
<directory>${basedir}/src/main/resources</directory>
</resource>
<resource>
<directory>${basedir}/src/main/java</directory>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.0.2</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-eclipse-plugin</artifactId>
<version>2.8</version>
<configuration>
<wtpversion>1.5</wtpversion>
<additionalProjectFacets>
<jst.java>6.0</jst.java>
<jst.web>2.5</jst.web>
</additionalProjectFacets>
<additionalBuildcommands>
<buildcommand>org.eclipse.wst.common.project.facet.core.builder</buildcommand>
<buildcommand>org.eclipse.wst.validation.validationbuilder</buildcommand>
<buildcommand>org.springframework.ide.eclipse.core.springbuilder</buildcommand>
</additionalBuildcommands>
<additionalProjectnatures>
<projectnature>org.eclipse.wst.common.project.facet.core.nature</projectnature>
<projectnature>org.eclipse.wst.common.modulecore.ModuleCoreNature</projectnature>
<projectnature>org.springframework.ide.eclipse.core.springnature</projectnature>
</additionalProjectnatures>
</configuration>
</plugin>
</plugins>
<finalName>services_admin</finalName>
</build>
Build log:
[INFO] ------------------------------------------------------------------------
[INFO] Building services_admin 2
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) # services_admin ---
[INFO] Deleting D:\Programme_x64\Jenkins\jobs\Mavenproject - services Admin (Test)\workspace\target
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # services_admin ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 120 resources
[INFO] Copying 307 resources
[INFO]
[INFO] --- maven-compiler-plugin:2.0.2:compile (default-compile) # services_admin ---
[INFO] Compiling 307 source files to D:\Programme_x64\Jenkins\jobs\Mavenproject - services Admin (Test)\workspace\target\classes
[WARNING] D:\Programme_x64\Jenkins\jobs\Mavenproject - services Admin (Test)\workspace\src\main\java\de\...\services\java\util\Cryptographer.java:[34,40] BASE64Encoder is internal proprietary API and may be removed in a future release
[WARNING] D:\Programme_x64\Jenkins\jobs\Mavenproject - services Admin (Test)\workspace\src\main\java\de\...\services\java\util\Cryptographer.java:[59,39] BASE64Decoder is internal proprietary API and may be removed in a future release
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) # services_admin ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 3 resources
[INFO]
[INFO] --- maven-compiler-plugin:2.0.2:testCompile (default-testCompile) # services_admin ---
[INFO] Compiling 48 source files to D:\Programme_x64\Jenkins\jobs\Mavenproject - services Admin (Test)\workspace\target\test-classes
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) # services_admin ---
[INFO] Tests are skipped.
[INFO]
[INFO] --- maven-war-plugin:2.2:war (default-war) # services_admin ---
[INFO] Packaging webapp
[INFO] Assembling webapp [services_admin] in [D:\Programme_x64\Jenkins\jobs\Mavenproject - services Admin (Test)\workspace\target\services_admin]
[INFO] Processing war project
[INFO] Copying webapp resources [D:\Programme_x64\Jenkins\jobs\Mavenproject - services Admin (Test)\workspace\src\main\webapp]
[INFO] Webapp assembled in [2328 msecs]
[INFO] Building war: D:\Programme_x64\Jenkins\jobs\Mavenproject - services Admin (Test)\workspace\target\services_admin.war
[INFO] WEB-INF\web.xml already added, skipping
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 19.360 s
[INFO] Finished at: 2017-01-31T16:00:01+01:00
[INFO] Final Memory: 46M/447M
[INFO] ------------------------------------------------------------------------
Waiting for Jenkins to finish collecting data
[JENKINS] Archiving D:\Programme_x64\Jenkins\jobs\Mavenproject - services Admin (Test)\workspace\pom.xml to services_admin/services_admin/2/services_admin-2.pom
[JENKINS] Archiving D:\Programme_x64\Jenkins\jobs\Mavenproject - services Admin (Test)\workspace\target\services_admin.war to services_admin/services_admin/2/services_admin-2.war
channel stopped
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
Deploying D:\Programme_x64\Jenkins\jobs\Mavenproject - services Admin (Test)\workspace\target\services_admin.war to container Tomcat 7.x Remote
Redeploying [D:\Programme_x64\Jenkins\jobs\Mavenproject - services Admin (Test)\workspace\target\services_admin.war]
Undeploying [D:\Programme_x64\Jenkins\jobs\Mavenproject - services Admin (Test)\workspace\target\services_admin.war]
Deploying [D:\Programme_x64\Jenkins\jobs\Mavenproject - services Admin (Test)\workspace\target\services_admin.war]
Finished: SUCCESS
remoteserver log:
Feb 01, 2017 9:50:09 AM org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager] log
INFORMATION: Manager: list: Listing contexts for virtual host 'localhost'
Feb 01, 2017 9:50:09 AM org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager] log
INFORMATION: Manager: deploy: Deploying web application '/services'
Feb 01, 2017 9:50:09 AM org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager] log
INFORMATION: Manager: Uploading WAR file to D:\Programme_x64\tomcat\...\webapps\services.war
Feb 01, 2017 9:50:15 AM org.apache.catalina.startup.HostConfig deployWAR
INFORMATION: Deploying web application archive D:\Programme_x64\tomcat\...\webapps\services.war
Feb 01, 2017 9:50:15 AM org.apache.tomcat.util.digester.Digester begin
WARNUNG: [SetContextPropertiesRule]{Context} Setting property 'antiJARLocking' to 'true' did not find a matching property.
Feb 01, 2017 9:50:24 AM org.apache.jasper.servlet.TldScanner scanJars
INFORMATION: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
Feb 01, 2017 9:50:25 AM org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/services] log
INFORMATION: No Spring WebApplicationInitializer types detected on classpath
Feb 01, 2017 9:50:25 AM org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/services] log
INFORMATION: Set web app root system property: 'OsWebApp.root' = [D:\Programme_x64\tomcat\...\temp\6-services\]
Feb 01, 2017 9:50:25 AM org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/services] log
INFORMATION: Initializing Spring root WebApplicationContext
Feb 01, 2017 9:50:31 AM com.sun.faces.config.ConfigureListener contextInitialized
INFORMATION: Mojarra 2.1.13 ( 20120907-1514) für Kontext '/services' wird initialisiert.
Feb 01, 2017 9:50:32 AM com.sun.faces.spi.InjectionProviderFactory createInstance
INFORMATION: JSF1048: PostConstruct/PreDestroy-Annotationen vorhanden. Verwaltete Bean-Methoden, die mit diesen Annotationen markiert sind, lassen die entsprechenden Annotationen verarbeiten.
Feb 01, 2017 9:50:33 AM com.sun.faces.config.configprovider.BaseWebConfigResourceProvider getResources
WARNUNG: JSF1067: Ressource /WEB_INF/wickedcharts.taglib.xml, die von der Konfigurationsoption javax.faces.CONFIG_FILES angegeben wird, kann nicht gefunden werden. Die Ressource wird ignoriert.
Feb 01, 2017 9:50:33 AM org.primefaces.webapp.PostConstructApplicationEventListener processEvent
INFORMATION: Running on PrimeFaces 5.3
Feb 01, 2017 9:50:33 AM org.apache.catalina.startup.HostConfig deployWAR
INFORMATION: Deployment of web application archive D:\Programme_x64\tomcat\...\webapps\services.war has finished in 17,323 ms
i dont use the "deploy plugin - deploy war/ear to a container" for this project. Instead of that im using now "Send files to a windows share - CIFS Publishers".
The problem with the "deploy plugin - deploy war/ear to a container" i could solve :(.
Anyway thx for ur help :).
Best regards

What's cause of below Maven exception occuring in Jenkins Build?

What's cause of below Maven exception occuring in Jenkins Build?
It was working initially for versio 3.0.2 - someone accidentally replaced 3.2.3 - we started seeing this error.
3.0.2 was reinstated
Used commands mvn -U clean install
Doesnt seem to work.. any pointers appreciated.
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.6.1/maven-clean-plugin-2.6.1.pom
Mar 25, 2015 3:17:44 PM org.apache.maven.wagon.providers.http.httpclient.impl.execchain.RetryExec execute
INFO: I/O exception (java.net.SocketException) caught when processing request: java.lang.ClassNotFoundException: Cannot find the specified class com.ibm.websphere.ssl.protocol.SSLSocketFactory
Mar 25, 2015 3:17:44 PM org.apache.maven.wagon.providers.http.httpclient.impl.execchain.RetryExec execute
INFO: Retrying request
Mar 25, 2015 3:17:44 PM org.apache.maven.wagon.providers.http.httpclient.impl.execchain.RetryExec execute
INFO: I/O exception (java.net.SocketException) caught when processing request: java.lang.ClassNotFoundException: Cannot find the specified class com.ibm.websphere.ssl.protocol.SSLSocketFactory
Mar 25, 2015 3:17:44 PM org.apache.maven.wagon.providers.http.httpclient.impl.execchain.RetryExec execute
INFO: Retrying request
Mar 25, 2015 3:17:44 PM org.apache.maven.wagon.providers.http.httpclient.impl.execchain.RetryExec execute
INFO: I/O exception (java.net.SocketException) caught when processing request: java.lang.ClassNotFoundException: Cannot find the specified class com.ibm.websphere.ssl.protocol.SSLSocketFactory
Mar 25, 2015 3:17:44 PM org.apache.maven.wagon.providers.http.httpclient.impl.execchain.RetryExec execute
INFO: Retrying request
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.526 s
[INFO] Finished at: 2015-03-25T15:17:44-04:00
[INFO] Final Memory: 4M/11M
[INFO] ------------------------------------------------------------------------
[ERROR] Plugin org.apache.maven.plugins:maven-clean-plugin:2.6.1 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-clean-plugin:jar:2.6.1: Could not transfer artifact org.apache.maven.plugins:maven-clean-plugin:pom:2.6.1 from/to central (https://repo.maven.apache.org/maven2): java.lang.ClassNotFoundException: Cannot find the specified class com.ibm.websphere.ssl.protocol.SSLSocketFactory -> [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/PluginResolutionException
SOE Failed. ( goto :FailResult )
Checking whether SOE.war is built successfully and available.
"Building BatchFeed in Dev Environment...."
The Command: D:\apache-maven-3.0.4\bin\mvn.bat -U clean install
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building feed 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-surefire-plugin/2.12.4/maven-surefire-plugin-2.12.4.pom
Mar 25, 2015 3:17:48 PM org.apache.maven.wagon.providers.http.httpclient.impl.execchain.RetryExec execute
INFO: I/O exception (java.net.SocketException) caught when processing request: java.lang.ClassNotFoundException: Cannot find the specified class com.ibm.websphere.ssl.protocol.SSLSocketFactory
Mar 25, 2015 3:17:48 PM org.apache.maven.wagon.providers.http.httpclient.impl.execchain.RetryExec execute
INFO: Retrying request
Mar 25, 2015 3:17:48 PM org.apache.maven.wagon.providers.http.httpclient.impl.execchain.RetryExec execute
INFO: I/O exception (java.net.SocketException) caught when processing request: java.lang.ClassNotFoundException: Cannot find the specified class com.ibm.websphere.ssl.protocol.SSLSocketFactory
Mar 25, 2015 3:17:48 PM org.apache.maven.wagon.providers.http.httpclient.impl.execchain.RetryExec execute
INFO: Retrying request
Mar 25, 2015 3:17:48 PM org.apache.maven.wagon.providers.http.httpclient.impl.execchain.RetryExec execute
INFO: I/O exception (java.net.SocketException) caught when processing request: java.lang.ClassNotFoundException: Cannot find the specified class com.ibm.websphere.ssl.protocol.SSLSocketFactory
Mar 25, 2015 3:17:48 PM org.apache.maven.wagon.providers.http.httpclient.impl.execchain.RetryExec execute
INFO: Retrying request
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.034 s
[INFO] Finished at: 2015-03-25T15:17:48-04:00
[INFO] Final Memory: 5M/11M
[INFO] ------------------------------------------------------------------------
[ERROR] Plugin org.apache.maven.plugins:maven-surefire-plugin:2.12.4 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-surefire-plugin:jar:2.12.4: Could not transfer artifact org.apache.maven.plugins:maven-surefire-plugin:pom:2.12.4 from/to central (https://repo.maven.apache.org/maven2): java.lang.ClassNotFoundException: Cannot find the specified class com.ibm.websphere.ssl.protocol.SSLSocketFactory -> [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/PluginResolutionException
The error message looks like a network problem (proxy/firewall) whatever as Manfred already mentioned. May be you have wrongly configured your repositories (settings.xml) (you don't seemed to be using a repository manager).
could not be resolved: Failed to read artifact descriptor for
org.apache.maven.plugins:maven-clean-plugin:jar:2.6.1: Could not
transfer artifact
org.apache.maven.plugins:maven-clean-plugin:pom:2.6.1 from/to central
(https://repo.maven.apache.org/maven2):
java.lang.ClassNotFoundException: Cannot find the specified class
com.ibm.websphere.ssl.protocol.SSLSocketFactory -> [Help 1]
I can also recommend to upgrade to at least 3.0.5 to be on a stable version better to higher versions.
Adding to what other says about network issue which could be the problem here.
I see I/O exception here.
INFO: I/O exception
Please check your disk as well if it is full or having some problem or permission issue.

Why can't I shutdown tomcat 7 embedded from maven plugin?

I'm using tomcat7-maven-plugin 2.2 to run a webapp from command line (I'm on Windows 8.1, Java 1.7.0_51 and Maven 3.2.1).
This is the configuration (pretty straightforward, I guess):
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.2</version>
<configuration>
<address>localhost</address>
<port>8080</port>
<path>/</path>
<uriEncoding>UTF-8</uriEncoding>
</configuration>
</plugin>
I run Maven with mvn tomcat7:run and it starts correctly, the server starts up, the webapp loads, and I can interact with it.
The command prompt in which I run Maven is busy showing Tomcat output (this looks fine to me):
[INFO] Scanning for projects...
[INFO]
[INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder with a thread count of 1
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building <project-name-here> 0.3
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> tomcat7-maven-plugin:2.2:run (default-cli) # <project-name-here> >>>
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # <project-name-here> ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 25 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) # <project-name-here> ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] <<< tomcat7-maven-plugin:2.2:run (default-cli) # <project-name-here> <<<
[INFO]
[INFO] --- tomcat7-maven-plugin:2.2:run (default-cli) # <project-name-here> ---
[INFO] Running war on http://localhost:8080/
[INFO] Using existing Tomcat server configuration at c:\workspace\<project-name-here>\target\tomcat
[INFO] create webapp with contextPath:
apr 01, 2014 10:39:50 AM org.apache.coyote.AbstractProtocol init
Informazioni: Initializing ProtocolHandler ["http-bio-127.0.0.1-8080"]
apr 01, 2014 10:39:50 AM org.apache.catalina.core.StandardService startInternal
Informazioni: Starting service Tomcat
apr 01, 2014 10:39:50 AM org.apache.catalina.core.StandardEngine startInternal
Informazioni: Starting Servlet Engine: Apache Tomcat/7.0.47
apr 01, 2014 10:39:52 AM org.apache.coyote.AbstractProtocol start
Informazioni: Starting ProtocolHandler ["http-bio-127.0.0.1-8080"]
Then, I want to shutdown the server: I run mvn tomcat7:shutdown from a separate command prompt, but all I get is this:
[INFO] Scanning for projects...
[INFO]
[INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder with a thread count of 1
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building <project-name-here> 0.3
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- tomcat7-maven-plugin:2.2:shutdown (default-cli) # <project-name-here> ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.083 s
[INFO] Finished at: 2014-04-01T10:39:59+01:00
[INFO] Final Memory: 9M/154M
[INFO] ------------------------------------------------------------------------
"cmd" non è riconosciuto come comando interno o esterno,
un programma eseguibile o un file batch.
That last line reads:
"cmd" is not a recognized internal or external command, an executable
or a batch file.
I can stop Tomcat from the first command prompt hitting Ctrl+C, but since I need to pass all this others, I'd like to offer them a script to start the webapp and a script to stop it.
What's wrong? Is it a plugin error? Is it a configuration error on my side?
EDIT
If I add <fork>true</fork> to the POM, the server crashes with this error:
[...]
Informazioni: Starting service Tomcat
apr 03, 2014 2:05:29 PM org.apache.catalina.core.StandardEngine startInternal
Informazioni: Starting Servlet Engine: Apache Tomcat/7.0.47
apr 03, 2014 2:05:31 PM org.apache.coyote.AbstractProtocol start
Informazioni: Starting ProtocolHandler ["http-bio-127.0.0.1-8080"]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.711 s
[INFO] Finished at: 2014-04-03T14:05:31+01:00
[INFO] Final Memory: 26M/368M
[INFO] ------------------------------------------------------------------------
ERROR: IllegalAccessException for stop method in class org.apache.tomcat.maven.plugin.tomcat7.run.ExtendedTomcat
java.lang.reflect.InvocationTargetException
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.apache.tomcat.maven.common.run.EmbeddedRegistry.shutdownAll(EmbeddedRegistry.java:110)
at org.apache.tomcat.maven.common.run.EmbeddedRegistry$1.run(EmbeddedRegistry.java:69)
Caused by: org.apache.catalina.LifecycleException: Failed to stop component [StandardServer[-1]]
at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:236)
at org.apache.catalina.startup.Tomcat.stop(Tomcat.java:351)
... 6 more
Caused by: org.apache.catalina.LifecycleException: Failed to stop component [StandardService[Tomcat]]
at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:236)
at org.apache.catalina.core.StandardServer.stopInternal(StandardServer.java:753)
at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232)
... 7 more
Caused by: org.apache.catalina.LifecycleException: Failed to stop component [StandardEngine[Tomcat]]
at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:236)
at org.apache.catalina.core.StandardService.stopInternal(StandardService.java:502)
at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232)
... 9 more
Caused by: java.lang.NoClassDefFoundError: org/apache/catalina/core/ContainerBase$StopChild
at org.apache.catalina.core.ContainerBase.stopInternal(ContainerBase.java:1173)
at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232)
... 11 more
Caused by: java.lang.ClassNotFoundException: org.apache.catalina.core.ContainerBase$StopChild
at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:259)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:235)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:227)
... 13 more
As far as I know you need to use Ctrl + c after starting Tomcat server with mvn tomcat7:run to shut it down as it's attached to the current Maven run.
The shutdown goal is used to be called after e.g. performing some tests (integration tests) to finish all the job in a clean way.
have a look at the fork option http://tomcat.apache.org/maven-plugin-2.2/tomcat7-maven-plugin/run-mojo.html#fork
So with this option you are able to start embeded tomcat run some tests then shutdown.
HTH
An alternative is if the Tomcat maven plugin had a way to enable the shutdown port (default 8005) then you can just send the default shutdown string (default "shutdown") to shut it down.
Using a JMX client, the shutdown port is set to -1 when I run the plugin run goal.

Installing karma to cloudbees

I am trying to install karma to cloudbees/jenkins. I have added this script to pre-build:
# install nodejs, if using cloudbees
curl -s -o use-node https://repository-cloudbees.forge.cloudbees.com/distributions/ci-addons/node/use-node
NODE_VERSION=0.11.1 source ./use-node
# install phantomjs, karma
[ -d node_modules/phantomjs ] || npm install -g phantomjs
[ -d node_modules/karma ] || npm install -g karma
[ -d node_modules/karma-junit-reporter ] || npm install -g karma-junit-reporter
[ -d node_modules/karma-phantomjs-launcher ] || npm install -g karma-phantomjs-launcher
I am not sure what the [ command here ] || syntax means in bash. Can anyone please advise?
Here is the output from jenkins:
Started by user Balteo Balteo
Building remotely on s-50416de2 in workspace /scratch/jenkins/workspace/bignibou-unit
Checkout:bignibou-unit / /scratch/jenkins/workspace/bignibou-unit - hudson.remoting.Channel#24db3ed2:s-50416de2
Using strategy: Default
Last Built Revision: Revision 23e130fd7cb2df6a759a35d8085dd6a648efd142 (origin/master, origin/HEAD)
Fetching changes from 1 remote Git repository
Fetching upstream changes from origin
Seen branch in repository origin/HEAD
Seen branch in repository origin/master
Seen 2 remote branches
Commencing build of Revision 23e130fd7cb2df6a759a35d8085dd6a648efd142 (origin/master, origin/HEAD)
Checking out Revision 23e130fd7cb2df6a759a35d8085dd6a648efd142 (origin/master, origin/HEAD)
Warning : There are multiple branch changesets here
[bignibou-unit] $ /bin/sh -xe /tmp/hudson6754458045759014477.sh
+ curl -s -o use-node https://repository-cloudbees.forge.cloudbees.com/distributions/ci-addons/node/use-node
+ NODE_VERSION=0.11.1
+ source ./use-node
++ [[ -z 0.11.1 ]]
++ set -e
++ mkdir -p /scratch/jenkins/addons/node
+++ uname -m
++ ARCH=x86_64
++ node_name=node-0.11.1-x86_64
++ test -f /scratch/jenkins/addons/node/node-0.11.1-x86_64.tar.bz2
++ test -f /scratch/jenkins/addons/node/node-0.11.1-x86_64/bin/node
++ export PATH=/scratch/jenkins/addons/node/node-0.11.1-x86_64/bin:/opt/maven/latest/bin:/opt/jdk/jdk1.7.latest/bin:/opt/jdk/jdk1.7.latest/bin:/opt/jdk/latest/bin:/usr/lib64/qt-3.3/bin:/usr/lib64/ccache:/usr/local/bin:/usr/bin:/opt/maven/latest/bin:/opt/ant/latest/bin:/opt/android/android-sdk-linux/tools:/opt/gradle/latest/bin:/home/jenkins/bin:/opt/jdk/jdk.latest/bin
++ PATH=/scratch/jenkins/addons/node/node-0.11.1-x86_64/bin:/opt/maven/latest/bin:/opt/jdk/jdk1.7.latest/bin:/opt/jdk/jdk1.7.latest/bin:/opt/jdk/latest/bin:/usr/lib64/qt-3.3/bin:/usr/lib64/ccache:/usr/local/bin:/usr/bin:/opt/maven/latest/bin:/opt/ant/latest/bin:/opt/android/android-sdk-linux/tools:/opt/gradle/latest/bin:/home/jenkins/bin:/opt/jdk/jdk.latest/bin
+ '[' -d node_modules/phantomjs ']'
+ '[' -d node_modules/karma ']'
+ '[' -d node_modules/karma-junit-reporter ']'
+ npm install -g karma-junit-reporter
npm http GET https://registry.npmjs.org/karma-junit-reporter
npm http 304 https://registry.npmjs.org/karma-junit-reporter
npm http GET https://registry.npmjs.org/xmlbuilder/0.4.2
npm http 304 https://registry.npmjs.org/xmlbuilder/0.4.2
karma-junit-reporter#0.1.0 /scratch/jenkins/addons/node/node-0.11.1-x86_64/lib/node_modules/karma-junit-reporter
└── xmlbuilder#0.4.2
+ '[' -d node_modules/karma-phantomjs-launcher ']'
Parsing POMs
[bignibou-unit] $ /opt/jdk/jdk1.7.latest/bin/java -cp /scratch/jenkins/maven3-agent.jar:/opt/maven/latest/boot/plexus-classworlds-2.4.jar org.jvnet.hudson.maven3.agent.Maven3Main /opt/maven/latest /scratch/jenkins/slave.jar /scratch/jenkins/maven3-interceptor.jar 47241
<===[JENKINS REMOTING CAPACITY]===>channel started
log4j:WARN No appenders could be found for logger (org.apache.commons.beanutils.converters.BooleanConverter).
log4j:WARN Please initialize the log4j system properly.
Executing Maven: -B -f /scratch/jenkins/workspace/bignibou-unit/pom.xml test
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building bignibou 0.1.0.BUILD-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- apt-maven-plugin:1.0.6:process (default) # bignibou ---
[INFO]
[INFO] --- aspectj-maven-plugin:1.2:compile (default) # bignibou ---
[WARNING] advice defined in com.bignibou.aop.AdvertisementExistsAndBelongsToMemberCheckAspect has not been applied [Xlint:adviceDidNotMatch]
[WARNING] advice defined in com.bignibou.aop.AdvertisementExistsCheckAspect has not been applied [Xlint:adviceDidNotMatch]
[WARNING] advice defined in org.springframework.orm.jpa.aspectj.JpaExceptionTranslatorAspect has not been applied [Xlint:adviceDidNotMatch]
[WARNING] advice defined in org.springframework.mock.staticmock.AnnotationDrivenStaticEntityMockingControl has not been applied [Xlint:adviceDidNotMatch]
[WARNING] advice defined in org.springframework.mock.staticmock.AbstractMethodMockingControl has not been applied [Xlint:adviceDidNotMatch]
[WARNING] advice defined in org.springframework.mock.staticmock.AbstractMethodMockingControl has not been applied [Xlint:adviceDidNotMatch]
[WARNING] advice defined in org.springframework.scheduling.aspectj.AbstractAsyncExecutionAspect has not been applied [Xlint:adviceDidNotMatch]
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # bignibou ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 44 resources
[INFO]
[INFO] --- maven-compiler-plugin:2.5.1:compile (default-compile) # bignibou ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- aspectj-maven-plugin:1.2:test-compile (default) # bignibou ---
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) # bignibou ---[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 9 resources
[INFO]
[INFO] --- maven-compiler-plugin:2.5.1:testCompile (default-testCompile) # bignibou ---
[INFO] Compiling 7 source files to /scratch/jenkins/workspace/bignibou-unit/target/test-classes
[INFO]
[INFO] --- maven-karma-plugin:1.3:start (karma) # bignibou ---
karma start /scratch/jenkins/workspace/bignibou-unit/karma/config/karma.conf.js --browsers PhantomJS --single-run
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1:51.674s
[INFO] Finished at: Sat Oct 26 13:19:31 EDT 2013
[INFO] Final Memory: 35M/124M
[INFO] ------------------------------------------------------------------------
[JENKINS] Archiving /scratch/jenkins/workspace/bignibou-unit/pom.xml to /home/balteo/hudson_home/jobs/bignibou-unit/modules/com.bignibou$bignibou/builds/2013-10-26_13-17-27/archive/com.bignibou/bignibou/0.1.0.BUILD-SNAPSHOT/bignibou-0.1.0.BUILD-SNAPSHOT.pom
Waiting for Jenkins to finish collecting data
mavenExecutionResult exceptions not empty
message : Failed to execute goal com.kelveden:maven-karma-plugin:1.3:start (karma) on project bignibou: There was an error executing Karma.
cause : There was an error executing Karma.
Stack trace :
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.kelveden:maven-karma-plugin:1.3:start (karma) on project bignibou: There was an error executing Karma.
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: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.apache.maven.plugin.MojoExecutionException: There was an error executing Karma.
at com.kelveden.karma.StartMojo.createKarmaProcess(StartMojo.java:196)
at com.kelveden.karma.StartMojo.execute(StartMojo.java:124)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
... 27 more
Caused by: java.io.IOException: Cannot run program "karma": error=2, No such file or directory
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1041)
at com.kelveden.karma.StartMojo.createKarmaProcess(StartMojo.java:192)
... 30 more
Caused by: java.io.IOException: error=2, No such file or directory
at java.lang.UNIXProcess.forkAndExec(Native Method)
at java.lang.UNIXProcess.<init>(UNIXProcess.java:135)
at java.lang.ProcessImpl.start(ProcessImpl.java:130)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1022)
... 31 more
channel stopped
[bignibou-unit] $ /bin/sh -xe /tmp/hudson7183929021886933853.sh
Finished: FAILURE
Adding the following lines to the bottom of the script sorted the issue:
[ -d $HOME/bin ] || mkdir $HOME/bin
[ -f $HOME/bin/karma ] || ln -s /scratch/jenkins/addons/node/$node_name/bin/karma $HOME/bin/karma
[ -f $HOME/bin/node ] || ln -s /scratch/jenkins/addons/node/$node_name/bin/node $HOME/bin/node

Resources