Can I force Maven to package a jar despite compilation errors?
Maybe this is what you want: https://maven.apache.org/plugins/maven-compiler-plugin/compile-mojo.html#failOnError
Set failOnError=false
to ignore compilation errors.
Use the exclude option to the compiler plugin to exclude the classes that have compile errors.