Re: How to set "property" within p4 modificationset???

"Gerald Kelly" <[email protected]>
Newsgroups gmane.comp.java.cruise-control.user
Message-ID <66CAFDB9AB73BF43A496B50217B43DCD0C3C5F30@TUS1XCHCLUPIN15.enterprise.veritas.com>
What good timing! I've got what seems like a similar problem: based on
what immediate subdirectory a file in a modification set is in, I would
like to pass the name of that subdirectory to an Ant target as a
property.


So for example, abstracted a little, I have this:

<project name="MyProject" >
<bootstrappers>

<p4bootstrapper view="//depot/topleveldirectory..." />
</bootstrappers>
<modificationset>
<p4 view="//depot/topleveldirectory/level1/..." />
</modificationset>


So if there's a change to a file in
="//depot/topleveldirectory/level1/fred/..."

I want to pass the directory name fred to my Ant target as a property:

<schedule>
<ant target="junit">
<property name="test.name" value=<named of directory containing changed
file should be here>/>
</ant>
</schedule>

</project>

I'm trying to avoid having separate projects for each subdirectory, as
that would quickly become a maintenance nightmare.
Any ideas on how this might be accomplished?
Thanks!


[email protected] wrote:
>Date: Fri, 3 Apr 2009 18:47:39 -0700
>From: [email protected]
>To: [email protected]
>Subject: Re: [Cruisecontrol-user] How to set "property" within p4
modificationset???

>Is this a correct usage of "property" attribute in p4 modificationset?
>You're very close but not quite.
>
>They key concept you're missing is the distinction between
configuration time properties and runtime properties: configuration time
properties get substituted into the config.xml while runtime >properties
are passed into the builders.
>
>The p4 modification set will define the property updated and that will
be passed to Ant (-Dupdated=true or something like that) but it isn't
available to substitute in the config.xml.
>
>
>That make sense?
>
>Jtf
--

------------------------------------------------------------------------------
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.