使用 Maven 构建 Java Web Start 应用程序
我对几乎所有相关事物都很陌生,但想使用 Maven 构建 Java Web Start 应用程序。我还需要重新打包特定的 .jar (commons-httpclient-3.1.jar),否则它不会使用 JarSigner 进行签名(在我用 google 搜索时,这似乎是一个常见问题)。也许我可以使用 这个 Maven插件,但我什至不知道如何设置Maven存储库。
我(可能)需要:
- 设置 Maven 存储库以便能够使用上述插件,
- 使用该插件配置 jnlp 构建,
- 使用我们开发的三个 .jar(已使用 Maven 构建)并与依赖项(例如 slf4j-api-1.6.1.jar、spring-security-core-3.0.7.RELEASE.jar 和其他十几个),
- 还解压并重新打包特定的 .jar (使用 jar.exe 重新打包,而不是 zip,因为它不起作用)。
我更喜欢示例而不是大量文档的链接。 :) 提前致谢!
I'm new to almost all related things, but would like to build a Java Web Start application using Maven. I also need to repack a specific .jar (commons-httpclient-3.1.jar), or it won't sign with JarSigner (looks to be a common problem when I googled). Perhaps I could use this Maven plugin, but I don't even know how to setup the Maven repository.
I (might) need to:
- set up the Maven repository to be able to use the above plugin,
- configure the jnlp build using the plugin,
- take use of three .jars that we have developed (already built using Maven) and install along with the dependencies (such as slf4j-api-1.6.1.jar, spring-security-core-3.0.7.RELEASE.jar and a dozen or so others),
- also unpack and repack a specific .jar (repack using jar.exe, not zip since it doesn't work).
I much prefer examples to links to big chunks of documentation. :) Thanks in advance!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您现在可能已经明白了这一点,但是插件存储库是通过 pom 中的单独配置引用到正常安装存储库的。
例如,
请参阅此处 http://maven.apache.org/guides/简介/introduction-to-the-pom.html
You've probably figured this out by now, but plugin repositories are referenced with a separate configuration in your pom to the normal installation repositories.
e.g.
See here http://maven.apache.org/guides/introduction/introduction-to-the-pom.html
你可以使用 maven web start 插件
或者你可以 使用里面的 jnlp 文件(手动创建)
您甚至可以创建一个 servlet,它将创建一个 jnlp(包含诸如获取某个 lib 目录中的所有 jar 之类的内容)并动态返回到客户端。
该插件应该在maven存储库中,但我从未检查过......
you can use a maven plugin for web start
Alternatively you can generate a war with the jnlp file inside (created manually)
You can even create a servlet that will create a jnlp (with stuff like get all jars in some lib directory) and return dynamically to the client.
The plugin should be in the maven repository, but I've never checked it...