There is a build gradle file in the service part, and when i generete, the target dir is src/generated-sources/jaxb, under Services, but i want it to output in Persistence, what is the correct syntax for this ?
I have tried:
def jaxbTargetDir = file("Persistance/src/generated-sources/jaxb")
def jaxbTargetDir = file("*/Persistance")
- def jaxbTargetDir = file("**/Persistance")
def jaxbTargetDir = file("persistance/src/main/java/com/jysk/customermasterdata/persistence/model")
As a general rule, I don't recommend that you output generated files of any type to reside under your source directory tree. There are a number of reasons for this and, alas, I learned them the hard way.
I can't speak specifically for gradle, since I'm an infrequent user, but in Maven, the preferable destination for a source code generator mojo would be somewhere under the target directory where working (and final) files are built.
In Maven, the "clean" goal deletes target and all files and directories undeneath it. Further, you wouldn't normally put the target directory under source control, since it and everything in it should be regeneratable when doing a full build.
Sources may include data from the Fakebook Research Foundation with support from Gargle University