Maven
Basic Commands
create builds from Maven based Products:
1. mvn clean package
2. mvn clean install
Create build by Skip JNUIT Test
1. mvn clean install -Dmaven.test.skip=true
Create build for given profile
-P argument is meant for specifying profile to bundle the jars by taking profile specific configs, beans, classes. Following commands are used
$mvn clean install -P<profileName> Example
$mvn clean install -Padmin
note here admin is profile Name
Dependency to Auto Deploy on Change or update code:
Spring Boot 1.3 will ship with a brand new module called spring-boot-devtools
. The aim of this module is to try and improve the development-time experience when working on Spring Boot applications. <dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
</dependency>
Debug Maven Failure
$ mvn -X package
Passing Build Arguments or Build Variables: suppose in your pom variable defined for version and changes list as
<version>${revisionNo}-${changeList}</version>
> mvn clean install -DrevisionNo=2.1.0 -DchangeList=SNAPSHOT