![](/img/trans.png)
[英]maven-eclipse-plugin: how to force to use a jar dependency rather than project dependency
[英]maven-eclipse-plugin additional source directory not working
我放入pom.xml:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-eclipse-plugin</artifactId>
<version>2.10</version>
<configuration>
<sourceIncludes>
<sourceInclude>target/generated-test-sources/protobuf/java/**</sourceInclude>
</sourceIncludes>
</configuration>
</plugin>
但是當我跑步時:
mvn eclipse:eclipse -Dwtpversion=2.0 install
它沒有將.classpath
配置為包括此目錄。
感謝幫助。
我找到了實現此目標的另一種方法:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>1.7</version>
<executions>
<execution>
<id>add-source</id>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>target/generated-test-sources/protobuf/java</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.