Can the build process be debugged? If so, how?

From Kedar:

Yes, since the build is based on Maven, you can actually debug the build process itself in a Java Debugger. Here's how:

  • Identify the source you need to build. Suppose it is: v3-core-module.
  • Check out the hk2-sources by doing svn checkout https://svn.java.net/svn/hk2/trunk.
  • Open the hk2-maven-plugin using its pom.xml. Set the break-points in HK2CompileMojo and AptCompiler.java.
  • cd v3/core.
  • Execute (put these statements in a script so that your other mvn commands are not affected):
export MAVEN_OPTS="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5050"
mvn -o compile
  • Run the script.
  • Attach the debugger to mvn VM and your break-point will be hit. This is a good feature of this build system.