build.gradle - Gradle > How to deploy a JAR with only its needed dependencies jars to a remote computer -


i new gradle user. task build gradle based project , copy final jar along dependencies jars remote host.

my approach local build, , copy dependencies jars caches local directory gradle task, looks like:

task copydependencies(type: copy) {   configurations.runtime   "build/libs/deps" } 

but task copies dependencies, including transitive dependencies target directory; moreover, runtime group include compile dependencies default. exclude transitive dependencies, takes great amount of space , compile time dependencies jars. there solution?

at last plan copy generated jar , dependencies jars remote host means of ssh, guess there should way directly finish means of gradle task

faithfully hope can give useful hint

you need create fatjar, can find example on how here:

building uberjar gradle

for copying remote directory can example using ant task here :how copy directory via scp within gradle task?

or alternatively can use exec task external tool (scp example) : https://docs.gradle.org/current/dsl/org.gradle.api.tasks.exec.html

hope helps


Comments

Popular posts from this blog

php - Invalid Cofiguration - yii\base\InvalidConfigException - Yii2 -

How to show in django cms breadcrumbs full path? -

ruby on rails - npm error: tunneling socket could not be established, cause=connect ETIMEDOUT -