gpt4 book ai didi

java - Maven Eclipse 插件不考虑 Maven 故障安全插件?

转载 作者:行者123 更新时间:2023-12-01 05:50:04 24 4
gpt4 key购买 nike

我只是使用 Maven 来构建我的项目以及我的 Eclipse 项目设置。 eclipse:eclipse 目标为 eclipse 生成有关依赖项和其他项目设置(如源目录、测试源目录等)的 .classpath 文件。现在我添加了 Maven 故障安全插件并定义了 <testSourceDirectory>/test/integration</testSourceDirectory>在我的正常(junit)测试目录旁边。

  • test/unit -> 包含我的 junit 测试用例,这些用例在 Maven“测试”阶段执行
  • test/integration -> 包含我的集成(也可能是 junit)测试用例,在 Maven 阶段“集成测试”中执行。

工作正常,但 Eclipse 插件不会考虑我的 <testSourceDirectory>并且不会将其添加为我的 .claspath 文件中的条目:-( 有没有办法操作 eclispe 插件以添加来自故障安全插件的类路径条目?我已经执行以下操作:

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-eclipse-plugin</artifactId>
<configuration>
<additionalConfig>
<file>
<name>.classpath</name>
<content>
<![CDATA[<classpathentry kind="src" path="test/integration" output="build/compile/test-classes"/>]]>
</content>
</file>
</additionalConfig>
</configuration>
</plugin>

但这会导致覆盖的 .classpath 文件,其中上述条目为单行..:-(

有人有好主意来解决它吗?

干杯,耶洛门

最佳答案

您是否尝试按照描述在 sourceIncludes 中指定集成目录 here

关于java - Maven Eclipse 插件不考虑 Maven 故障安全插件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4944671/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com