开发者

Maven Eclipse plugin doesn't regard Maven failsave plugin?

I'm just using Maven to build my project and also my eclipse project settings. The eclipse:eclipse target generates the .classpath file for eclipse regarding the dependencies and other project settings like source directory, test source directory and so on. Now I added the Maven failsafe plugin and defined a <testSourceDirectory>/test/integration</testSourceDirectory> beside my normal (junit) test directory.

  • test/unit -> contains my junit test cases which are executes in maven "test" phase
  • test/integration -> contains my integration (maybe also junit) test cases, executed in maven phase "integration-test".

Works fine BUT eclipse plugin won't consider my <testSourceDirectory> and won't add it as entry into my .claspath file :-( Is there a way to manipulate the eclispe plugin to add the classpath entry from the failsafe plugin? I already the following:

<plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-eclipse-plugin</artifactId>
            &l开发者_运维百科t;configuration>
                <additionalConfig>
                    <file>
                        <name>.classpath</name>
                        <content>
                            <![CDATA[<classpathentry kind="src" path="test/integration" output="build/compile/test-classes"/>]]>
                        </content>
                    </file>
                </additionalConfig>
            </configuration>
        </plugin>

But this results in overidden .classpath file whith the above entry as single line.. :-(

Has someone a good idea to slve it?

cheers, Yellomen


Have you tried specifying your integration dir in sourceIncludes as described here?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜