archetype-resources.readme.md Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of spring-mvc-react-archetype
Show all versions of spring-mvc-react-archetype
A Maven Archetype for projects using Spring MVC, and React + Redux.
#set( $symbol_pound = '#' )
${symbol_pound} ${projectName}
This is a [Spring MVC](https://spring.io) project using [Thymeleaf](http://www.thymeleaf.org/) templates for the views, created with the use of the [Spring MVC with Thymeleaf Maven Archetype](https://github.com/Bernardo-MG/spring-mvc-react-maven-archetype). It will ease the development of new Spring MVC projects, setting it up for CI through the use of three free services: [Github](https://github.com/), [Travis](https://travis-ci.org) and [Bintray](https://bintray.com/).
Before beginning with the new project there are a few things which should be edited:
- This readme's description has to be adapted to the new project.
- Project info on the POM should be checked.
- The various links on the readme, POM and Maven site (for repositories, issues, etc) should be verified.
- The documentation on the project's [Maven Site](https://maven.apache.org/plugins/maven-site-plugin/) has to be written.
- The license, if not using the MIT one, should be changed. Remember that this is referenced on the POM, readme and LICENSE files.
Note that the Maven site is using the [Docs Maven Skin](https://github.com/Bernardo-MG/docs-maven-skin), which will have a few configuration requirements of its own.
[![Maven Central](https://img.shields.io/maven-central/v/${groupId}/${artifactId}.svg)][maven-repo]
[![Bintray](https://api.bintray.com/packages/${repoUserId}/maven/${artifactId}/images/download.svg)][bintray-repo]
[![Release docs](https://img.shields.io/badge/docs-release-blue.svg)][site-release]
[![Development docs](https://img.shields.io/badge/docs-develop-blue.svg)][site-develop]
[![Release javadocs](https://img.shields.io/badge/javadocs-release-blue.svg)][javadoc-release]
[![Development javadocs](https://img.shields.io/badge/javadocs-develop-blue.svg)][javadoc-develop]
${symbol_pound}${symbol_pound} Features
The project by default comes with a useful series of features:
- Preconfigured POM to begin developing a new [Spring MVC](https://spring.io) project.
- Initial sample project including working persistence and exception handling
- Integration with [Thymeleaf](http://www.thymeleaf.org/) for the view templates.
- Using [Bootstrap](http://getbootstrap.com/) for the UI.
- Using [Liquibase](http://www.liquibase.org/) for database versioning.
- Integration with [Jasper Reports](http://community.jaspersoft.com/) for generating PDFs.
- Prepared for [Travis CI](https://travis-ci.org/), including configuration files and deployment scripts. Check the [Archetype documentation](http://docs.bernardomg.com/maven/library-maven-archetype) to find out more.
- Unit and integration tests suites ready to be run with [JUnit](http://junit.org) just by using the Maven test and verify commands.
- A Maven site, using the [Docs Maven Skin](https://github.com/Bernardo-MG/docs-maven-skin), to contain the documentation, the Javadocs and several reports.
- A bunch of useful files, such as readme, gitignore and gitattributes.
${symbol_pound}${symbol_pound} Documentation
Documentation is always generated for the latest release, kept in the 'master' branch:
- The [latest release documentation page][site-release].
- The [latest release Javadoc site][javadoc-release].
Documentation is also generated from the latest snapshot, taken from the 'develop' branch:
- The [the latest snapshot documentation page][site-develop].
- The [latest snapshot Javadoc site][javadoc-develop].
The documentation site is actually a Maven site, and its sources are included in the project. If required it can be generated by using the following Maven command:
```
mvn verify site -P h2,jetty,db-properties,development
```
The verify phase is required, otherwise some of the reports won't be generated.
${symbol_pound}${symbol_pound} Usage
The application is coded in Java, using Maven to manage the project.
${symbol_pound}${symbol_pound}${symbol_pound} Prerequisites
The project has been tested on the following Java versions:
* JDK 8
All other dependencies are handled through Maven, and noted in the included POM file.
${symbol_pound}${symbol_pound}${symbol_pound} Profiles
Maven profiles are included for setting up the database and an embedded server.
| Profile | Database |
|----------|-----------------------|
| h2 | H2 in-memory database |
| mysql | MySQL database |
| postgres | PostgreSQL database |
| Profile | Server |
|----------|--------------------------|
| jetty | Jetty embedded server |
| tomcat7 | Tomcat 7 embedded server |
| Profile | Server |
|-------------|--------------------------|
| development | Development settings |
| release | Release settings |
| Profile | Server |
|---------------|---------------------------------------------------|
| db-properties | DB authentication info taken from properties file |
${symbol_pound}${symbol_pound}${symbol_pound} Installing
The project can be installed by creating the war file and deploying it into a server.
${symbol_pound}${symbol_pound}${symbol_pound} Running
To run the project locally in an embedded server just use the following Maven command for deploying to Jetty with an H2 in-memory database:
```
mvn jetty:run-war -P h2,jetty,db-properties,development
```
An embedded Tomcat can be used through this other profile:
```
mvn tomcat7:run-war -P h2,tomcat7,db-properties,development
```
With this the project will be accessible at [http://localhost:8080/].
${symbol_pound}${symbol_pound}${symbol_pound} Running the tests
The project requires a database and a server for being able to run the integration tests.
Just like running the project, an embedded server with an in-memory database can be used:
```
mvn verify -P h2,jetty,db-properties,development
```
${symbol_pound}${symbol_pound}${symbol_pound} Packaging the WAR
When creating the WAR file the database connection credentials should be read from the environment:
```
mvn package -P production,mysql -D database.auth.source=env
```
Check the documentation for more information.
${symbol_pound}${symbol_pound} Collaborate
Any kind of help with the project will be well received, and there are two main ways to give such help:
- Reporting errors and asking for extensions through the issues management
- or forking the repository and extending the project
${symbol_pound}${symbol_pound}${symbol_pound} Issues management
Issues are managed at the GitHub [project issues tracker][issues], where any Github user may report bugs or ask for new features.
${symbol_pound}${symbol_pound}${symbol_pound} Getting the code
If you wish to fork or modify the code, visit the [GitHub project page][scm], where the latest versions are always kept. Check the 'master' branch for the latest release, and the 'develop' for the current, and stable, development version.
${symbol_pound}${symbol_pound} License
The project has been released under the [MIT License][license].
[bintray-repo]: https://bintray.com/${repoUserId}/maven/${artifactId}/view
[maven-repo]: http://mvnrepository.com/artifact/${groupId}/${artifactId}
[issues]: https://github.com/${repoUserId}/${artifactId}/issues
[javadoc-develop]: ${urlSiteDevelop}/${artifactId}/apidocs
[javadoc-release]: ${urlSiteRelease}/${artifactId}/apidocs
[license]: http://www.opensource.org/licenses/mit-license.php
[scm]: https://github.com/${repoUserId}/${artifactId}
[site-develop]: ${urlSiteDevelop}/${artifactId}
[site-release]: ${urlSiteRelease}/${artifactId}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy