java使用maven添加调试符号
我试图通过使用mave编译器插件添加调试符号(这样我就可以访问方法参数名)。 遵循here中的可用配置, 这是我的maven编译器插件配置
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
<compilerArgument>-Xlint:all</compilerArgument>
<showWarnings>true</showWarnings>
<showDeprecation>true</showDeprecation>
<debug>true</debug>
<debugLevel>lines,vars,source</debugLevel>
</configuration>
</plugin>
直到现在,我还没有成功
有人能告诉我如何使用maven添加调试符号吗
# 1 楼答案
您可能需要根据
compilerArgument
的maven-compiler-plugin documentation添加<fork>true</fork>
不确定是否需要,但您可能需要添加
<groupId>org.apache.maven.plugins</groupId>
和<version>#.#.#<\version>
此外,正如@JonK在评论中提到的,你需要
source
而不是sources
来表示debugLevel