跳闸战争仅使用命令行 [英] Jetty Run War Using only command line
本文介绍了跳闸战争仅使用命令行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否可以仅使用命令行运行仅包含指定war
文件和上下文路径的jetty
.
Is it possible to use only the command line to Run jetty
with only a specified war
file and Context Path.
类似的东西:
java -jar $jettyHome/start.jar -Dwar.location=myApp.war -DcontextPath=/myApp OPTIONS=default,plus,jsp
推荐答案
使用码头赛跑者.
java -jar jetty-runner.jar my.war
使用Maven,您可以通过添加到pom.xml
来进行安装:
With Maven, you can install by adding to your pom.xml
:
<build>
...
<plugins>
...
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.3</version>
<executions>
<execution>
<phase>package</phase>
<goals><goal>copy</goal></goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty-runner</artifactId>
<version>7.5.4.v20111024</version>
<destFileName>jetty-runner.jar</destFileName>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
运行:
mvn package
并用作:
java -jar target/dependency/jetty-runner.jar target/*.war
http://www.eclipse.org/jetty/documentation/current/Runner.html
http://central.maven.org/maven2/org /eclipse/jetty/jetty-runner/
这篇关于跳闸战争仅使用命令行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文