ArtifaceFilePublisher ant task does not work
Hi all,
I'm having some troubles with the ArtifactFilePublisher task. It didn't work for me in 0.6M0 and not now either with the latest 0.6M1 release. Here's part of my Ant file... ---------- <zip destfile="documentation.zip" basedir="generated"/> <!-- Publish some downloadable artifacts. Files published with the artifactFilePublisher are shown on the Downloads tab of the build result editor. --> <echo message="Artifact File Publisher Start"/> <artifactFilePublisher buildResultUUID="${buildResultUUID}" repositoryAddress="${repositoryAddress}" userId="${userId}" password="${password}" verbose="true" filePath="documentation.zip" label="The zipped up documentation plug-ins ready for deployment"/> <echo message="Artifact File Publisher End"/> ---------- And now here's the output log that gets generated by the Jazz build system. ---------- all: Building zip: D:\ant\documentation.zip Artifact File Publisher Start Artifact File Publisher End ---------- The build completes successfully and I can use other Jazz Ant tasks like teamAccept and teamFetch without any problems. Unfortunately, all I get is a 'Summary' and a 'Logs' tab when I click on my completed build. I should note that the LinkPublisher link also gives a similar (non-existent) output to my logs. I run Jazz server 0.6M1 on localhost myself and also invoke the jbe executable locally. Does anyone have any suggestions? Thanks in advance. :) Regards, Rem |
5 answers
Hi Rem,
It looks like you are doing things correctly. We use this task extensively without issue. I don't know what's going wrong but I have a few suggestions. In the build definition, set the antArgs property value to use -debug, for example "-debug -lib C:\jazz\buildsystem\buildtoolkit". This should dump alot of info to the build log. Maybe it will give some clue. Is there anything interesting in the server console or logs? Particularly any errors related to "content"? The ArtifactFilePublisher stores the artifact in the repository using its content API. Finally, could you just confirm the task prints the correct error message when the filePath is pointing to a non-existant file? For example, you should see something like this in the log: BUILD FAILED C:\Temp\TestBuildDefinition1 build\build.xml:134: "filePath" contains path to non-existent file "C:\Temp\TestBuildDefinition1 build\documentation2.zip". |
Hi Ryan,
Thanks for your reply. Ryan Manwiller wrote: In the build definition, set the antArgs property value to use -debug, for No dice here. I get the same thing with the output then just the two messages. Is there anything interesting in the server console or logs? Particularly I don't see anything in the server console. Where can I find the logs? I ran a search for "log" in my \server\ folder and clicked around on some hits that were modified today but nothing about "content" anywhere. Finally, could you just confirm the task prints the correct error message Yes, I do get build failure message. I am wondering if my server is not setup properly? I did not bring this up but actually the LinkPublisher ant task also does nothing. Thank you for your time. Regards, Rem |
Hi all,
I noticed that the ArtifactFilePublisherTask works if I select a build that was originally created that targets a local test engine. One other thing I did not mention was that build definitions that I create that are targeting a remote engine does not have properties like its repositoryAddress or buildResultUUID populated. I did not mention these issues because it seemed too glaring that it was probably known, but since I now can see that the ArtifactFilePublisherTask does work for build definitions that were created using a local test engine (which does get the repositoryAddress and buildResultUUID properties populated properly), I thought I would bring it up. Is this a known bug? Can anyone reproduce this? I am on 0.6M1. Thank you for your time. Regards, Rem |
Hi again,
I have discovered the problem with the repositoryAddress properties not being populated. I had changed my propertiesFile attribute in my build definition but never updated the readProperties target in my Ant file. Perhaps it would be useful to have the readProperties target check to make sure that the properties file exists before reading it, I don't know, I guess most people aren't as absentminded as I am. ;) Still, after the build has completed successfully, there is no indication that the ArtifactFilePublisherTask happened in the Ant logs, I think it would be helpful to have some kind of output in the logs to confirm that something _did_ happen. Thanks all. Rem |
Since you are using the verbose flag...it should be writing something to log
that the ArtifactFilePublisherTask updated the build result. It's not due to a regression that was introduced during the implementation of 21654. I've logged the problem in 25523. Thanks, D. "Remy Chi Jian Suen" <remsuen@ca.ibm.com> wrote in message news:f48u5g$8lp$1@localhost.localdomain... Hi again, |
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.