On Thu, Aug 7, 2014 at 12:35 PM, Lon Varscsak wrote:
A couple fo questions about class generation:
1) Is it possible to trigger (from within Eclipse) an automated build of
the classes when the model file changes? I had this with WebObjects/WOLips
and it's such nice feature.
But I haven't found it to be much of an issue. It's pretty easy to
generate the classes from the Modeler menu, or from an ant target. I do it
both ways, but use ant more often now since it always has the right
If you are using ant, the setup could look like this:
<fileset dir="path/to/cayenne" includes="cayenne-server*.jar" />
<fileset dir="path/to/cayenne" includes="cayenne-di*.jar" />
<fileset dir="path/to/cayenne" includes="commons-*.jar" />
<fileset dir="path/to/cayenne" includes="velocity-*.jar" />
<fileset dir="path/to/cayenne-tools" includes="*.jar" />
<touch file="src/MyModel.map.xml" />
You may be able to add an eclipse "builder" to do it automatically - not
2) I can't figure out how to get the modeler to build classes into the
right directories honoring packages. It seems like if I choose the
"packages" option (I can't remember the specific name) it doesn't end up in
the right place. I'm sure I just misunderstand the options.
Do you have the "Use package path" box checked at the bottom of the
generate classes window?