How to use "uniqueVersion" attribute in maven-publisher plugin
I have a grails project with maven-publisher plugin working. It's good to deploy war to a company-wide maven repository, but I'd like to keep only the latest version of a snapshot in the maven repository.
In maven projects, I could do this.
<distributionManagement>
<snapshotRepository>
<uniqueVersion>false</uniqueVersion>
<id>snapshot.mycompany.com.au</id>
<name>TVL Snapshot Repository</name>
<url>dav:http://maven.mycompany.com.au/snapshot</url>
</snapshotRepository>
</distributionManagement>
In my grails project, I tried this:
grails.project.dependency.distribution = {
remoteRepository(id: "snapshot.mycompany.com.au", url: "http://maven.mycompany.com.au/snapshot", uniqueVersion: false)
}
That didn't work.
When I ran grails maven-deploy --repository=snapshot.mycompany.com.au I got the following error message:
Error deploying artifact: remoteRepository doesn't support the "uniqueVersion" attribute
Have you specified a configured repository to deploy to (--repository argument) or specified distributionManagement in your POM?
When I didn't use the uniqueVersion attribute, like the following:
grails.project.dependency.distribution = {
remoteRepository(id: "snapshot.mycompany.com.au", url: "http://maven.mycompany.com.au/snapshot")
}
It was working fine, although, of course, the repository was keeping every single unique version of war files deployed.
My guess is that this functionality is not开发者_如何学Go implemented in maven-publisher plugin yet, but I thought it's worth checking with the experts first, and see if there's any work around.
Thanks.
精彩评论