内容简介:翻译自:https://stackoverflow.com/questions/20494534/new-updatemanifestentries-entries-of-webstart-maven-plugin-breaks-the-applicat
当我的JDK版本升级到u45时,我收到有关缺少安全信息的警告.因此,我使用以下安全更新作为使用webstart-maven-plugin进行webstart签名的一部分
<plugin>
<groupId> org.codehaus.mojo</groupId>
<artifactId>webstart-maven-plugin</artifactId>
<version>1.0-beta-4</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>jnlp-inline</goal>
<!-- use jnlp, jnlp-inline or jnlp-single as appropriate -->
</goals>
</execution>
</executions>
<configuration>
<!--outputDirectory></outputDirectory -->
<!-- not required?? -->
<!-- Set to true to exclude all transitive dependencies. Default is
false. -->
<excludeTransitive>false</excludeTransitive>
<!-- The path where the libraries are stored within the jnlp structure.
not required. by default the libraries are within the working directory -->
<libPath>lib</libPath>
<!-- resourcesDirectory>${project.basedir}/src/main/jnlp/resources</resourcesDirectory -->
<!-- default value -->
<!-- JNLP generation -->
<jnlp>
<!-- default values -->
<!-- inputTemplateResourcePath>${project.basedir}</inputTemplateResourcePath -->
<!--inputTemplate>src/main/jnlp/template.vm</inputTemplate -->
<!-- relative to inputTemplateResourcePath -->
<outputFile>xxxx.template</outputFile>
<!-- defaults to launch.jnlp -->
<!-- used to automatically identify the jar containing the main class. -->
<!-- this is perhaps going to change -->
<mainClass>XXXXXX</mainClass>
</jnlp>
<!-- SIGNING -->
<!-- defining this will automatically sign the jar and its dependencies,
if necessary -->
<sign>
..................
</sign>
<!-- BUILDING PROCESS -->
<pack200>
<enabled>false</enabled>
</pack200>
<gzip>true</gzip>
<!-- default force when pack200 false, true when pack200 selected
?? -->
<!-- causes a version attribute to be output in each jar resource
element, optional, default is false -->
<outputJarVersions>true</outputJarVersions>
<!--install>false</install -->
<!-- not yet supported -->
<verbose>true</verbose>
<updateManifestEntries>
<Application-Name>cccccc</Application-Name>
<Trusted-Library>true</Trusted-Library>
<Permissions>all-permissions</Permissions>
<Codebase>*</Codebase>
<Trusted-Only>true</Trusted-Only>
</updateManifestEntries>
</configuration>
这里
<updateManifestEntries> <Application-Name>cccccc</Application-Name> <Trusted-Library>true</Trusted-Library> <Permissions>all-permissions</Permissions> <Codebase>*</Codebase> <Trusted-Only>true</Trusted-Only> </updateManifestEntries>
启动时中断应用程序.依赖注入没有发生.我必须添加更新的清单信息,即使是与Spring相关的jar.
我尝试过同样的事情
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<inherited>true</inherited>
<configuration>
<archive>
<manifest>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
<addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
</manifest>
</archive>
</configuration>
</plugin>
但似乎没有工作.
欣赏你的直接回复,因为我自上周以来一直在尝试这样做
问题出在webstart-maven-plugin(1.0-beta-4)上
<updateManifestEntries>
<!-- <Permissions>all-permissions</Permissions>
<Application-Name>catsvision</Application-Name>
<Trusted-Library>true</Trusted-Library>
<Codebase>*</Codebase>
<Trusted-Only>true</Trusted-Only> -->
</updateManifestEntries>
没有按预期工作.
当我试图做同样的事情
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<inherited>true</inherited>
<configuration>
<archive>
<addMavenDescriptor>false</addMavenDescriptor>
<manifestFile>
src/main/resources/META-INF/MANIFEST.MF
</manifestFile>
<manifest>
<addDefaultImplementationEntries>false</addDefaultImplementationEntries>
<addDefaultSpecificationEntries>false</addDefaultSpecificationEntries>
</manifest>
</archive>
</configuration>
</plugin>
其中MANIFEST.MF有以下条目
Permissions: all-permissions Application-Name: CATS Vision Codebase: * Trusted-Library: true Trusted-Only: true
为我工作.但这是针对特定的JAR.如何更新一组JAR的清单条目(我的意思是我的webstart包)?除了maven-webstart-plugin之外还有其他任何插件吗?
这似乎是maven-webstart-plugin的一个漏洞
http://jira.codehaus.org/browse/MWEBSTART-224
我解决了这个问题:
>使用maven-antrun-plugin更新权限属性
>使用maven-jarsigner-plugin签名JARS
>使用maven-webstart-plugin只是为了创建JNLP包,而不是用于签名或其他任何东西
翻译自:https://stackoverflow.com/questions/20494534/new-updatemanifestentries-entries-of-webstart-maven-plugin-breaks-the-applicat
以上所述就是小编给大家介绍的《java – webstart-maven-plugin的新条目打破了应用程序》,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对 码农网 的支持!
猜你喜欢:- 真正的画廊,左右条目可点击居中,左右条目可滑动
- GWT .hgignore / .gitignore条目
- Flex 自定义DataGrid实现根据条目某一属性值改变背景颜色
- Android里应用程序,应用程序窗口和视图对象之间的关系
- 使用 Bluemix、Watson Discovery 和 Cloudant 构建移动应用程序来分析其他应用程序
- ChromeOS 终端应用程序暗示其即将支持 Linux 应用
本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。
微商团队管理实战手册
杜一凡 / 人民邮电出版社 / 2015-11 / 45.00元
回顾淘宝,用了10年时间才发展了不到1000万的卖家,再看微商,其仅一年时间就拥有了超过1000万的卖家。进入2015年,微商的发展之路虽有小坎坷,但前景依然被看好。然而任何一个想要做大、做强的微商都要以团队形式来发展,独立的个体只会举步维艰。 本书全面解读微商团队管理的营销书。全书共分为六章,分别从微商团队的商业秘密、微商团队的战略布局、管理基本功、建立高效团队、精通管理工具、未来发展等方......一起来看看 《微商团队管理实战手册》 这本书的介绍吧!