我对maven和tycho的世界相当陌生,所以希望这只是我明显缺少的东西。我正在尝试使用tycho来构建插件,但是我无法使tycho-compiler-plugin识别作为构建过程的一部分生成的源代码。Tycho编译器没有拾取生成的源代码
下面是测试POM的副本我已经把证明:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>rt</groupId>
<artifactId>rt.webservice</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<tycho-version>0.16.0</tycho-version>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-maven-plugin</artifactId>
<version>${tycho-version}</version>
<extensions>true</extensions>
</plugin>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-compiler-plugin</artifactId>
<version>${tycho-version}</version>
<configuration>
<verbose>true</verbose>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jaxws-maven-plugin</artifactId>
<version>1.12</version>
<executions>
<execution>
<id>generate-ws-code</id>
<phase>generate-sources</phase>
<goals>
<goal>wsimport</goal>
</goals>
<configuration>
<wsdlDirectory>${basedir}/wsdl</wsdlDirectory>
<verbose>true</verbose>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
我在引用一些生成的源代码,然后失败的src文件夹中的Java类编译。
如果我删除tycho并使用标准的maven-compiler-plugin,它会自动拾取构建过程中生成的代码,并按照预期编译上述java类。
有人能告诉我我做错了什么吗?
添加生成的源dir到build.properties做了诀窍 - 谢谢。 – greg1 2013-03-06 05:23:03
谢谢!你的解释帮助我解决了类似的问题。 – 2015-12-22 11:00:14