I am using shadowJar in my java project. I would like to push the outcome into artifactory.
My gradle script look like this, I am not sure how to connect the dots:>
The API has changed in the shadow plugin, this works for me with com.github.jengelman.gradle.plugins:shadow:2.0.1: http://imperceptiblethoughts.com/shadow/#publishing_shadow_jars
5. Publishing Shadow JARs
5.1. Publishing with Maven-Publish Plugin
The Shadow plugin will automatically configure the necessary tasks
in the presence of Gradle’s maven-publish plugin. The plugin provides
the component method from the shadow extension to configure the
publication with the necessary artifact and dependencies in the
POM file.
Publishing a Shadow JAR with the Maven-Publish Plugin
apply plugin: 'java'
apply plugin: 'maven-publish'
apply plugin: 'com.github.johnrengelman.shadow'
publishing {
publications {
shadow(MavenPublication) { publication ->
project.shadow.component(publication)
}
}
repositories {
maven {
url "http://repo.myorg.com"
}
}
}