About - Cpo Plugin 6.1.1-SNAPSHOT
Contents
generatejavasource goal
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:6.1.1-SNAPSHOT:generatejavasource -DcpoConfig=config
Replace config with the location of your cpo metadata 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>6.1.1-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>
For the full parameter reference (outputDir, testOutputDir, scope, filter, generateInterface, generateClass), see the GenerateJavaSources Javadoc.
