我正在尝试在Eclipse Photon 2018/12中调试一个maven cucumber-serenity Java项目。请告诉我如何设置maven调试配置文件并运行,这样我就可以通过设置断点来调试代码。
发布于 2019-02-25 08:34:13
这取决于您的需求。如果您想调试测试,只需使用此配置文件:
<project
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<groupId>...</groupId>
<artifactId>...</artifactId>
<version>...</version>
<packaging>...</packaging>
<repositories>
...
</repositories>
<distributionManagement>
...
</distributionManagement>
<profiles>
<profile>
<id>debug</id>
<properties>
<maven.surefire.debug>test</maven.surefire.debug>
</properties>
</profile>
</profiles>
<build>
...
</build>
<dependencies>
...
</dependencies>
</project>但是如果不是这样,那么您可以简单地配置Eclipse IDE来执行this。
希望能有所帮助。
https://stackoverflow.com/questions/54857962
复制相似问题