Eclipse 使用build helper maven附加源目录
我尝试使用buildhelpermaven插件在中附加由jaxb或cxf生成的源目录。不幸的是,尽管我在mvn生成源代码方面取得了成功,但我的eclipse没有将目标目录添加为源文件夹Eclipse 使用build helper maven附加源目录,eclipse,maven,build-helper-maven-plugin,Eclipse,Maven,Build Helper Maven Plugin,我尝试使用buildhelpermaven插件在中附加由jaxb或cxf生成的源目录。不幸的是,尽管我在mvn生成源代码方面取得了成功,但我的eclipse没有将目标目录添加为源文件夹 <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>build-helper-maven-plugin</artifactId>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>3.0.0</version>
<executions>
<execution>
<id>add-source</id>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>${project.build.directory}/generated/cxf</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
你知道吗
向您致意Eclipse的M2插件将更好地解释
构建
部分中的声明。试试这个:
<build>
<sourceDirectory>${project.build.directory}/generated/cxf</sourceDirectory>
</build>
${project.build.directory}/generated/cxf
<build>
<sourceDirectory>${project.build.directory}/generated/cxf</sourceDirectory>
</build>