You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by weiji <na...@hotmail.com> on 2008/10/01 00:32:35 UTC
Re: Problem with Ant P4 Task
Hi,
I am also in a similar situation. I found that the p4change task does not
set the p4.change property when I run the build from a linux host, but it
works fine when run from a Windows host. This causes the build to fail
because we cannot checkin files without the property being set.
Does anyone have a workaround?
Thanks,
KaJun
Draes, Daniel wrote:
>
> Hi Ant users,
>
> I hope to find some help here. Currently I tried to update a Manifest file
> with the current revision out of our perforce versioning system. If the
> manifest file get's opened for edit and submitted, the file content will
> change as it should. Now I would like to use this in my ant-script to
> automatically get a new 'build' number for the jar-file.
>
> Here is the part of my buildfile:
>
> <target name="update_manifest">
> <property name="p4.globalopts" value="-P xxxxxxxx"/>
> <property name="p4.client" value="zzzz"/>
> <property name="p4.user" value="yyyyyy"/>
> <property name="p4.port" value="host:1667"/>
> <property name="p4.change" value=""/>
>
> <p4change description="Change Build Number in Script"/>
> <echo message="changeno: ${p4.change}"></echo>
> <p4edit
> view="//cid_dev/java_src/MANIFEST.MF"
> change="${p4.change}"
> globalopts="${p4.globalopts}"/>
> <echo message="changeno: ${p4.change}"></echo>
> <p4submit change="${p4.change}" globalopts="${p4.globalopts}"/>
> </target>
>
> This does unfortunatly not work. The p4change-command does not set the
> p4.change-property as it should the echo reads as:
> [echo] changeno:
>
> And obviously the edit and submit tasks fail as well. If I remove the
> change attribute from the edit-task, the file will be opened for edit
> under the default change in perforce. But I cannot submit it.
>
> I am using ANT 1.7.0 within Eclipse.
>
> Any help is greatly appreciated. I was using Google but could only find
> old messages related to ANT 1.4 / 1.6.
>
> Best regards,
>
> Daniel
>
>
>
>> Daniel Dräs
>> Product Data Management Expert
>>
>> Hilti Corporation
>> 9494 Schaan I Liechtenstein
>> Office: Hilti Befestigungstechnik AG
>> 9470 Buchs I SG I Switzerland
>>
>> GrĂ¼naustrasse 1a I P.O.Box 546
>> P +423-234 4239 I F +423-234 8239
>> E daniel.draes@hilti.com
>> www.hilti.com
>>
>
>
--
View this message in context: http://www.nabble.com/Problem-with-Ant-P4-Task-tp16119529p19751166.html
Sent from the Ant - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org