0

In a multi module project I have a dependency on ProjectB (main and test) in ProjectA's pom configured as

    <dependency>
        <groupId>com.company</groupId>
        <artifactId>ProjectB</artifactId>
        <version>0.0.1-SNAPSHOT</version>
    </dependency>
    <dependency>
        <groupId>com.company</groupId>
        <artifactId>ProjectB</artifactId>
        <version>0.0.1-SNAPSHOT</version>
        <type>test-jar</type>
    </dependency>

When i attempt to package the project using the webstart-maven-plugin the test-jar is excluded from the lib directory. Is there a way to include it?

The plugin logs contain this line which indicates the test-jar dependency is being skipped.

[DEBUG] artifact axis:axis-wsdl4j:jar:1.5.1:compile doesn't contain the main class: com.company.ui.ApplicationWindow
[INFO] Skipping artifact of type test-jar for lib
[DEBUG] artifact com.jgoodies:jgoodies-looks:jar:2.5.3:compile doesnt contain the main class: com.company.ui.ApplicationWindow

Thanks.

4

1 回答 1

0

在挖掘了源代码后,我发现不能包含 test-jar。该插件将仅包含“jar”和“ejb-client”类型的依赖项。

无论如何,我决定通过将测试类作为源文件夹包含在主 jar 中来解决我的问题。

于 2015-03-31T11:40:23.180 回答