运行 Maven 的 Jersey 示例

Running Jersey examples with Maven

鉴于在本地克隆的回购 https://github.com/jersey/jersey

您需要构建什么 maven 命令和 运行 /examples 中的演示?

我的假设是您应该能够克隆存储库并让所有示例正常工作,而无需更改任何 *.pom 文件中的任何内容。那是对的吗?

是的,您不需要编辑任何内容。请按照以下步骤操作:

  1. git clone git@github.com:jersey/jersey.git
  2. cd jersey
  3. mvn clean install -DskipTests
  4. cd examples/helloworld-webapp/
  5. mvn clean compile exec:java
  6. 打开:http://localhost:8080/helloworld-webapp/helloworld

如果您不喜欢构建不稳定的尖端技术,您可以查看发布标签:

1.1(在克隆之后,或稍后在父目录中):git checkout tags/2.22.2

其他步骤相同