Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jenkins war deployment to Tomcat 7

I'm using Jenkins for war deployment to my remote server which uses Tomcat 7. I need my application to be directly installed at dedicated port like this:

http://localhost:8083 

instead of usual:

http://localhost:8080/myCoolApp

To achieve this I deploy my war archive as ROOT directly to 'webapp' Tomcat's directory. Everything works fine, archive is sent and deployed but I get an error from Jenkins: enter image description here

Just to remind - archive is deployed successfully! But as a perfectionist I just can't stand a result like this.

Here is my configuration for Jenkins deployment: enter image description here

Here is Tomcat configuration for my application as a separate service:

  <Service name="Jangel">  

      <Connector port="8083" protocol="HTTP/1.1"  
          connectionTimeout="20000" redirectPort="8443" />  

      <Engine name="Jangel" defaultHost="localhost">  

          <Realm className="org.apache.catalina.realm.UserDatabaseRealm" resourceName="UserDatabase" />  

          <Host name="localhost" appBase="Jangel" unpackWARs="true"  
              autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false">
          </Host>  
      </Engine>  

So the question is - how should I configure correctly Tomcat&Jenkins?

Or how may I avoid/silence this Jenkins error?

like image 1000
Mehdzor Avatar asked Dec 11 '22 09:12

Mehdzor


1 Answers

Try this by replacing the context path in your jenkins deployment by / (slash) instead of writing ROOT.

like image 93
jsjunkie Avatar answered Dec 25 '22 03:12

jsjunkie