Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ahmed82/multi_module_maven
Multi Module Maven project generating one build WAR file using Spring Boot Framework
https://github.com/ahmed82/multi_module_maven
docker heroku multimaven springboot vuejs
Last synced: 5 days ago
JSON representation
Multi Module Maven project generating one build WAR file using Spring Boot Framework
- Host: GitHub
- URL: https://github.com/ahmed82/multi_module_maven
- Owner: ahmed82
- License: apache-2.0
- Created: 2020-04-19T13:14:48.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-02-04T21:48:20.000Z (almost 2 years ago)
- Last Synced: 2023-08-10T07:47:01.112Z (over 1 year ago)
- Topics: docker, heroku, multimaven, springboot, vuejs
- Language: Vue
- Size: 2.97 MB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Security: SECURITY.md
Awesome Lists containing this project
README
![Java CI with Maven](https://github.com/ahmed82/Multi_Module_Maven/workflows/Java%20CI%20with%20Maven/badge.svg)
[![Website shields.io](https://img.shields.io/website-up-down-green-red/http/shields.io.svg)](https://heroku-spring-vuejs.herokuapp.com)
[![HitCount](http://hits.dwyl.com/ahmed82/Multi_Module_Maven.svg)](http://hits.dwyl.com/ahmed82/Multi_Module_Maven)
[![JavaScript Style Guide: Good Parts](https://img.shields.io/badge/code%20style-goodparts-brightgreen.svg?style=flat)](https://github.com/dwyl/goodparts "JavaScript The Good Parts")
[![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://github.com/ahmed82/Multi_Module_Maven/)## Multi Module Maven Project.
### 1. Backend (Java J2EE JEE / Spring Boot Framework)
### 2. Frontend (Vue JS Cli 3)
## Project setup```
spring-boot-vuejs
├─┬ backend → backend module with Spring Boot code
│ ├── src
│ └── pom.xml
├─┬ frontend → frontend module with Vue.js code
│ ├── src
│ └── pom.xml
└── pom.xml → Maven parent pom managing both modules
```#### Frontend maven plugin
ref https://github.com/eirslett/frontend-maven-plugin
### Test the frontend only:
[cd into frontend directory and run CMD]
```
$ npm run serve
```## Run the application:
on the application root:
```
$ mvn clean install
```Run our complete Spring Boot App:
```
mvn --projects backend spring-boot:run
```# Heroku
## Deployed in heroku
using Heroku Cli
```
heroku create
```https://quiet-island-29743.herokuapp.com/ | https://git.heroku.com/quiet-island-29743.git
```
git remote add heroku https://git.heroku.com/quiet-island-29743.git
```
Rename the created application:
```
heroku apps:rename --app quiet-island-29743 heroku-spring-vuejs
```
### Deploy the application to heroku:
```
git push heroku master
```
https://devcenter.heroku.com/articles/getting-started-with-java#deploy-the-app
```
heroku ps:scale web=1
heroku open
heroku logs --tail
```
## Procfile
Heroku apps use "Procfile" file to declare what command should be executed to start the application.
```
web: java -jar target/java-getting-started-1.0.jar
web: java -Dserver.port=$PORT -jar backend/target/backend-2.6.2020.war
```Application like:
https://heroku-spring-vuejs.herokuapp.com/Scale the app
```
heroku ps:scale web=0
heroku ps:scale web=1
```
### system.properties
Indicates the version of Java to use (Heroku supports many different versions).
```
java.runtime.version=1.8
```
> You can [try out your Heroku app locally](https://devcenter.heroku.com/articles/heroku-local)! Just create a .env-File with all your Environment variables and run `heroku local`!
## Automation
1 Connect the Github repository to the Heroku project
2 Use Heroku Pipelines feature, where we do get a full Continuous Delivery pipeline
The pipeline setup:# Automation - Continuous-integration
In order to run the Automated build we need CI server.
we can use Travis CI
or
GitHub Action -> which what I use in the project.In .github/workflows, add a .yml or .yaml file for your workflow. .github/workflows/continuous-integration-workflow.yml.
https://help.github.com/en/actions/configuring-and-managing-workflows/configuring-a-workflow
https://dashboard.heroku.com/apps/
test pull request