Using CTC++ with Maven

12 April 2021

Using Testwell CTC++ with Maven

To use Testwell CTC++ you have to supply a small wrapper script and point Maven to that external compiler

The wrapper

As we can't prepend (only append) options to the compiler call, we pass them for simplicity in the script directly.

Following as mvnctc executable in $PATH
exec javactc -i m javac $*

Or following as mvnctc.bat in your %PATH%
call javactc -i m javac %*

Integrate in pom.xml

At the beginning where the maven-compiler-plugin is stored.

Add inside configuration


More complete example here



Build your project as usual. You can set fork to false to disable Testwell CTC++ usage.
This is applicable to Maven 2 and higher (currently Maven 3)