This goal will connect to an existing database, read your cpo config, and generate the cpo meta data xml file.
To use the cpo-plugin to create a XML meta data file from an existing CPO database configuration, run the following:
mvn org.synchronoss.cpo:cpo-plugin:5.0.5-SNAPSHOT:convertsqltoxml -DdbTablePrefix=prefix -DdbUrl=url
Replace prefix value with proper cpo table prefix for the database
Replace url value with the jdbc url for your database. The url should be in the format of: jdbc:oracle:thin:user/pass@host:port:instance (oracle example)
Optionally, you can also specify the following arguments:
The generated XML file will be placed in target/CpoMetaData.xml
This goal can be used to generate the cpo bean classes at build time. It will generate the java source files, add them to the classpath, compile them and allow them to get packaged into your jar artifact.
To use the generatejavasource goal from the command line, run the following:
mvn org.synchronoss.cpo:cpo-plugin:5.0.5-SNAPSHOT:generatejavasource -DcpoConfig=config
Replace config with the location of your cpo meta data xml file
It's more likely that this goal will be included in the build/plugins section of your project's pom. To enable that configuration, here's an example:
<plugin> <groupId>org.synchronoss.cpo</groupId> <artifactId>cpo-plugin</artifactId> <version>5.0.5-SNAPSHOT</version> <executions> <execution> <id>Build-CpoBeans</id> <phase>generate-sources</phase> <goals> <goal>generatejavasource</goal> </goals> </execution> </executions> <configuration> <cpoConfig>${basedir}/src/main/resources/com/mycompany/mypackage/CpoMetaData.xml</cpoConfig> </configuration> </plugin>