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:
我正在使用Jenkins部署到我的远程服务器上,它使用Tomcat 7。我需要我的应用程序直接安装在这样的专用端口:
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:
为了实现这一点,我将war归档文件直接部署到“webapp”Tomcat的目录中。一切正常,存档被发送和部署,但我从Jenkins那里得到一个错误:
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:
以下是我对Jenkins部署的配置:
Here is Tomcat configuration for my application as a separate service:
这里是我的应用程序的Tomcat配置,作为单独的服务:
<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?
所以问题是,我应该如何正确配置Tomcat&Jenkins?
Or how may I avoid/silence this Jenkins error?
或者我该如何避免/沉默这个Jenkins的错误?
1 个解决方案
#1
11
Try this by replacing the context path in your jenkins deployment by / (slash) instead of writing ROOT.
尝试通过替换jenkins部署中的上下文路径来代替写根。
#1
11
Try this by replacing the context path in your jenkins deployment by / (slash) instead of writing ROOT.
尝试通过替换jenkins部署中的上下文路径来代替写根。