Matt Trentini
2005-08-16 04:38:48 UTC
Heya Guys,
I'm trying to shift some common targets into one NAnt script and use
those operations from multiple NAnt scripts.
Something like this:
<!-- common.build -->
<?xml version="1.0"?>
<project name="Common Operations" default="output.message">
<property name="message" value="Test Message" />
<target name="output.message">
<echo message="${message}" />
</target>
</project>
And this:
<!-- (One of many) specific.build -->
<?xml version="1.0"?>
<project name="Specific operation" default="output.message">
<include buildfile="common.build" />
<property name="message" value="This is a much more specific message" />
</project>
Which works fine. :) What I'd like to do however is get project help
on one of the specific build files that included targets from both the
specific build file and the common build file. Ie, I'd like to be
able to do:
nant -buildfile:specific.build -projecthelp
And get it to display:
output.message
as a target. Currently that only happens if I query common.build.
Does that make sense?
Should I be structuring my targets differently or is there just no way
to currently do this?
Cheers,
Matt
PS I believe Ant has an import task which does something similar...
I'm trying to shift some common targets into one NAnt script and use
those operations from multiple NAnt scripts.
Something like this:
<!-- common.build -->
<?xml version="1.0"?>
<project name="Common Operations" default="output.message">
<property name="message" value="Test Message" />
<target name="output.message">
<echo message="${message}" />
</target>
</project>
And this:
<!-- (One of many) specific.build -->
<?xml version="1.0"?>
<project name="Specific operation" default="output.message">
<include buildfile="common.build" />
<property name="message" value="This is a much more specific message" />
</project>
Which works fine. :) What I'd like to do however is get project help
on one of the specific build files that included targets from both the
specific build file and the common build file. Ie, I'd like to be
able to do:
nant -buildfile:specific.build -projecthelp
And get it to display:
output.message
as a target. Currently that only happens if I query common.build.
Does that make sense?
Should I be structuring my targets differently or is there just no way
to currently do this?
Cheers,
Matt
PS I believe Ant has an import task which does something similar...