Hohenheim
Hohenheim

Reputation: 1635

Fail to deploy WAR in Jenkins

I'm using Jenkins for the first time and I wanna try it in local before deploy in my company.

So I have a app.war generated from eclipse : it's a maven project. I wanna to build it in Jenkins and then deploy it in Tomcat 6.

So I set the "right" configuration I think in Jenkins, but when I have launch the build, I got a successful build in my project but it's not deploying in tomcat .

I'll put my console Output of Jenkins and the configuration

Console Output Jenkins :

enter image description here

Configuration Jenkins

enter image description here

So what's wrong with that ? Thnx

Upvotes: 3

Views: 3407

Answers (1)

Praveen Kumar K S
Praveen Kumar K S

Reputation: 3074

Solution to your question -Edited

  1. You have to select the appropriate container to deploy, from your question it is clear that you should choose Tomcat 7.X as a container.
  2. Please use Jenkins Deploy Plugin which is configured with the following options as seen in the below link. Also this link will be your solution.
  3. Also you can embed the Tomcat Maven Plugin in your pom.xml like below
 <plugin> 
    <groupId>org.apache.tomcat.maven</groupId>
   <artifactId>tomcat7-maven-plugin</artifactId>
    <version>2.2</version> 
        <configuration>
      <url>http://localhost:8080/manager/text</url>
      <server>TomcatServer</server>
        <path>/YourPath</path>
  </configuration> 
</plugin>
  1. Give the goals as clean install tomcat7:deploy -e

Upvotes: 3

Related Questions