带有依赖项的webstart maven插件

带有依赖项的webstart maven插件,maven,plugins,dependencies,java-web-start,maven-webstart-plugin,Maven,Plugins,Dependencies,Java Web Start,Maven Webstart Plugin,我的老板告诉我使用Maven Web Start插件来生成JNLP和签名JAR 问题是,无论我如何尝试,我都无法制作包含依赖项的JAR 我总是面临ClassDefNotFound异常 pom.xml 假的 mygrid存储库 myGrid存储库 http://www.mygrid.org.uk/maven/repository com.springsource.repository.bundles.external SpringSource企业捆绑包存储库-外部捆绑包版本 http://rep

我的老板告诉我使用Maven Web Start插件来生成JNLP和签名JAR

问题是,无论我如何尝试,我都无法制作包含依赖项的JAR

我总是面临
ClassDefNotFound
异常

pom.xml

假的
mygrid存储库
myGrid存储库
http://www.mygrid.org.uk/maven/repository
com.springsource.repository.bundles.external
SpringSource企业捆绑包存储库-外部捆绑包版本
http://repository.springsource.com/maven/bundles/external
org.codehaus.mojo.webstart
webstart maven插件
1.0-α-2
包裹
包裹
jnlp
ctScan.jnlp
com.test.testScan.App
解放党
真的
公共日志:公共日志
commons cli:commons cli
../../ctKeystore
创造性钥匙通行证
创造性钥匙通行证
创意扫描
莫西尼·瓦纳斯
该死的
创新技术
拉巴特
拉巴特
文科硕士
真的
假的
真的
假的
真的
org.apache.maven.plugins
maven jar插件
真的
解放党/
com.test.testScan.App
朱尼特
朱尼特
3.8.1
测试
英国公司
装置
1
net.htmlparser.jericho
杰里科html
3.3
com.itextpdf
itextpdf
0
net.java.dev.jai-imageio
jai imageio内核独立版
1.2-pre-dr-b04-2011-07-04
javax.media.jai
com.springsource.javax.media.jai.codec
1.1.3
构建输出 请在此处添加您的构建输出(可能还有创建的目录结构及其内容,特别是
lib/
文件夹的内容,如果有那么多)


webstart maven插件不会创建包含依赖项的JAR,它会在
lib/
文件夹中创建一个JAR以及依赖项的JAR


如果您想将所有内容打包到一个JAR中,您需要使用
maven shade插件

webstart maven插件不会创建包含依赖项的JAR,它会在
lib/
文件夹中创建一个JAR以及依赖项的JAR


如果您想将所有内容打包到一个JAR中,您需要使用
maven shade插件

我更新了您的问题以使其更清晰(假设我理解正确,并且您想要一个包含依赖项的JAR)。另外,请在问题中添加包含完整错误消息的生成输出。可能有用我更新了您的问题以使其更清楚(假设我理解正确,并且您想要一个包含依赖项的JAR)。另外,请在问题中添加包含完整错误消息的生成输出。可能有用
<repositories>
    <repository>
        <releases />
        <snapshots>
            <enabled>false</enabled>
        </snapshots>
        <id>mygrid-repository</id>
        <name>myGrid Repository</name>
        <url>http://www.mygrid.org.uk/maven/repository</url>
    </repository>
    <repository>
        <id>com.springsource.repository.bundles.external</id>
        <name>SpringSource Enterprise Bundle Repository - External Bundle Releases</name>
        <url>http://repository.springsource.com/maven/bundles/external</url>
    </repository>
</repositories>

<build>
    <plugins>
        <plugin>
            <groupId>org.codehaus.mojo.webstart</groupId>
            <artifactId>webstart-maven-plugin</artifactId>
            <version>1.0-alpha-2</version>

            <executions>
                <execution>
                    <id>package</id>
                    <phase>package</phase>
                    <goals>
                        <goal>jnlp</goal>
                    </goals>
                </execution>
            </executions>

            <configuration>
                <jnlp>
                    <outputFile>ctScan.jnlp</outputFile>
                    <mainClass>com.test.testScan.App</mainClass>
                </jnlp>

                <libPath>lib</libPath>
                <outputJarVersions>true</outputJarVersions>
                <includes>
                    <include>commons-logging:commons-logging</include>
                    <include>commons-cli:commons-cli</include>
                </includes>
                <sign>
                    <keystore>../../ctKeystore</keystore>
                    <keypass>CreativeKeypass</keypass>
                    <storepass>CreativeKeypass</storepass>
                    <alias>CreativeScan</alias>

                    <dnameCn>Mohcine Wannas</dnameCn>
                    <dnameOu>DARD</dnameOu>
                    <dnameO>Creative technologies</dnameO>
                    <dnameL>Rabat</dnameL>
                    <dnameSt>Rabat</dnameSt>
                    <dnameC>ma</dnameC>

                    <verify>true</verify>
                </sign>

                <pack200>false</pack200>
                <gzip>true</gzip>
                <outputJarVersions>false</outputJarVersions>
                <verbose>true</verbose>

            </configuration>
        </plugin>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-jar-plugin</artifactId>
            <configuration>
                <archive>
                    <manifest>
                        <addClasspath>true</addClasspath>
                        <classpathPrefix>lib/</classpathPrefix>
                        <mainClass>com.test.testScan.App</mainClass>
                    </manifest>
                </archive>
            </configuration>
        </plugin>
    </plugins>
</build>

<dependencies>
    <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>3.8.1</version>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>uk.co.mmscomputing</groupId>
        <artifactId>device</artifactId>
        <version>1.0</version>
    </dependency>
    <dependency>
        <groupId>net.htmlparser.jericho</groupId>
        <artifactId>jericho-html</artifactId>
        <version>3.3</version>
    </dependency>
    <dependency>
        <groupId>com.itextpdf</groupId>
        <artifactId>itextpdf</artifactId>
        <version>0.0</version>
    </dependency>
    <dependency>
        <groupId>net.java.dev.jai-imageio</groupId>
        <artifactId>jai-imageio-core-standalone</artifactId>
        <version>1.2-pre-dr-b04-2011-07-04</version>
    </dependency>
    <dependency>
        <groupId>javax.media.jai</groupId>
        <artifactId>com.springsource.javax.media.jai.codec</artifactId>
        <version>1.1.3</version>
    </dependency>
</dependencies>