Can the Maven plugin write the maven-metadata.xml "release" element?

I have studied the ‘Interacting with Maven repositories’ section of the user guide, but the referenced Maven Javadocs are useless. Web searches find other people trying to do the same and similar things, but only with Maven-heavy procedures.

See the release elements for Spring Security and for HyperSQL at http://search.maven.org/remotecontent?filepath=org/acegisecurity/acegi-security/maven-metadata.xml and http://search.maven.org/remotecontent?filepath=org/hsqldb/hsqldb/maven-metadata.xml

I want to regenerate the HyperSQL maven-metadata.xml so that the release reflects our current release. The Maven Mojo that I used to generate what is up there now takes a boolean parameter ‘updateReleaseInfo’, but it doesn’t work.

Any luck or resolution with this?

Not sure I understand the problem. ‘maven-metadata.xml’ should be updated automatically whenever a module is published. Do you have a use case for just updating the metadata, without publishing a module?

Hi Peter

I’m seeing the same issue

http://maven.apache.org/plugins/maven-deploy-plugin/deploy-file-mojo.html#updateReleaseInfo is set to false by default.

http://gradle.org/docs/current/groovydoc/org/gradle/api/artifacts/maven/MavenDeployer.html

doesn’t expose this flag so we can’t set it.

The metadata for my artifact from gradle snapshot isn’t updating the latest link.

1012 1012 1011 1012 1014 1015 1016 1017 20120323112657

I’d like to have called this flag here

uploadArchives {

repositories {

mavenDeployer {

uniqueVersion = false

updateReleaseInfo = true

configuration = mavenPublisherConfiguration

repository(url: RELEASES_URL) {

authentication(userName: USERNAME, password: SECRET)

}

I’m having a similar issue: http://forums.gradle.org/gradle/topics/gradle_upload_does_not_create_maven_metadata_xml

Still present in gradle-1.12. The release element is not updated.

Any thoughts on this ?

I am facing somewhat a same issue, The versioning section in metadata xml is not being updated by Gradle in nexus, When i used to use Maven it used to work, but after migrations its not.

< versioning>

< latest></ latest>

< release> </ release>

Would like some feedback on this.

This reply was created from a merged topic originally titled Creating a WebJar - gradle upload does not create maven-metadata.xml. I am creating a webjar with gradle. Everything works fine except gradle uploadWebjar does not create the necessary maven-metadata.xml

Here is my build.gradle:
-----------------------------------

<br /> apply plugin: 'java' <br /> apply plugin: 'maven' <br /> &#47;&#47;apply plugin: 'idea' <br /><br /> group = 'at&#46;mikemitterer' <br /> version = '0&#46;1&#46;2' &#47;&#47; gitExtendedVersion() &#47;&#47; Sample: 0&#46;5&#46;4-19 <br /><br /> buildDir = &quot;target/${version}/&quot; <br /><br /> ext { <br />
   webjarconfig = [ <br />
           staticHTMLFilesDir : &quot;web&quot;, <br />
           &#47;&#47;subDir : &quot;&quot; <br />
           subDir : &quot;webjars/myproject/${version}&quot; <br />
   ] <br /> } <br /><br /> configurations { <br />
   webjar <br /> } <br /><br /> task webjar(type: Zip) { <br />
   &#47;&#47; stores jar-file in &quot;target/${version}/distributions&quot; <br />
   extension 'jar' <br />
   classifier 'webjar' <br /><br />
   from (webjarconfig&#46;staticHTMLFilesDir) { <br />
       into(&quot;META-INF/resources/&quot; + webjarconfig&#46;subDir) <br />
   } <br /><br />
   outputs&#46;file archivePath <br /> } <br /><br /> artifacts { <br />
   webjar(webjar&#46;archivePath) { <br />
       type 'jar' <br />
       builtBy webjar <br />
   } <br /> } <br /><br /> uploadWebjar { <br />
   repositories { <br />
       mavenDeployer { <br />
           &#47;&#47; My local Maven repository <br />
           repository(url: uri(&quot;file:&#47;&#47;/Volumes/programming/Maven/private&#46;maven&#46;repository/&quot;)) <br /><br />
       } <br />
   } <br /> } <br />



My settings.gradle

<br /> rootProject&#46;name = 'webapp&#46;base&#46;ui' <br />



thx in advance

I’ve raised this as GRADLE-3113.

It’s not scheduled at this time. If anyone is interested in contributing a solution, please email the developer list so we can discuss how it should be solved.