title: gradle publish jars with different classifiers, dependency missing
body: <p>Gradle new maven-publish plugin:</p>
  
  <p>For multiple jars with different classifiers, e.g.,</p>
  
  <p>source sets</p>
  
  <pre><code>src/foo/java
  src/bar/java
  
  dependencies {
      fooCompile group: 'org.slf4j', name: 'slf4j-api', version: '1.7.25'
      barCompile sourceSets.foo.output
  }
  </code></pre>
  
  <p>Jars to build:</p>
  
  <pre><code>productName-1.0-foo.jar
  productName-1.0-bar.jar
  </code></pre>
  
  <p>bar.jar has compile dependency on foo jar.</p>
  
  <p>Gradle:</p>
  
  <pre><code>publishing {
      publications {
          mavenJava(MavenPublication) {
              groupId 'com.example'
              artifactId 'productName'
              version '1.0'
  
              artifact fooJar {
                  classifier 'foo'
              }
  
              artifact barJar {
                  classifier 'bar'
              }
          }
      }
  
      publishing {
          repositories {
              maven {
                  url "$buildDir/repo"
              }
          }
      }
  }
  </code></pre>
  
  <p>The published repository:</p>
  
  <pre><code>build/repo/com/example/productName/1.0/productName-1.0-foo.jar
  build/repo/com/example/productName/1.0/productName-1.0-bar.jar
  build/repo/com/example/productName/1.0/productName-1.0.pom
  </code></pre>
  
  <p>Only one pom without any dependency.</p>
  
  <p>Now separate these with different artifactId (s)</p>
  
  <pre><code>publishing {
      publications {
          foo(MavenPublication) {
              groupId 'com.example'
              artifactId 'productName-foo'
              version '1.0'
  
              artifact fooJar {
  
              }
          }
  
          bar(MavenPublication) {
              groupId 'com.example'
              artifactId 'productName-bar'
              version '1.0'
  
              artifact barJar {
  
              }
          }
      }
  
      publishing {
          repositories {
              maven {
                  url "$buildDir/repo"
              }
          }
      }
  }
  </code></pre>
  
  <p>Each jar gets its own POM:</p>
  
  <pre><code>build/repo/com/example/productName-foo/1.0/productName-foo-1.0.jar
  build/repo/com/example/productName-foo/1.0/productName-foo-1.0.pom
  
  build/repo/com/example/productName-bar/1.0/productName-bar-1.0.jar
  build/repo/com/example/productName-bar/1.0/productName-bar-1.0.pom
  </code></pre>
  
  <p>Two issues:</p>
  
  <ol>
  <li>the classifier (foo, bar) is not after version in jar name.</li>
  <li>the generated POM.xml files for foo and bar do not have dependency.</li>
  </ol>