gradle-one-jar | jar project is a Gradle plugin | Plugin library
kandi X-RAY | gradle-one-jar Summary
kandi X-RAY | gradle-one-jar Summary
This plugin rolls up your current project's jar and all of its dependencies into the the layout expected by One-JAR, producing a single runnable fat-jar, similar to the following:.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of gradle-one-jar
gradle-one-jar Key Features
gradle-one-jar Examples and Code Snippets
Community Discussions
Trending Discussions on gradle-one-jar
QUESTION
I've got a simple project in Gradle 4.6 and would like to make an executable jar of it. I've tried shadow
, gradle-fatjar-plugin
, gradle-one-jar
, spring-boot-gradle-plugin
plugins but neither of them adds my dependencies declared as implementation
(I don't have any compile
ones). It works with compile
e.g. for gradle-one-jar
plugin but I would like to have implementation
dependencies.
Thank you very much!
...ANSWER
Answered 2019-Mar-18 at 20:59You can use the following code.
QUESTION
I am running some app with JavaFX 11 (OpenFX). The app is written in IntellijIdea and built with gradle. When running in IDE everything's ok. When building a jar it builds successfully but when I try to execute it I get an error:
...ANSWER
Answered 2019-Jan-22 at 20:22The main problem you have in your build is related to how you define the dependencies with implementation
(not compile
anymore), while on the other hand, you build your jar based on configurations.compile
.
Since implementation
and compile
are not the same, configurations.compile
contains only the classes of your project, not the third party dependencies (including JavaFX).
Running the build task will generate a very small fat jar of 3 KB. Obviously this jar misses all the classes from the dependencies.
Solution
Replace in your jar task configurations.compile
with configurations.compileClasspath
:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install gradle-one-jar
Jochen Schalanda (joschi)
Christian S. (squiddle)
Ben Manes (ben-manes)
Adam Walczak (walec51)
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page