I'm working on integrating Jaxb code generation with Pants, which mostly works, but I've noticed an inconvenience regarding the file hashes. If I change the schema (.xsd) file, pants correctly recognizes that there has been a change, and rebuilds the target.
However, the target takes in a parameter in the BUILD file to change the output package which the generated java files are placed in. Pants doesn't pick up on this change, because it's only checking the hash of the schema file, so it skips the build step on the jaxb_library target. Pants then carries merrily along until it chokes because the dependees can't find the files, because they were never generated.
Specifically, it throws this error:
pants.base.cache_manager.CacheValidationError: Problem validating target .pants.d.gen.jaxb.gen-java.src.resources.com.pants.example.jaxb.jaxb in .pants.d/gen/jaxb/gen-java: [Errno 2] No such file or directory: u'/Users/gmalmquist/Development/pants/.pants.d/gen/jaxb/gen-java/com/pants/example/jaxb/ObjectFactory.java'
Is there an easy way to check for this sort of thing and invalidate the files manually, or do I have to implement some sort of workaround/redesign?
Thanks,
Garrett