title: Gradle's Maven Publish plugin not publishing POM or proper version to Maven Local
body: <p>I am trying to get the Gradle <a href="https://docs.gradle.org/current/userguide/publishing_maven.html" rel="nofollow noreferrer">Maven Publish Plugin</a> to publish a snapshot version of my Java library to my local Maven repo such that:</p>
  
  <ol>
  <li>The version of the jar is <code>1.0.0.SNAPSHOT-&lt;timestamp&gt;</code>, where <code>&lt;timestamp&gt;</code> is the current system time in millis (similar to something <em>like</em> <code>System.currentTimeInMillis()</code>); and</li>
  <li>I log to STDOUT/console the full name of the jar being published, including the version above; and</li>
  <li>A properly-formatted pom.xml is published to Maven local alongside the jar, so that any other Gradle/Maven projects can "pull it down" locally and fetch its transitive dependencies properly</li>
  </ol>
  
  <p>My best attempt so far:</p>
  
  <pre><code>plugins {
      id 'java-library'
      id 'maven-publish'
  }
  
  dependencies {
      compile(
          'org.hibernate:hibernate-core:5.0.12.Final'
          ,'com.fasterxml.jackson.core:jackson-core:2.8.10'
          ,'com.fasterxml.jackson.core:jackson-databind:2.8.10'
          ,'com.fasterxml.jackson.core:jackson-annotations:2.8.0'
      )
  
      testCompile(
          'junit:junit:4.12'
      )
  }
  
  repositories {
      jcenter()
      mavenCentral()
  }
  
  sourceCompatibility = 1.8
  targetCompatibility = 1.8
  group 'com.me'
  
  jar {
      baseName = 'my-lib'
      version = '1.0.0-SNAPSHOT'
  }
  
  publishing {
      publications {
          mavenJava(MavenPublication) {
              from components.java
          }
      }
  }
  </code></pre>
  
  <p>However, with this setup, when I run <code>./gradlew publishToMavenLocal</code>:</p>
  
  <ul>
  <li>I do see the jar being deployed to <code>~/.m2/repository/com/me/my-lib/</code> but without a pom.xml and no <code>1.0.0.SNAPSHOT</code> version appended to it</li>
  <li>I don't even know how/where I would append the timestamp onto the version</li>
  <li>I don't even know how/where I would do a <code>println(...)</code> to report the full name of the jar being published</li>
  </ul>
  
  <p><strong>Any ideas?</strong></p>