It's all about the answers!

Ask a question

How do I publish a file for downloading through the web ui?


Toby Corbin (81136) | asked Jan 21 '08, 1:05 p.m.
Hi, can anyone point me at the piece of code I need to add to my build.xml so that I publish a file (created in my build.xml) for downloading through the web ui? I'm assuming that this is possible of course. I would like to be able to make downloads of my project available through the web interface.

Thanks

5 answers



permanent link
Ryan Manwiller (1.3k1) | answered Jan 21 '08, 4:38 p.m.
JAZZ DEVELOPER
Currently, there is not a way to automatically make downloads available via
the web ui.

There is some discussion of enabling downloads through the Build part of the
dashboard. See
https://jazz.net/jazz/resource/itemName/com.ibm.team.workitem.WorkItem/39986

This would enable access to downloads published with the team build ant
tasks such as:

<artifactFilePublisher buildResultUUID="${buildResultUUID}"
repositoryAddress="${repositoryAddress}"
userId="${userId}"
password="${password}"
verbose="true"
filePath="test.zip"
failOnError="true"
label="A test download" />



<taskdef name="artifactFilePublisher"
classname="com.ibm.team.build.ant.task.ArtifactFilePublisherTask"
/>

permanent link
Toby Corbin (81136) | answered Jan 22 '08, 5:02 a.m.
umm, I'm slightly confused then. Can you tell me what the download tag in the client build results editor is tracking? I thought that that was downloads of what had just been built?

Is there an easy way of getting at what has just been built without going to the server and looking in the fetched drectory where the build had taken place?

permanent link
Ryan Manwiller (1.3k1) | answered Jan 22 '08, 1:18 p.m.
JAZZ DEVELOPER
Your original question was about downloading through the web ui. There is no
web ui for downloading.

If you are asking about the eclipse client build result editor, then yes,
you can get downloads to show up in the eclipse client build result editor.
To do this, use the artifactFilePublisher or artifactLinkPublisher in your
build.xml. The file publisher stores the content of your file in the jazz
repository. The link publisher simply stores a link in the jazz repository
to some other web location where your artifact is. Either way, the download
will show up on the Downloads tab of the build result editor in the eclipse
client.

For example, to store test.zip directly in the jazz repository:

<artifactFilePublisher buildResultUUID="${buildResultUUID}"
repositoryAddress="${repositoryAddress}"
userId="${userId}"
password="${password}"
verbose="true"
filePath="test.zip"
failOnError="true"
label="A test download" />


To store a link to test.zip:

<artifactLinkPublisher buildResultUUID="${buildResultUUID}"
repositoryAddress="${repositoryAddress}"
userId="${userId}"
password="${password}"
verbose="true"
label="A test download"
url=http://example.com/downloads/test.zip
failOnError="true"/>

You must also have the appropriate taskdef in your build.xml.

<taskdef name="artifactFilePublisher"
classname="com.ibm.team.build.ant.task.ArtifactFilePublisherTask"
/>

<taskdef name="artifactLinkPublisher"
classname="com.ibm.team.build.ant.task.ArtifactLinkPublisherTask"
/>


---
Ryan Manwiller
Jazz Team Build component

permanent link
Ryan Manwiller (1.3k1) | answered Jan 22 '08, 1:28 p.m.
JAZZ DEVELOPER
One correction: my example was missing quotes around the url. It should be:

url="http://example.com/downloads/test.zip"

permanent link
Toby Corbin (81136) | answered Jan 23 '08, 2:58 a.m.
ah right, I'm with you. I'll give that a try. Thanks a lot for your replies Ryan

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.