It's all about the answers!

Ask a question

Specifying loadrule file in ANT xml


Viktor Hefler (111) | asked Jan 06 '20, 11:06 a.m.
Dear Community,

I am trying to create build definitions using Ant task, but I fail to specify the loadrule for the workspace in the Ant xml file.

Build toolkit 6.0.6 is used, I took one of the example xml files come along with the btk installation (CreateBuildDefinitionAnt.xml). Everything is all right (the build definition gets generated, workspace gets assigned), until I set the value property of below line:

<xt:teamBuildProperty name="team.scm.componentLoadRules" value=""/>
My loadrule files are located in the component "_Loadrules", there are no subfolders within the component, so I set the value to "/_Loadrules/myloadrule.loadrule".

The exception which is thrown in return:

com.ibm.team.repository.common.TeamRepositoryException: An invalid file path was specified: /_Loadrule/myloadrule.loadrule

Based on the documentation it should have this format: /ComponentName/ProjectName/RulesFolder/RulesFile.loadrules. What does ProjectName mean here? The project area in which my stream is located? If I set the value so, "project not found" error is thrown. Also it is very strange, that when I make an export of a proper and working build definition , only the .loadrule file is printed as the value, no project or component names are displayed in the generated xml. And the so generated file can't be used for build definition generation later on, as it fails due to the same wrong file path.

Has anyone experienced the same phenomenon? Any advice is appreciated.

Regards,
Viktor

3 answers



permanent link
Daniel Reilly (1431620) | answered Feb 21 '20, 10:06 a.m.

 The ProjectName is the name of the project as seen under Project Explorer in eclipse. Each item in SCM belongs to a Component and Project, and may belong to 1-n folders. Find the loadrules file in Eclipse, right-click on the file, choose Properties, and the Jazz Source Control tab. You'll get a panel that looks something like this:

">https://jazz.net/b0acedf9-a17e-4170-9c50-231c977bc784">
there is a line where the component name is specified toward the bottom. The rest of the path can be copied from Remote path.

If you're still having trouble, copy your jazz source control panel here so that I can see what it looks like.

I see the problem with the export, I'll fix that.


Comments
Geoffrey Clemm commented Feb 22 '20, 5:20 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

To clarify a bit, note that although a file in RTC/EWM SCM has to belong to a component, it does not have to belong to a project.  Also note that a "project" here is an Eclipse project, not an RTC/EWM project area.   It is easiest to view and manipulate files in Eclipse if they are in an Eclipse project area, so it is best to put files under an Eclipse project if you are going to work with the files in Eclipse.


permanent link
Daniel Reilly (1431620) | answered Feb 21 '20, 10:08 a.m.

 Sorry image did not get included:

Jazz Source Control


permanent link
Daniel Reilly (1431620) | answered Feb 21 '20, 12:33 p.m.

 Fix for the export will go into 701 and be retrofit to 700 - component name is missing from value:


What is the expected output? 
/component_name/project_name/folder_name/file_name

What do you see instead? Please provide screen shots if possible.
project_name/folder_name/file_name

What version are you on? And do you need this retrofit?


Comments
Viktor Hefler commented Feb 25 '20, 11:12 a.m.
Dear Daniel,

Thank you for your replies and help!

The version we are using is 6.0.6.1.

I fail to get above mentioned properties tab for my loadrule file, and I can't upload the screenshot either since I don't have enough reputation points for that. What I get upon clicking on 'show properties' are properties like timestamp, MIME type, encoding, which is basically what you have in the grey area on your screenshot, and nothing else. Any suggestion how I could share that pic with you?

I am using Eclipse 2019-09 R (4.13.0) with RTC plugin 6.0.6. I would also share my XML files if that helps.

Thank you in advance!
Regards,
Viktor

Daniel Reilly commented Feb 25 '20, 11:59 a.m.

Hi,


Send doc to djreilly@us.ibm.com


Viktor Hefler commented Mar 02 '20, 6:59 a.m.
Hi Daniel,

I sent you an e-mail today with requested attachments.

Regards,
Viktor

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.