0
votes

When I tried to deploy war from Jenkins using I am getting the following exception in Jenkins job log. Does anyone has any idea why this is happening? I am trying to deploy to tomcat 8. I configured deployer plugin using the following:

manager username and password
Tomcat URL: http://hostname:9080/

ERROR: Publisher hudson.plugins.deploy.DeployPublisher aborted due to exception
java.io.IOException: Expecting Ant GLOB pattern, but saw '/var/lib/jenkins/.m2/repository/com/wcm/wcm-admin/1.0/wcm-admin-1.0.war'. See http://ant.apache.org/manual/Types/fileset.html for syntax
    at hudson.FilePath.glob(FilePath.java:1734)
    at hudson.FilePath.access$1700(FilePath.java:191)
    at hudson.FilePath$32.invoke(FilePath.java:1715)
    at hudson.FilePath$32.invoke(FilePath.java:1712)
    at hudson.FilePath.act(FilePath.java:989)
    at hudson.FilePath.act(FilePath.java:967)
    at hudson.FilePath.list(FilePath.java:1712)
    at hudson.FilePath.list(FilePath.java:1697)
    at hudson.FilePath.list(FilePath.java:1683)
    at hudson.plugins.deploy.DeployPublisher.perform(DeployPublisher.java:59)
    at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:45)
    at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:761)
    at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:721)
    at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.post2(MavenModuleSetBuild.java:1037)
    at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:670)
    at hudson.model.Run.execute(Run.java:1743)
    at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:529)
    at hudson.model.ResourceController.execute(ResourceController.java:89)
    at hudson.model.Executor.run(Executor.java:240)
Finished: FAILURE
5

5 Answers

5
votes

I user the full path of war file as the value of "WAR/EAR files". When I set the value as "**/*.war" it worked.

2
votes

the value of "WAR/EAR files" must be relative path of workspace

0
votes

In order for Tomcat to accept remote deployments, you have to add a user with the role manager-script. To do so edit the file ../conf/tomcat-users.xml and add the following line:

..and then add the same user name in Jenkins.

0
votes

The problem you are facing because the path takes GLOBAL pattern See the image **/*.war

This should work.

0
votes

It was expecting the file to be defined like /*.yaml

Don't think to define the whole path for the file in case you encounter this. Just define like above highlighted. This will read from the directory where you have the YAML file.