在多模块项目中,我依赖于ProjectA的pom中的ProjectB(main和test)配置为
<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>
当我尝试使用webstart-maven-plugin打包项目时,test-jar被排除在lib目录之外。有没有办法包括它?
插件日志包含此行,表示正在跳过test-jar依赖项。
[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
感谢。
答案 0 :(得分:0)
在深入挖掘源代码后,我发现不能包含测试包。该插件只包含&#34; jar&#34;类型的依赖项。和&#34; ejb-client&#34;。
无论如何,我决定通过在主jar中包含测试类作为源文件夹来解决我的问题。