|
cdbimport has been created by Kevin Menard (May 01, 2009). Content:cdbimport is an Ant task that that uses Cayenne to generate a DataMap based on an existing database schema. This allows you to generate your DataMap prior to building your project, which may be necessary if you are also using the cgen task. Parameters (as XML elements)
ExamplesLoad the Maven 2 plugin and configure the cdbimport mojo: <build> <plugins> <plugin> <groupId>org.apache.cayenne.plugins</groupId> <artifactId>maven-cayenne-plugin</artifactId> <executions> <execution> <id>cdbimport</id> <configuration> <!-- Configuration items go in here. See table, above. --> </configuration> <goals> <goal>cdbimport</goal> </goals> </execution> </executions> </plugin> </plugins> </build> Here is an example of using cdbimport to create DB schema objects on a local HSQLDB database named "bookmarker" from a DataMap located in "main/resources/datamap.map.xml": <build> <plugins> <plugin> <groupId>org.apache.cayenne.plugins</groupId> <artifactId>maven-cayenne-plugin</artifactId> <executions> <execution> <id>cdbimport</id> <configuration> <map>${project.build.sourceDirectory}/../resources/datamap.map.xml</map> <adapter>org.apache.cayenne.dba.hsqldb.HSQLDBAdapter</adapter> <driver>org.hsqldb.jdbcDriver</driver> <url>jdbc:hsqldb:hsql://localhost/bookmarker</url> <username>sa</username> </configuration> <goals> <goal>cdbimport</goal> </goals> </execution> </executions> </plugin> </plugins> </build> |
Powered by
Atlassian Confluence
(Version: 2.2.9 Build:#527 Sep 07, 2006)
-
Bug/feature request
Unsubscribe or edit your notifications preferences
Unsubscribe or edit your notifications preferences
