如何启动从蚂蚁聚集码头服务器JAR? [英] How to start an aggregate jetty-server JAR from Ant?

查看:185
本文介绍了如何启动从蚂蚁聚集码头服务器JAR?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

声明:我的非常的与Java经验少

Disclaimer: I have very little experience with Java.

我们我们的Ant构建时previously使用码头6的封装版本,按需静态内容(JS,CSS,图像,HTML),所以我们可以对一个HTTP托管环境PhantomJS运行单元测试。

We previously used a wrapped version of Jetty 6 for on-demand static content (JS, CSS, images, HTML) during our Ant build so we can run unit tests with PhantomJS against an HTTP-hosted environment.

不过,现在码头上的是8.1.3版本的的我们不再需要的包装(它解决不同的问题现在是没有实际意义),所以我想更新只用码头8.1。 3直接。

However, Jetty is now on version 8.1.3 and we no longer need that wrapping (which solves a different problem which is now moot), so I wanted to update to just using Jetty 8.1.3 directly.

首先,我下载了整个码头分布,这在大规模〜40 MB的重量英寸这个工作从蚂蚁,用start.jar......但我真的不希望是推动那些不必要的JAR文件到处。

First I downloaded the whole Jetty distribution, which weighs in at a massive ~40 MB. This works from Ant, using "start.jar"... but I don't really want to be pushing those unnecessary JARs around everywhere.

于是我下载了汇总码头 - 服务器8.1.3.v20120416.jar(最新)来自的 Maven的回购,的的我似乎无法使用从蚂蚁一样JAR我可以 start.jar,例如: Java的罐子码头 - 服务器8.1.3.v20120416.jar OPTIONS =服务器

So then I downloaded the aggregate "jetty-server-8.1.3.v20120416.jar" (latest) from the Maven repo, BUT I can't seem to use that JAR from Ant like I could with "start.jar", e.g. "java -jar jetty-server-8.1.3.v20120416.jar OPTIONS=Server"

码头文档既贫困又失踪(404的)。唉!

The Jetty documentation is both poor and missing (404's). Ugh!

办这个总码头 - 服务器JAR什么鬼?我应该指向一个特定的类,而不是整个JAR?

What the heck do I do with this aggregate "jetty-server" JAR? Should I be pointing to a particular class instead of the whole JAR?

...

相关问题: Minimum从集码头提供静态内容所需的文件?

推荐答案

您使用它作为码头的嵌入使用的依赖。

You use it as a dependency for an embedded usage of jetty.

http://wiki.eclipse.org/Jetty/Tutorial/Embedding_Jetty

它是不适合于与start.jar用法,即对于针织机制一起适合于与推出码头,类路径不作为广义罐子发射

it is not appropriate for usage with the start.jar, that is a mechanism for knitting together a classpath suitable to launch jetty with, not as a generalized jar launcher.

这篇关于如何启动从蚂蚁聚集码头服务器JAR?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆