ama*_*ent 6 jnlp java-web-start maven maven-webstart-plugin
使用maven-webstart-plugin构建jnlp时,我发现运行时依赖项未包含在jnlp中.
我正在使用这样的模板:
<?xml version="1.0" encoding="utf-8"?>
<jnlp spec="$jnlpspec" codebase="${url}/${appName}" href="${outputFile}">
<information>
<title>${appName}</title>
<vendor>$project.Organization.Name</vendor>
<homepage href="${url}/${appName}"/>
<offline-allowed/>
</information>
<security>
<all-permissions/>
</security>
<resources>
<j2se version="$j2seVersion"/>
$dependencies
</resources>
<application-desc main-class="${main}" />
</jnlp>
Run Code Online (Sandbox Code Playgroud)
如何包含运行时依赖项?好吧,我可以单独包括它们:
<plugin>
<groupId>org.codehaus.mojo.webstart</groupId>
<artifactId>webstart-maven-plugin</artifactId>
<configuration>
<dependencies>
<includes>
<include>groupId:artifactId</include>
...
</includes>
</dependencies>
...
</configuration>
</plugin>
Run Code Online (Sandbox Code Playgroud)
...但理想情况下,每次我向项目添加运行时依赖项时,我都不想记得要更改它.
有没有办法指示插件包含所有运行时依赖项?
所以事实证明默认是包含所有编译和运行时依赖项。
发生了什么事?
好吧,我还使用 ant 将 jnlp 部署到服务器上,并且在 ant 文件中,$dependencies正在设置使用,mvn:dependencies而没有将范围指定为运行时。因此,添加范围会更改合并$dependencies到 jnlp 文件中的文件集。
| 归档时间: |
|
| 查看次数: |
2276 次 |
| 最近记录: |