-
-
Notifications
You must be signed in to change notification settings - Fork 6
2 Dependencies
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>org.jpasecurity</groupId>
<artifactId>jpasecurity</artifactId>
<version>1.0.0-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>5.1.0.Final</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>Currently there is no JPA Security release available in the maven central repository. You may add the dependency from github as follows:
Open the JitPack web page, paste the git-url of the JPA Security project and click the 'Look up' button.
JitPack will list the currently available versions of JPA Security. Click the 'Get it' button of your favourite beta version and JitPack will generate the github dependencies for some build management tool, e.g. maven.
In the maven pom add the following repository behind the dependencies part:
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>Then add the generated dependency entry to your pom. Example:
<dependency>
<groupId>com.github.ArneLimburg</groupId>
<artifactId>jpasecurity</artifactId>
<version>1.0.0.Beta5</version>
</dependency>Now you can build your project including the JPA Security dependency:
mvn package