VRaptor’s Plugins
Plugins are extensions that adds some feature to VRaptor core. It’s useful for some situations like access a database under JPA or Hibernate, to send e-mails and more.
VRaptor JPA
VRaptor plugin allow your app to inject EntityManager
and EntityManagerFactory
. And more: the plugin implements the Open EntityManager In View filter, that create a transaction when request starts and commits the transaction in the end. If an exception occurs, the plugin rollback the transaction for you.
If you want to use, you need only copy the jars for your app. Or if your project uses Maven, you need only to declare the plugin artifact as you can see below:
<dependency>
<groupId>br.com.caelum.vraptor</groupId>
<artifactId>vraptor-jpa</artifactId>
<version>4.0.5</version>
</dependency>
It’s very important that your persistence unit
is named default
, and the persistence.xml
located at src/main/resources/META-INF/
directory.
The plugin doesn’t delivery any provider. So you need to declare your prefered provider, like Hibernate.
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>4.3.0.Final</version> <!-- or another version compatible with JPA 2.1 -->
</dependency>
Or if you want to use Eclipselink:
<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>org.eclipse.persistence.jpa</artifactId>
<version>2.5.1</version>
</dependency>
VRaptor Hibernate
If you like to use Hibernate 4 instead of JPA you need to use vraptor-hibernate
plugin. This plugin have a similar behaviour that vraptor-jpa
, allowing you to inject Session
e SessionFactory
. The plugin also implements the Open Session In View pattern.
If you want to use, you need only copy the jars for your app. Or if your project uses Maven, you need only to declare the plugin artifact as you can see below:
<dependency>
<groupId>br.com.caelum.vraptor</groupId>
<artifactId>vraptor-hibernate</artifactId>
<version>4.0.4</version>
</dependency>
VRaptor Java 8
Plugin with support for Java 8, providing out of the box converters for Java Time classes (JSR-310), reflection parameter names, and more.
<dependency>
<groupId>br.com.caelum.vraptor</groupId>
<artifactId>vraptor-java8</artifactId>
<version>4.0.0.Final</version>
</dependency>
Simple mail
Allow you to send e-mail in an easy way.
<dependency>
<groupId>br.com.caelum.vraptor</groupId>
<artifactId>vraptor-simplemail</artifactId>
<version>4.1.0-RC4</version>
</dependency>
Joda-time
Joda-time is a pretty API to work with date and time. To use joda-time you need to use the plugin vraptor-jodatime
.
<dependency>
<groupId>br.com.caelum.vraptor</groupId>
<artifactId>vraptor-jodatime</artifactId>
<version>4.1.0-RC3</version>
</dependency>
VRaptor Error-Control
Allows you to real time control error messages sending them by email.
<dependency>
<groupId>br.com.caelum.vraptor</groupId>
<artifactId>vraptor-error-control</artifactId>
<version>4.0.2</version>
</dependency>
VRaptor Brutauth
Easy way to verify permission to access(authorization) a specific controller action.
<dependency>
<groupId>br.com.caelum.vraptor</groupId>
<artifactId>vraptor-brutauth</artifactId>
<version>4.0.4</version>
</dependency>
VRaptor QuartzJob
A simple Quartz scheduler
<dependency>
<groupId>br.com.caelum.vraptor</groupId>
<artifactId>vraptor-quartzjob</artifactId>
<version>4.0.7</version>
</dependency>
VRaptor Freemarker
Help you to render freemarker templates.
<dependency>
<groupId>br.com.caelum.vraptor</groupId>
<artifactId>vraptor-freemarker</artifactId>
<version>4.1.0-RC3</version>
</dependency>
VRaptor Dash
A dashboard with several tools for your vraptor project.
<dependency>
<groupId>br.com.caelum.vraptor</groupId>
<artifactId>vraptor-dash</artifactId>
<version>4.1.0-RC3</version>
</dependency>
VRaptor Authz
An alternative for access control (authorization) of your controller methods.
<dependency>
<groupId>br.com.caelum.vraptor</groupId>
<artifactId>vraptor-authz</artifactId>
<version>4.0.0-RC2</version>
</dependency>
VRaptor I18n
Solutions for using i18n on view
<dependency>
<groupId>br.com.caelum.vraptor</groupId>
<artifactId>vraptor-i18n</artifactId>
<version>4.2.0-RC4</version>
</dependency>
VRaptor Test
Allows you to quickly create integration or system tests.
<dependency>
<groupId>br.com.caelum.vraptor</groupId>
<artifactId>vraptor-test</artifactId>
<version>4.0.0</version>
</dependency>
VRaptor Paginator
Efficient pagination of your JPA/Hibernate data.
<dependency>
<groupId>br.com.caelum.vraptor</groupId>
<artifactId>vraptor-paginator</artifactId>
<version>4.0.0</version>
</dependency>
VRaptor Panettone
A typesafe template engine written in Java.
<dependency>
<groupId>br.com.caelum.vraptor</groupId>
<artifactId>vraptor-panettone</artifactId>
<version>4.0.0-RC9</version>
</dependency>
VRaptor Biscotti
I18n typesafe library. No more missing keys and exceptions for you and your client.
<dependency>
<groupId>br.com.caelum.vraptor</groupId>
<artifactId>vraptor-biscotti</artifactId>
<version>4.0.0-RC1</version>
</dependency>
VRaptor Routes
Extract and define custom routes on a properties
file.
<dependency>
<groupId>br.com.caelum.vraptor</groupId>
<artifactId>vraptor-routes</artifactId>
<version>4.1.0-RC3</version>
</dependency>
VRaptor Simple Validator
A simple and effective way to do programmatic validations.
<dependency>
<groupId>br.com.caelum.vraptor</groupId>
<artifactId>vraptor-simple-validator</artifactId>
<version>4.1.0-RC3</version>
</dependency>
VRaptor contrib
You can found some plugins made by our users on vraptor-contrib.