How do I compile in debug mode? (netbeans, java, maven)

后端 未结 5 1790
再見小時候
再見小時候 2021-02-07 12:01

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

NullPointerException when trying to resolve the entitie

5条回答
  •  温柔的废话
    2021-02-07 12:48

    Are you running Maven in debug mode?

    To run Maven in debug mode, use the command mvnDebug instead of mvn to build your project and then attach to it using your IDE. Debug breakpoints should be hit.

    I've done this with Eclipse, mostly when trying to debug my own annotation processors, but it's also handy for debugging Maven plugins.

    I'd imagine debugging a JPA processor would not be trivial - you might be better off looking at the whole error message again or posting it in your question.

提交回复
热议问题