On Nov 6, 2008, at 2:17 PM, Phil Messenger wrote:
Hi,
I've been experimenting with the new Maven support in gradle for
deploying
artifacts, rather than using my own hacked up solution. I have a
"releaseSnapshot" task, which does what it says - tags a SVN repo
with a
version and uploads a snapshot to a remote repository.
I'm trying to do the "snapshot to a remote repository" thing with the
MavenUploader, with mixed success. I can get it to upload snapshots
and
increment the version etc:
[INFO] Retrieving previous build number from remote
Uploading:
miniweb/library/1.0.3-SNAPSHOT/library-1.0.3-20081106.131330-7.jar
to remote
Uploaded 28K
[INFO] Uploading project information for library
1.0.3-20081106.131330-7
[INFO] Retrieving previous metadata from remote
[INFO] Uploading repository metadata for: 'artifact miniweb:library'
[INFO] Retrieving previous metadata from remote
[INFO] Uploading repository metadata for: 'snapshot
miniweb:library:1.0.3-SNAPSHOT'
I need to get the build number - "7" in this case - from the upload
task. I
can't see a way for doing - am I blind or is it impossible at the
moment?
We delegate to the Ant Maven tasks for doing this. Reverse
engineering all the Maven meta-manipulation didn't look appealing and
that way we can guarantee 100 percent compatibility.
I had a short look at the source code of the Ant Maven tasks, but
there was no obvious way of getting the snapshot string. But I have
found also no way in my earlier Maven builds to get hold of the
snapshot string. Have you?
It would be cool to get the snapshot number. We could parse the log
output if all else doesn't work.
- Hans
--
Hans Dockter
Gradle Project lead
http://www.gradle.org
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email