Previous: Basic Setup Up: Prerequisites Next: Tutorial

Our application uses Hibernate as persistence provider and HSQLDB as (in-memory-)database. Additionally we want to use some security-annotations from JSR 250. So we have to add the appropriate dependencies to our pom.xml file (between the <dependencies></dependencies> section right before the JUnit-dependency):

    
    <dependency>
      <groupId>net.sf.jpasecurity</groupId>
      <artifactId>jpasecurity-core</artifactId>
      <version>0.4.1-SNAPSHOT</version>
    </dependency>
    <dependency>
      <groupId>net.sf.jpasecurity</groupId>
      <artifactId>jpasecurity-jpa</artifactId>
      <version>0.4.1-SNAPSHOT</version>
    </dependency>
    <dependency>
      <groupId>javax.annotation</groupId>
      <artifactId>jsr250-api</artifactId>
      <version>1.0</version>
    </dependency>
    <dependency>
      <groupId>org.hibernate</groupId>
      <artifactId>hibernate-entitymanager</artifactId>
      <version>3.3.2.GA</version>
    </dependency>
    <dependency>
      <groupId>javax.transaction</groupId>
      <artifactId>jta</artifactId>
      <version>1.1</version>
    </dependency>
    <dependency>
      <groupId>hsqldb</groupId>
      <artifactId>hsqldb</artifactId>
      <version>1.8.0.7</version>
    </dependency>
    
  

As no remote repository contains JPA Security yet, we need to install it to our local maven-repository, too. If you don't already have, you may download the jpasecurity-core-0.4.0.jar and the jpasecurity-jpa-0.4.0.jar here. We install it with the following command:

mvn install:install-file -DgroupId=net.sf.jpasecurity -DartifactId=jpasecurity -Dversion=0.4.0 -Dpackaging=jar -Dfile=/path/to/jpasecurity-0.4.0.jar
  

Note again that you have to provide the absolute path to your jpa-security-0.4.0.jar.


Previous: Basic Setup Up: Prerequisites Next: Tutorial