通过命令行 (asadmin) 部署应用程序客户端
是否有选项/参数可以使用 asadmin 命令部署启用 java-web-start 的应用程序客户端?我使用 GlassFish 3.1.1。
当我在 webgui 中部署它时,我有一个运行良好的 jar 文件
类型:“应用程序客户端”
Java-Web-Start [x]
我寻找这样的东西:
asadmin deploy --type application --property java-web-start-enabled=true /path/to/jar/file/myApp.jar
Is there an option/parameter to deploy an application client with java-web-start enabled with the asadmin command? I work with GlassFish 3.1.1.
I have a jar-file which works well, when I deploy it in the webgui
Type: "Application Client"
Java-Web-Start [x]
I look for something like this:
asadmin deploy --type application --property java-web-start-enabled=true /path/to/jar/file/myApp.jar
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
当 jar 文件签名时,部署在 glassfish 中的“应用程序客户端”只能通过 java-web-start 启动。因此,当我使用“glassfish Web 管理控制台”部署它时,jar 文件已签名并且一切按预期工作。当我通过脚本(例如 jenkins)部署它时,Web 启动参数不起作用并且文件未签名。结果:java web start 不起作用。
解决方案:我使用 Maven 插件对 jar 文件进行签名。为此,我首先必须将 Glassfish 证书导入密钥库
带有“maven-jarsigner-plugin”插件的 pom 文件如下所示:
现在我可以使用 asadmin 部署脚本部署应用程序,而 java-web-start 是已启用!
An "Application Client" deployed in the glassfish can only started by java-web-start, when the jar-file is signed. So when I deploy it with the "glassfish web administration console", the jar-file is signed and everything works as expected. When I deploy it throught a script (for example jenkins), the web start parameter doesn't work and the files aren't signed. The result: java web start doesn't work.
Solution: I sign the jar file with a maven plugin. For that, I first had to import the Glassfish certificate into the keystore
The pom-file with the "maven-jarsigner-plugin" plugin looks like:
Now I can deploy the application with a asadmin deployment script, and java-web-start is enabled!
您编写的命令与您想要的命令非常接近...请参阅http://download.oracle.com/docs/cd/E18930_01/html/821-2433/deploy-1.html#scrolltoc。
GlassFish 的应用程序客户端/Java Web Start 支持功能的首席工程师撰写了许多有关该功能的博客文章: http://blogs.oracle.com/quinn/
The command that you have written is very close to the command that you want... see http://download.oracle.com/docs/cd/E18930_01/html/821-2433/deploy-1.html#scrolltoc.
The lead engineer on the application client/Java Web Start support features of GlassFish has written a number of blog entries about the feature: http://blogs.oracle.com/quinn/