I have gradle build which uploads generated jar to internal Nexus repository. When I use command uploadArchive, it completes successfully, but on repository I can see pom with no dependency details even though project has dependency on third party libraries.
Below is my build.gradle
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'maven'
version = '1.0.0-SNAPSHOT'
group ='biz.neustar'
sourceCompatibility = 1.6
targetCompatibility = 1.6
archivesBaseName ='GDIDAO'
sourceSets.main.java.srcDirs = ["src"]
sourceSets.test.java.srcDirs = ["testSrc"]
repositories {
maven { url "http://nexussever:8080/nexus/content/groups/public/" } }
dependencies {
compile 'biz.neustar:gdi-dao-default-impl:1.0',
'com.oracle:jdbc-connector:1.4',
'log4j:log4j:1.2.14',
'commons-logging:commons-logging:1.1.1',
'commons-lang:commons-lang:2.4'
testCompile "junit:junit:4.11"
}
uploadArchives {
repositories {
mavenDeployer {
repository(url: "http://nexussever:8080/nexus/content/repositories/releases"){
authentication( userName: "username", password: "password")
}
snapshotRepository(url: "http://nexussever:8080/nexus/content/repositories/snapshots"){
authentication( userName: "username", password: "password")
}
}
}
}