我正在寻找使用Webstart Maven插件的完整应用程序的源代码.
有任何想法吗?
当我的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 --> …Run Code Online (Sandbox Code Playgroud) java jnlp jar-signing maven-jar-plugin maven-webstart-plugin
希望有人能帮助我解决这个奇怪的问题.我正在尝试运行webstart插件但它似乎无法找到正在生成的jar中的主类.pom就像它可以获得的那样简单,并且类Test存在,并且正在被编译并放置在jar中.有人可以指点我正确的方向吗?
<project>
<modelVersion>4.0.0</modelVersion>
<name>Desktop Components</name>
<groupId>com.test</groupId>
<artifactId>test</artifactId>
<version>1.0</version>
<packaging>jar</packaging>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo.webstart</groupId>
<artifactId>webstart-maven-plugin</artifactId>
<executions>
<execution>
<phase>process-resources</phase>
<goals>
<goal>jnlp-download-servlet</goal>
</goals>
</execution>
</executions>
<configuration>
<jnlpFiles>
<jnlpFile>
<jarResources>
<jarResource>
<groupId>com.test</groupId>
<artifactId>test</artifactId>
<version>1.0</version>
<mainClass>Test</mainClass>
</jarResource>
</jarResources>
</jnlpFile>
</jnlpFiles>
</configuration>
</plugin>
</plugins>
</build>
</project>
Run Code Online (Sandbox Code Playgroud)
这是Maven的跟踪:
C:\TEMP\webstart-test>mvn webstart:jnlp –e
+ Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building Desktop Components
[INFO] task-segment: [webstart:jnlp] (aggregator-style)
[INFO] ------------------------------------------------------------------------
[INFO] Preparing webstart:jnlp
[INFO] ------------------------------------------------------------------------
[INFO] Building Desktop Components
[INFO] ------------------------------------------------------------------------
[INFO] [resources:resources {execution: …Run Code Online (Sandbox Code Playgroud) 使用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)
...但理想情况下,每次我向项目添加运行时依赖项时,我都不想记得要更改它.
有没有办法指示插件包含所有运行时依赖项?
简介:如何使用Maven将一些生成的文件复制到Web服务器(例如IIS或Apache)目录中?
细节:我有一个在Maven中构建的工作应用程序.我已经设法使用webstart-maven-plugin构建它,它在目录中生成所有需要的文件(.jar和.jnlp)target/jnlp.它还会创建一个zip文件target/foo-1.0.zip.
目前webstart插件没有deploy目标 - 对它的请求最终在FAQ(问题3)上.它可能会在将来实施,但目前的建议是使用wagon-maven-plugin.
我从未使用过Wagon.首先,我想将文件复制到由Web服务器提供的本地目录中.后来我想远程复制它们,可能使用ftp.有人可以举例说明我需要添加的内容pom.xml以使本地副本正常工作(希望也是一个ftp示例吗?).我在文档中找不到它.从阅读我想我可能也需要Wagon Maven文件提供程序,但因为这似乎几乎没有文档,我不确定.