如何在调试模式下编译? (netbeans,java,maven) [英] How do I compile in debug mode? (netbeans, java, maven)

查看:361
本文介绍了如何在调试模式下编译? (netbeans,java,maven)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正面临项目中的注释/持久性错误,并且持久性库在尝试时会抛出

I am facing annotation/persistence errors in a project and the persistence library throws a


NullPointerException解析实体(org.eclipse.persistence.internal.jpa.metadata.accessors.classes.EntityAccessor.discoverMappedSuperclassesAndInheritanceParents(EntityAccessor.java:224))。

如何调试这些错误以找到有关错误原因的更多信息?

How do I debug errors like these to find more about the cause of the error?

中设置断点code> EntityAccessor 并且编译调试不起作用,编译器本身似乎没有在调试模式下运行。

Setting a breakpoint in EntityAccessor and compiling for debug doesn't work, the compiler itself seems to be not running in debug mode.

I我正在使用Netbeans / Java / Maven。

I am using Netbeans / Java / Maven.

推荐答案

据我所知,您希望在编译中进行调试 - 而不是在调试模式下进行调试。

From what I understand, you want debug in the compilation- not maven in debug mode.

使用mvn编译,通过以下方式使用调试模式:

Using mvn to compile, use debug mode through following way:

  <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-compiler-plugin</artifactId>
    <version>2.5.1</version>
    <configuration>
        <source>1.6</source>
        <target>1.6</target>
        <debug>true</debug>
        <debuglevel>lines,vars,source</debuglevel> 
    </configuration>
  </plugin>

debuglevel可以是以CSV格式输入的三个值中的任何一个
要突出显示, debug debuglevel 是maven中包含的重要节点。

debuglevel can be any of the three values entered in CSV format To highlight, debug and debuglevel are important nodes included in the maven.

希望它在某种程度上有所帮助。

Hope it helps in some way.

参考: maven.apache .org / plugins / maven-compiler-plugin / compile-mojo.html

这篇关于如何在调试模式下编译? (netbeans,java,maven)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆