Maven and OpenJPA dependencies

I have been trying out Apache's openJPA EJB3 implementation recently and had to figure out what to include in the pom.xml to get it all to work with maven .

Initially I included the following dependency:

<dependency>
<groupId>org.apache.openjpa</groupId>
<artifactId>openjpa-persistence</artifactId>
<version>1.0.1</version>
</dependency>

But on running my unit test I got the error:

Caused by: <openjpa-1.0.1-r420667:592145 fatal user error> org.apache.openjpa.persistence.ArgumentException: You did not name the factory class with the required property openjpa.BrokerFactory. Normally this property defaults appropriately; have you forgotten to include all the OpenJPA jars in your classpath?

I had to include the openjpa jdbc dependency in my pom.xml as well to get it all to work:

<dependency>
<groupId>org.apache.openjpa</groupId>
<artifactId>openjpa-persistence-jdbc</artifactId>
<version>1.0.1</version>
</dependency>