|
Re: Understanding uptodatepolicy [message #647585 is a reply to message #647530] |
Fri, 07 January 2011 07:53 |
|
Setting loglevel DEBUG might give you some more info. It should then log some info about why it thinks the product needs
to be rebuilt.
- thomas
On 2011-01-06 21:07, Tobias wrote:
> Hello,
>
> I'm quite new to Buckminster and trying to set up a build enviroment for our Xtext projects.
>
> I got as far as being able to make Buckminster trigger the mwe2 workflow for generating the Xtext language artifacts
> before running the eclipse.build action. To achieve this, I added a CSPEX extension to the project which basically adds
> the src-gen folder as a prerequisite to the eclipse.build action and adds the action 'gen.xtext.artifacts' for running
> the mwe2 workflow (using an ANT script):
>
>
> <?xml version="1.0" encoding="UTF-8"?>
> <cspecExtension
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:bc="http://www.eclipse.org/buckminster/Common-1.0"
> xmlns="http://www.eclipse.org/buckminster/CSpec-1.0">
> <artifacts>
> <private name="mydsl.src" base="${buckminster.home}/src/">
> <path path="org/xtext/example/mydsl/MyDsl.xtext"/> </private>
> </artifacts>
>
> <actions>
> <public name="gen.xtext.artifacts" actor="jdt.ant">
> <actorProperties>
> <property key="buildFile" value="gen_code.xml" />
> </actorProperties>
> <prerequisites>
> <attribute name="mydsl.src" alias="grammar"/> </prerequisites>
> <products alias="output">
> <private name="sources.generated" path="${buckminster.home}/src-gen/" /> </products>
> </public>
> </actions>
>
> <alterActions>
> <private name="eclipse.build">
> <alterPrerequisites>
> <attribute name="sources.generated"/> </alterPrerequisites>
> </private>
> </alterActions>
> </cspecExtension>
>
> Now, I want to have the gen.xtext.artifacts action only executed if the MyDSl.xtext file actually changed but I'm unable
> to get it working. It just runs every time.
> From what I read in the BuckyBook I assume that I could use an updatepolicy of COUNT to make the action run as soon as
> the MyDsl.xtext file is younger than all files in src-gen:
>
>
> <actions>
> <public name="gen.xtext.artifacts" actor="jdt.ant">
> <actorProperties>
> <property key="buildFile" value="gen_code.xml" />
> </actorProperties>
> <prerequisites>
> <attribute name="mydsl.src" alias="grammar"/> </prerequisites>
> <products alias="output" upToDatePolicy="COUNT" fileCount="1">
> <private name="sources.generated" path="${buckminster.home}/src-gen/" /> </products>
> </public>
> </actions>
>
>
> But it keeps always executing that action. Even if I use the NOT EMPTY upToDatePolicy the action is invoked each time.
>
> Do you have any idea where my problem might be or how I can find out why Buckminster decides that the action needs to be
> invoked?
>
> Thanks,
> Tobias
>
|
|
|
|
Powered by
FUDForum. Page generated in 0.03489 seconds