Java 无法使用mojo';查看生成的测试源文件夹;s构建助手

Java 无法使用mojo';查看生成的测试源文件夹;s构建助手,java,maven-plugin,mojo,build-helper-maven-plugin,Java,Maven Plugin,Mojo,Build Helper Maven Plugin,我已经将mojo的插件构建助手添加到我的项目pom中,为我的集成测试生成一个新的测试源文件夹。当我运行阶段时,生成测试源 mvn generate-test-sources 我可以看到下面的控制台输出,显示已生成的测试源文件夹,但当我在project explorer中查看时,我没有看到任何已创建的文件夹。 [INFO] Scanning for projects... [WARNING] [WARNING] Some problems were encountered while b

我已经将mojo的插件构建助手添加到我的项目pom中,为我的集成测试生成一个新的测试源文件夹。当我运行阶段时,生成测试源

   mvn generate-test-sources
我可以看到下面的控制台输出,显示已生成的测试源文件夹,但当我在project explorer中查看时,我没有看到任何已创建的文件夹。

[INFO] Scanning for projects...
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for *******
[WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: com.google.guava:guava:jar -> version 18.0 vs ${guava.version} @ line 154, column 21
[WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: org.unitils:unitils-core:jar -> duplicate declaration of version 3.3 @ line 164, column 21
[WARNING] 
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING] 
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING] 
[INFO] 
[INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder with a thread count of 1
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building projectxxStaticAnalysisxxxxx versionxxxxx
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ StaticAnalysis ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 4 resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ StaticAnalysis ---
[INFO] Nothing to compile - all classes are up to date
[INFO] 
[INFO] --- build-helper-maven-plugin:1.9:add-test-source (add-integration-test-sources) @ StaticAnalysis ---
[INFO] Test Source directory: C:\{workspacepath}\src\integration-test\java added.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.421 s
[INFO] Finished at: 2014-11-25T11:26:59-06:00
[INFO] Final Memory: 9M/303M
[INFO] ------------------------------------------------------------------------    
下面是我的pom插件配置

<plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>build-helper-maven-plugin</artifactId>
        <version>1.9</version>
        <executions>
          <execution>
            <id>add-integration-test-sources</id>
            <phase>generate-test-sources</phase>
            <goals>
              <goal>add-test-source</goal>
            </goals>
            <configuration>
              <sources>
                <source>src/integration-test/java</source>
              </sources>
            </configuration>
          </execution>
        </executions>
</plugin>

org.codehaus.mojo
构建助手maven插件
1.9
添加集成测试源
生成测试源
添加测试源
src/集成测试/java
我做错什么了吗?。请帮忙


谢谢

我想我找到了问题的答案。实际上,我希望buildhelper插件为我创建测试文件夹。但事实是,它不会为您创建文件夹

您必须创建测试文件夹,并使用此build helper插件告诉maven将您创建的文件夹视为测试文件夹,如上面我的pom所示。我可以通过创建一个新的测试文件夹并运行以下命令来修复我的问题

mvn generate-test-sources eclipse:eclipse
希望这对别人有帮助