有没有一种方法可以将文件添加到由maven-webstart-plugin创建的.zip中?

时间:2018-09-04 14:39:41

标签: maven maven-webstart-plugin

作为maven-webstart-plugin的一部分,它将为您的应用程序生成.jar文件,并与.jnlp文件一起打包为.zip(以及所有依赖项)。有什么方法可以将文件添加到.zip中,例如README.txt或launch.html吗?

这是我现有的用于maven-webstart-plugin的pom配置:

<plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>webstart-maven-plugin</artifactId>
            <version>1.0-beta-6</version>
            <dependencies>
                <dependency>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>keytool-api-1.7</artifactId>
                    <version>1.5</version>
                </dependency>
            </dependencies>
            <executions>
                <execution>
                    <phase>package</phase>
                    <goals>
                        <goal>jnlp-inline</goal>
                    </goals>
                </execution>
            </executions>
            <configuration>
                <filenameMapping>simple</filenameMapping>
                <versionEnabled>false</versionEnabled>
                <jnlpFiles>
                    <jnlpFile>
                        <templateFilename>template.vm</templateFilename>
                        <outputFilename>launch.jnlp</outputFilename>
                        <jarResources>
                            <jarResource>
                                <groupId>com.something</groupId>
                                <artifactId>MyApplication</artifactId>
                                <version>${project.version}</version>
                                <mainClass>My.Main.Class</mainClass>
                            </jarResource>
                        </jarResources>
                    </jnlpFile>
                </jnlpFiles>
                <unsignAlreadySignedJars>true</unsignAlreadySignedJars>
                <canUnsign>true</canUnsign>
                <libPath>lib</libPath>
                <codebase></codebase>

                <updateManifestEntries>
                    <Application-Name>MyApplication</Application-Name>
                    <Permissions>all-permissions</Permissions>
                    <Codebase>*</Codebase>
                </updateManifestEntries>
                <jnlp>
                    <j2seVersion>1.7+</j2seVersion>
                    <outputFile>launch.jnlp</outputFile>
                    <mainClass>My.Main.Class</mainClass>
                </jnlp>
                <sign>
                    <keystore>${project.basedir}/myKeystore.jks</keystore>
                    <storepass>mypassword</storepass>
                    <alias>key</alias>
                    <verify>false</verify>
                </sign>
                <verbose>true</verbose>
            </configuration>
        </plugin>

0 个答案:

没有答案