mailing lists">
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=42 522>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=42522 a> Summary: Add "if"/"unless" attributes to <import/> Product: Ant Version: 1.7.0 Platform: Other OS/Version: other Status: NEW Severity: normal Priority: P2 Component: Core AssignedTo: devant.apache.org ReportedBy: josh.mooregmx.de Idea: Add target-like if/unless logic to imports. Such sentinels would allow for logic similar to C/C++ header file inclusion, which could server as a workaround/replacement for wanting to <import/> from within a target. Benefits: * Backwards compatible * Familiar (since <imports/> occur at the <project/> level like <target/>s * Powerful. Much C/C++ build magic is based on this on principle Example 1: <project> <import file="online.xml" unless="offline"/> <import file="offline.xml" if="offline"/> <target name="get-source"> <getSource/> <!-- Macro in on- or offline.xml --> </target> <target name="build" depends="get-source"> <!-- ... --> </target> </project> $ ant -Doffline=yes build Example 2: A.xml: <project name="A"> <import file="B.xml" unless="B.xml"/> <import file="C.xml" unless="C.xml"/> </project> B.xml: <project name="B"> <properties name="B.xml" value="true"/> <!-- overrides C.xml --> <properties name="C.xml" value="true"/> <macrodef name="Cmacro"> <sequential><echo>B</echo></sequential& gt; </macrodef> </project> C.xml: <project name="C"> <macrodef name="Cmacro"> <sequential><echo>C</echo></sequential& gt; </macrodef> </project> Possibly related to: * scopes in build files (bug 23942) * conditions at the project level (bug 20093) -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=ema il ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. ------------------------------------------------------------ --------- To unsubscribe, e-mail: dev-unsubscribeant.apache.org For additional commands, e-mail: dev-helpant.apache.org
about | contact Other archives ( Real Estate discussion Medical topics )
Mailing lists
Newsgroups
RFC archive