A.4. Update the Existing Project's Classpath

Updates are required to several of the existing pom.xml files.

A.4.1. Parent Module

In the parent (claims) project's pom.xml, locate the <modules> element and update to include the claims-jpa project (which in turn includes the other new projects):

<modules>
    <module>dom</module>
    <module>fixture</module>
    <module>service</module>
    <module>commandline</module>
    <module>webapp</module>
    <module>../claims-jpa</module>
</modules>

Next, move the salient configuration from the claims-jpa container project's pom.xml to the parent claims project's pom.xml:

  • under the <properties> section there are elements defining versions for JPA Objects, PostgreSQL, jTDS and SL4J. Cut-n-paste all of these to the corresponding <properties> section in the parent pom.xml;

  • similarly, cut-n-paste the entire contents under the <dependencyManagement> element from claims-jpa's pom.xml into corresponding section in claims' pom.xml.

A.4.2. Fixture Module

Now, in the claims-fixture project's pom.xml, update its <dependencies> section to add in a new <dependency> to claims-jpa-service (you can leave in the reference to the original claims-service or remove it, it doesn't matter):

<dependency>
    <groupId>${project.groupId}</groupId>
    <artifactId>claims-jpa-service</artifactId>
</dependency>

A.4.3. DOM Module

Finally, copy the <dependency> section from claims-jpa-dom pom.xml (referencing the JPA Objects' own applib) to the corresponding section in claims-dom:

<dependency>
    <groupId>org.starobjects.jpa</groupId>
    <artifactId>jpa-applib</artifactId>
</dependency>

A.4.4. JDBC Drivers

If you set up the PostgreSQL database (as described in Section A.2, “Set up a Relational Database”) then you should be done. If you are using your own database then you will also need to add <dependency> entries to your JDBC driver in the Maven pom.xml (search out the existing PostgreSQL <dependency>s and add your own alongside).