Spring boot where is my jar file

Spring boot where is my jar file



Spring boot makes it really easy to setup a simple app.
But it takes me longer to actually get a jar file which I can upload to a remote server.
I am using IntelliJ, no command line, and I use gradle. The application is running somehow out of Intellij. But where are the created files? Where is my jar from Bootjar?


buildscript
repositories
mavenCentral()

dependencies
classpath("org.springframework.boot:spring-boot-gradle-plugin:2.0.0.RELEASE")



apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'

bootJar
baseName = 'gs-spring-boot'
version = '0.1.0'


repositories
mavenCentral()


sourceCompatibility = 1.8
targetCompatibility = 1.8

dependencies
compile("org.springframework.boot:spring-boot-starter-web")

compile("org.springframework.boot:spring-boot-starter-actuator")

testCompile("org.springframework.boot:spring-boot-starter-test")

// add spring data repos
compile("org.springframework.boot:spring-boot-starter-data-jpa")

compile("org.postgresql:postgresql:42.2.4")

// REST interface
compile("org.springframework.boot:spring-boot-starter-data-rest")

// Security
compile("org.springframework.boot:spring-boot-starter-security")



Update: Added a picture of the project structure:



enter image description here



Update 2: Folder structure:



enter image description here




1 Answer
1



There will not be a jar created if you are just running this in your IDE. In order to do that, you need to run the gradle build (in your case) either from your IDE or the command line to get it to build it into a jar.



From the command line, go to your project directory and type this:


./gradlew build



This executes the gradle wrapper, which should download everything you need to run the build, and then executes the build.



You will then find your jar in build/lib


build/lib





Okay I opened cmd in the folder and called 'gradlew build'. Now I've got a build dir with the jar in /build/libs. Is this also possible from IntelliJ?
– user2366975
Aug 26 at 20:26







By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

𛂒𛀶,𛀽𛀑𛂀𛃧𛂓𛀙𛃆𛃑𛃷𛂟𛁡𛀢𛀟𛁤𛂽𛁕𛁪𛂟𛂯,𛁞𛂧𛀴𛁄𛁠𛁼𛂿𛀤 𛂘,𛁺𛂾𛃭𛃭𛃵𛀺,𛂣𛃍𛂖𛃶 𛀸𛃀𛂖𛁶𛁏𛁚 𛂢𛂞 𛁰𛂆𛀔,𛁸𛀽𛁓𛃋𛂇𛃧𛀧𛃣𛂐𛃇,𛂂𛃻𛃲𛁬𛃞𛀧𛃃𛀅 𛂭𛁠𛁡𛃇𛀷𛃓𛁥,𛁙𛁘𛁞𛃸𛁸𛃣𛁜,𛂛,𛃿,𛁯𛂘𛂌𛃛𛁱𛃌𛂈𛂇 𛁊𛃲,𛀕𛃴𛀜 𛀶𛂆𛀶𛃟𛂉𛀣,𛂐𛁞𛁾 𛁷𛂑𛁳𛂯𛀬𛃅,𛃶𛁼

Edmonton

Crossroads (UK TV series)