Maven Pom.xml must contain
 
[plain] view plain copy   
 
  
  - <packaging>jar</packaging>
[HTML] view plain copy   
 
 
 - <build>  
- <plugins>  
- <plugin>  
- <groupId>org.springframework.boot</groupId>     
- <artifactid>spring-boot-maven-plugin</artifactid>   
- <configuration>  
- <fork>true</fork>     
- </configuration>  
- </plugin>  
- </plugins>  
- </Build> 
Full Pox.xml
 
[HTML] view plain copy   
 
 
 - <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi= "http://www.w3.org/2001/ Xmlschema-instance "    
- xsi:schemalocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"  >  
- <modelversion>4.0.0</modelversion>     
- <groupId>com.feedback</groupId>     
- <artifactid>feedback-service</artifactid>    
- <version>0.1.0</version>     
- <packaging>jar</packaging>     
- <properties>  
- <java.version>1.8</java.version>     
- </Properties>  
- <parent>  
- <groupId>org.springframework.boot</groupId>     
- <artifactid>spring-boot-starter-parent</artifactid>   
- <version>1.3.0.release</version>     
- </Parent>  
- <dependencies>  
- <!--Spring boot --
- <dependency>  
- <groupId>org.springframework.boot</groupId>     
- <artifactid>spring-boot-starter-web</artifactid>     
- </Dependency>  
- <dependency>  
- <groupId>org.springframework.boot</groupId>     
- <artifactid>spring-boot-starter-data-jpa</artifactid>  
- </Dependency>  
- <!--MySQL database --
- <dependency>  
- <groupId>mysql</groupId>     
- <artifactid>mysql-connector-java</artifactid>     
- </Dependency>  
- <!--Commons-lang --
- <dependency>  
- <groupId>commons-lang</groupId>     
- <artifactid>commons-lang</artifactid>     
- <version>2.6</version>     
- </Dependency>  
- </Dependencies>  
- <!--jar --
- <build>  
- <plugins>  
- <plugin>  
- <groupId>org.springframework.boot</groupId>     
- <artifactid>spring-boot-maven-plugin</artifactid>   
- <configuration>  
- <fork>true</fork>     
- </configuration>  
- </plugin>  
- </plugins>  
- </Build>  
- </Project> 
Go to the project directory to run: MVN clean Package
The jar is generated in the target folder under the project directory
The resulting jar file is in the: D:\programmer\eclipse\feedback-service\target folder
Java-jar run the jar package to
Java-jar using an external configuration file when running the jar package application.properties
 Spring Boot Maven package executable jar file!