3

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

Hohenheim
  • 1,545
  • 1
  • 12
  • 28

1 Answers1

3

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
Community
  • 1
  • 1
Praveen Kumar K S
  • 3,024
  • 1
  • 24
  • 31
  • Thanx for your answer @Kumar , i use Tomcat6 i edited the post, i also tomcat7 but for an another application, and i got the deploy Plugin that's why i can choose `Deploy war/ear to a container` in the `Step post-build` and i also see the link it didn't resolve my problem – Hohenheim Feb 05 '16 at 09:26