Install task use project name instead of jar.baseName for artifactId

Hi,

I would like to install (sub)projects to a local maven repository and then reference them in a build script, problem is that install task use wrong artifact names in the final POM file.

Gradle version is 2.6

project(':projectA') {
  jar.baseName = 'prefix-projectA'
}

project(':projectB') {
  jar.baseName = 'prefix-projectB'
  dependencies { compile project('projectA') }
}

When I call install task to install them to local maven repository the pom file for projectB looks like this:

<project ...>
 ...
 <artifactId>prefix-projectB</artifactId>
 <dependencies>
   <dependency>
     ...
     <artifactId>projectA</artifactId>
   </dependency>
 </dependencies>
</project>

Which can’t work as the jar file from projectA is actually called prefix-projectA-0.1.jar

Is this a bug or am I doing it wrong?

Thank you.

1 Like

Same happens with Ivy publish.