Scaffold for vraptor 3.
gem install vraptor-scaffold --pre
Ensures that you already have installed:
-
Java 6
-
Maven 2
At the command line client:
-
vraptor new myapp
-
Change directory into myapp
-
vraptor scaffold product name:string value:double
-
vraptor start
At the command line client:
-
Running: mvn clean test
-
Code coverage: mvn clean cobertura:cobertura
The default web server is jetty but you can import the project in your favorite ide and run your project with tomcat or jboss as for example.
The only supported types for now are: boolean, double, float, short, integer, long, string and text.
When you run vraptor new command will be created a java web application with:
-
Vraptor3 = Controller
-
Jpa(Hibernate and Hibernate Validator) = ORM
-
Freemarker = Template Engine
-
Sitemesh = Decorator
-
Maven2 = Project Management
-
jQuery = JavaScript
-
Junit
-
Hamcrest
-
Mockito
src/main/java/app/controllers
Controllers will be placed here.
src/main/java/app/models
Models will be placed here.
src/main/java/app/repositories
Repositories will be placed here.
src/main/webapp
Web root folder.
src/main/webapp/decorators
Decorators will be placed here.
src/main/webapp/javascripts
JavaScripts will be placed here.
src/main/webapp/stylesheets
CSS will be placed here.
src/main/webapp/WEB-INF/views
Views will be placed here. Ex: product/index.ftl
src/test/java/app/controllers
Tests to controllers will be placed here.
src/test/java/app/models
Testes to models will be placed here.
src/test/java/app/repositories
Tests to repositories will be placed here.
-
Anothers build framework like ant, gradle and ivy.
-
More views generators like velocity, jsp and scaml.
-
More ORM generators with openJPA and TopLink.
-
Relationship(ManyToOne, OneToMany, etc) and date(LocalDate, LocalDateTime, LocalTime) support.
-
JPA2 support.
-
Fork the project.
-
Make your feature addition or bug fix.
-
Add tests for it. This is important so I don’t break it in a future version unintentionally.
-
Commit, do not mess with rakefile, version, or history. (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
-
Send me a pull request. Bonus points for topic branches.
– Rodolfo Liviero [rodolfoliviero@gmail.com] @rodolfoliviero
Copyright © 2010 Rodolfo Liviero. See LICENSE for details.