DataNucleus JDO and Maven(2+)

Apache Maven is a project management and
build tool that is quite common in organisations. Using DataNucleus and JDO with Maven is simple since
the DataNucleus jars, JDO API jar and DataNucleus Maven plugin are present in the Maven central
repository, so you don't need to define any repository to find the artifacts.

The only remaining thing to do is identify which artifacts are required for your project,
updating your pom.xml accordingly.

The only distinction to make here is that the above is for compile time since your
persistence code (if implementation independent) will only depend on the basic persistence API.
At runtime you will need the DataNucleus artifacts present also, so this becomes

Maven2 Plugin : Enhancement and SchemaTool

Now that you have the DataNucleus jars available to you, via the repositories, you
want to perform DataNucleus operations. The primary operations are enhancement
and SchemaTool. If you want to use the DataNucleus Maven plugin for enhancement or
SchemaTool add the following to your pom.xml

Note that this plugin step will automatically try to bring in the latest applicable version
of datanucleus-core for use by the enhancer. It does this since you don't need to have
datanucleus-core in your POM for compilation/enhancement. If you want to use an earlier version
then you need to add exclusions to the maven-datanucleus-plugin

The executions part of that will make enhancement be performed immediately after compile,
so automatic. See also the Enhancer docs