Skip to content

diplodevops/ejemplo-maven

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Getting Started

Windows

Compile Code

  • ./mvnw.cmd clean compile -e

Test Code

  • ./mvnw.cmd clean test -e

Jar Code

  • ./mvnw.cmd clean package -e

Run Jar

  • Local: ./mvnw.cmd spring-boot:run
  • Background: nohup bash mvnw.cmd spring-boot:run &

Testing Application

Linux

Compile Code

  • ./mvnw clean compile -e

Test Code

  • ./mvnw clean test -e

Jar Code

  • ./mvnw clean package -e

Run Jar

  • Local: ./mvnw spring-boot:run
  • Background: nohup bash mvnw spring-boot:run &

Testing Application

Using Docker to test this app.

⚠️ Is mandatory to use Powershell in Windows

Docker in Windows

### Compile Code
docker run -it --rm -v ${pwd}:/code --workdir /code maven mvn clean compile -e

### Test Code
docker run -it --rm -v ${pwd}:/code --workdir /code maven mvn clean test -e

### Jar Code
docker run -it --rm -v ${pwd}:/code --workdir /code maven mvn clean package -e

### Run Jar
docker run -it --rm -p 8081:8081  -v ${pwd}:/code --workdir /code maven mvn spring-boot:run

Docker in Linux

### Compile Code
docker run -it --rm -v $(pwd):/code --workdir /code maven mvn clean compile -e

### Test Code
docker run -it --rm -v $(pwd):/code --workdir /code maven mvn clean test -e

### Jar Code
docker run -it --rm -v $(pwd):/code --workdir /code maven mvn clean package -e

### Run Jar
docker run -it --rm -p 8081:8081  -v $(pwd):/code --workdir /code maven mvn spring-boot:run

About

Ejemplo maven para crear un Jenkinsfile

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages