uploadArchives to Apache Archiva does not upload pom-file

I have been trying since yesterday to solve this problem.

uploadArchives task gets only jar-files uploaded to Apache Archiva but not the pom-file!! pom/file exists (poms/pom-default.xml)

What am i doing wrong?!! Here the lines from build.gradle.

dependencies {

deployerJars ‘org.apache.maven.wagon:wagon-webdav-jackrabbit:2.2’

… } … uploadArchives {

repositories.mavenDeployer {

configuration = configurations.deployerJars

repository(url: “http://repo-name:4711/path/to/repository/internal/”) {

authentication(userName: “xxxx”, password: “xxx”)

}

pom {

version = ‘1.0’

groupId = ‘com.group.foo’

packaging = ‘jar’

artifactId = ‘some-nice-artifact-name’

}

} }

I would really appreciate any help!!!

Try setting the group, version and artifactId on your project instead of on the ‘pom’. You should be able to do something like:

group='com.group.foo'
version='1.0'
archivesBaseName='some-nice-artifact-name'

I’ve finally figured it out!! :smiley:

In build.gradle there was a “jar” configuration:

jar {

baseName ‘some-nice-name’

version ‘1.0’

classifiert ‘dev’ }

after I commented this out, it worked!!!

I have no idea why, but now i feel good. :slight_smile:

@Daz DeBoer Thank you very much for your reply! It helped me not directly but it gave me a hint to the right direction.

@ Gradle Developer: Guys just keep on developing. I love gradle! :slight_smile:

Now it works with pom as well!

pom {

version = ‘1.0’

groupId = ‘com.group.foo’

packaging = ‘jar’

artifactId = ‘some-nice-artifact-name’

}