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=40742>. 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=40742 Summary: Tag "isset" does not recognise property set with argument "-D" Product: Ant Version: 1.7.0Beta2 Platform: PC OS/Version: Windows XP Status: NEW Severity: normal Priority: P2 Component: Build Process AssignedTo: dev@ant.apache.org ReportedBy: [EMAIL PROTECTED] CC: [EMAIL PROTECTED] Tag "isset" does not recognise property set with argument "-D" When running Ant, on the command line I would like to specify a property: > ant -Dtest.class.name=class.to.be.Tested Then, in the build file I would like to test if this property has been set, otherwise default to something else: <?xml version="1.0" encoding="UTF-8"?> <project default="default-task-name" basedir="." name="project-name"> <condition property="testClassSpecified"> <isset property="test.class.name"/> </condition> <if> <equals arg1="testClassSpecified" arg2="true" /> <then> <echo message="Test class specified." /> </then> <else> <echo message="Test class not specified. Setting it to default Suite..." /> <property name="test.class.name" value="some.default.Suite"/> </else> </if> <!-- tasks follow... --> </project> Maybe I'm doing something wrong, but Ant does not seem to pick up the argument, and the condition always fails (i.e. "test.class.name" always defaults to "some.default.Suite", and the rest of the tasks then execute perfectly with this value.) Other tools used with Ant: * ant-contrib-1.0b2 (of which the JAR is in %ANT_HOME%/lib * JUnit4.1 (of which the JAR is in %ANT_HOME%/lib -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]