I have a Spring MVC project using Spring Boot 1.5.2 with Gradle Buildship in Spring Tool Suite.
- How do I create a JAR file from my source only which will run in another server and download the required dependencies there?
- How do I create a fat JAR with all of the source files and the dependencies?
My gradle.build
file is:
buildscript {
ext {
springBootVersion = '1.5.2.RELEASE'
}
repositories {
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
}
}
apply plugin: 'eclipse'
apply plugin: 'org.springframework.boot'
apply plugin: 'application'
mainClassName = "com.jtv.elastic.mvc.ElasticSpringApplication"
sourceCompatibility = 1.8
repositories {
mavenCentral()
}
dependencies {
compile('org.springframework.boot:spring-boot-starter-web')
testCompile('org.springframework.boot:spring-boot-starter-test')
}