https://github.com/choonchernlim/choonchernlim-archetype-webapp
Groovy-based Maven WAR archetype using Spring Boot 2.x with the capability of generating static code analysis reports for Continuous Integration servers.
https://github.com/choonchernlim/choonchernlim-archetype-webapp
groovy java maven maven-archetype react single-page-app web-app webpack
Last synced: 3 months ago
JSON representation
Groovy-based Maven WAR archetype using Spring Boot 2.x with the capability of generating static code analysis reports for Continuous Integration servers.
- Host: GitHub
- URL: https://github.com/choonchernlim/choonchernlim-archetype-webapp
- Owner: choonchernlim
- License: mit
- Created: 2015-07-24T14:19:48.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2022-12-07T17:42:26.000Z (over 3 years ago)
- Last Synced: 2025-12-15T04:44:36.144Z (7 months ago)
- Topics: groovy, java, maven, maven-archetype, react, single-page-app, web-app, webpack
- Language: JavaScript
- Homepage:
- Size: 10.9 MB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 20
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
# choonchernlim-archetype-webapp
Groovy-based Maven WAR archetype using Spring Boot with the capability of generating static code analysis reports for Continuous Integration servers.
### Back-End Stack
Handles app security and generates Restful web services for front-end stack to consume. Spring Boot serves as the backbone of this archetype.
| Key Dependencies | Description |
|-------------------------------------------------------------------------------|-------------------------------------------------------------------------|
|[Swagger](https://swagger.io/swagger-ui/) |RESTful web services documentation tool and viewer |
|[Apache Tomcat](https://tomcat.apache.org/) |Embedded JEE server (for local development) |
|[H2](http://www.h2database.com/html/main.html) |Embedded database (for local development) |
|[Spring](http://projects.spring.io/spring-framework/) |Dependency injection, handles plumbing code |
|[Spring Security](http://projects.spring.io/spring-security/) |App security |
|[Spring Data JPA](http://projects.spring.io/spring-data-jpa/) |JPA-based repositories |
|[Hibernate](http://hibernate.org/orm/) |ORM framework |
|[Spock](https://github.com/spockframework/spock) |Groovy test cases |
|[Spring Boot CI](https://github.com/choonchernlim/spring-boot-ci) |Static code analysis reports for Continuous Integration servers |
### Front-End Stack
True single-page app from [front-end-stack](https://github.com/choonchernlim/front-end-stack).
## Prerequisites
* Java version = 8.
* Maven version >= 3.3.x.
## Latest Release
```xml
com.github.choonchernlim
choonchernlim-archetype-webapp
2.0.0
```
For example:
```bash
mvn archetype:generate
-DinteractiveMode=false
-DarchetypeGroupId=com.github.choonchernlim
-DarchetypeArtifactId=choonchernlim-archetype-webapp
-DarchetypeVersion=2.0.0
-DgroupId=com.github.choonchern.testProject
-DartifactId=testProject
-Dversion=1.0.0-SNAPSHOT
```
## Getting Started
* Run `mvn clean spring-boot:run -Drun.profiles=local`.
* Open `https://localhost:8443` in browser.
* Follow further instruction on that main page.
## Spring Profiles
* This archetype is preconfigured with 3 Spring Profiles:-
* `middleware` (default) - For generated WAR deployed in Middleware servers using JNDI data source. This is the default profile if `spring.profiles.active` is not specified.
* `local` - For local development using H2 data source.
* `test` - For running test cases.
## How To...
### Start Embedded Tomcat Server for Back-End Development
* Run `mvn clean spring-boot:run -Drun.profiles=local`.
* By default, this will perform `yarn build` to bundle the front-end JS files first before starting the server.
* If there are no changes on front-end, you can speed it up by running `mvn clean spring-boot:run -Drun.profiles=local -Pskip-frontend-build`
* Open `https://localhost:8443` in browser.
### Start Webpack Dev Server for Front-End Development
* Change directory to `src/main/frontend` dir.
* Run `yarn start`.
* Open `https://localhost:8080` in browser.
### Create WAR File
* Run `mvn clean package`.
### Configure Jenkins Job
* Create a "Freestyle project" job.
* Under "Add build steps, select "Invoke top-level Maven targets".
* Goals: `-U clean test site`