You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cayenne.apache.org by Andrus Adamchik <an...@objectstyle.org> on 2015/12/03 16:42:43 UTC

Simpler Maven plugins

Looking at my huge maven configs for cgen/cdbimport (profiles, driver dependencies, etc), I am thinking we can drastically simplify that. I mean 100 lines of XML to handle a single DataMap is a bit too much. Some raw ideas:

1. a new generic plugin combining both cgen/cdbimport ("csync"). "cgen" part will run unconditionally (as model changes can happen without db changes), "cdbimport" - based on the presence of some property (such as DB password).

2. a set of DB-specific plugins, inheriting from "csync". E.g. "csync-mysql", "csync-oracle", etc. so that the users don't have to worry about including the right driver versions, etc. We can also guess default JDBC URLs for a given type of DB on localhost, and simplify other settings. This may have to be done on Github outside Apache (some drivers are GPL, some - commercial, so we can't have a hard dependency on those). 

In parallel to that there are ideas to include cdbimport filter files in the main Cayenne project (and the Modeler), so Maven can automatically discover them from cayenne-xx.xml.

I think there's lots of potential in cdbimport/cgen workflow, just that the tools are not yet easy to use.

Andrus