<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>user@ant.apache.org Archives</title>
<link rel="self" href="http://mail-archives.apache.org/mod_mbox/ant-user/?format=atom"/>
<link href="http://mail-archives.apache.org/mod_mbox/ant-user/"/>
<id>http://mail-archives.apache.org/mod_mbox/ant-user/</id>
<updated>2013-05-24T01:26:36Z</updated>
<entry>
<title>[ANNOUNCE] Apache Ant 1.9.1 Released</title>
<author><name>Antoine Levy Lambert &lt;antoine@gmx.de&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/ant-user/201305.mbox/%3cF38A7858-80ED-4966-AFFB-66E14AE761F7@gmx.de%3e"/>
<id>urn:uuid:%3cF38A7858-80ED-4966-AFFB-66E14AE761F7@gmx-de%3e</id>
<updated>2013-05-22T02:59:42Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
he Apache Ant Team is proud to announce the 1.9.1 release of Ant.&#010;&#010;Apache Ant is a Java based build tool.&#010;&#010;Version 1.9.1 is a bug fix release with the following main fixes :&#010;-  Zip64 extensions are disabled by default&#010;-  Loading of external dependencies fixed in JUnit tasks&#010;-  JUnitreport default stylesheets now compatible with JDK 1.7&#010;-  Recommending to upgrade to jsch 0.1.50 for users of the ssh/scp tasks under Java 1.7&#010;-  Other fixes and improvements documented in WHATSNEW  &#010;&#010;Version 1.9.1 also introduces if and unless XML namespaces allowing to put conditions on all&#010;tasks and nested elements.&#010;&#010;Source and binary distributions are available from the Apache Ant&#010;download site:&#010;&#010;http://ant.apache.org/bindownload.cgi&#010;&#010;and&#010;&#010;http://ant.apache.org/srcdownload.cgi&#010;&#010;Please verify signatures using the KEYS file available at the above&#010;location when downloading the release.&#010;&#010;For complete information on Ant, including instructions on how to submit&#010;bug reports, patches, or suggestions for improvement, see the Apache Ant&#010;website:&#010;&#010;http://ant.apache.org/index.html&#010;&#010;Antoine Levy-Lambert, on behalf of the Apache Ant community&#010;---------------------------------------------------------------------&#010;To unsubscribe, e-mail: user-unsubscribe@ant.apache.org&#010;For additional commands, e-mail: user-help@ant.apache.org&#010;&#010;&#010;
</pre>
</div>
</content>
</entry>
<entry>
<title>Re: How to run a single junit test method with ant</title>
<author><name>肖谋 &lt;xiaomou@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/ant-user/201305.mbox/%3cCACU_Zbz9SaOgHWcmSx_x=yfL97cuU74iWi=nBFYmyVf432JGwg@mail.gmail.com%3e"/>
<id>urn:uuid:%3cCACU_Zbz9SaOgHWcmSx_x=yfL97cuU74iWi=nBFYmyVf432JGwg@mail-gmail-com%3e</id>
<updated>2013-05-19T13:42:02Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Thanks a lot for your help. Problem solved!&#010;&#010;&#010;&#010;&#010;On Tue, May 14, 2013 at 3:18 PM, Jan Matèrne (jhm) &lt;apache@materne.de&gt;wrote:&#010;&#010;&gt; Here is a skeleton which could be what you need.&#010;&gt;   ant test -Dtestclass=xy -Dtestmethod=xy  :  runs the testmethod in that&#010;&gt; test class&#010;&gt;   ant test -Dtestclass=xy                  :  runs all tests in that test&#010;&gt; class&#010;&gt;   ant test                -Dtestmethod=xy  :  invalid as the class must be&#010;&gt; specified, so fail the build&#010;&gt;   ant test                                 :  runs all tests&#010;&gt;&#010;&gt;&#010;&gt; Jan&#010;&gt;&#010;&gt;&#010;&gt; &lt;project&gt;&#010;&gt;&#010;&gt;     &lt;target name="-test.check"&gt;&#010;&gt;         &lt;!--&#010;&gt;         decision matrix:&#010;&gt;                 testclass   testmethod&#010;&gt;         suite      -             -&#010;&gt;         class      X             -&#010;&gt;         method     X             X&#010;&gt;         error      -             X&#010;&gt;         --&gt;&#010;&gt;         &lt;condition property="testaction.suite"&gt;&#010;&gt;             &lt;and&gt;&#010;&gt;                 &lt;not&gt;&lt;isset property="testclass"/&gt;&lt;/not&gt;&#010;&gt;                 &lt;not&gt;&lt;isset property="testmethod"/&gt;&lt;/not&gt;&#010;&gt;             &lt;/and&gt;&#010;&gt;         &lt;/condition&gt;&#010;&gt;         &lt;condition property="testaction.class"&gt;&#010;&gt;             &lt;and&gt;&#010;&gt;                 &lt;isset property="testclass"/&gt;&#010;&gt;                 &lt;not&gt;&lt;isset property="testmethod"/&gt;&lt;/not&gt;&#010;&gt;             &lt;/and&gt;&#010;&gt;         &lt;/condition&gt;&#010;&gt;         &lt;condition property="testaction.method"&gt;&#010;&gt;             &lt;and&gt;&#010;&gt;                 &lt;isset property="testclass"/&gt;&#010;&gt;                 &lt;isset property="testmethod"/&gt;&#010;&gt;             &lt;/and&gt;&#010;&gt;         &lt;/condition&gt;&#010;&gt;         &lt;condition property="testaction.error"&gt;&#010;&gt;             &lt;and&gt;&#010;&gt;                 &lt;not&gt;&lt;isset property="testclass"/&gt;&lt;/not&gt;&#010;&gt;                 &lt;isset property="testmethod"/&gt;&#010;&gt;             &lt;/and&gt;&#010;&gt;         &lt;/condition&gt;&#010;&gt;     &lt;/target&gt;&#010;&gt;&#010;&gt;     &lt;target name="-test.suite" if="testaction.suite"&gt;&#010;&gt;         &lt;echo&gt;Run JUnit using 'batchtest' and fileset&lt;/echo&gt;&#010;&gt;     &lt;/target&gt;&#010;&gt;&#010;&gt;     &lt;target name="-test.class" if="testaction.class"&gt;&#010;&gt;         &lt;echo&gt;Run JUnit using 'test name=$${testclass}'&lt;/echo&gt;&#010;&gt;     &lt;/target&gt;&#010;&gt;&#010;&gt;     &lt;target name="-test.method" if="testaction.method"&gt;&#010;&gt;         &lt;echo&gt;Run JUnit using 'test name=$${testclass}&#010;&gt; method=$${testmethod}'&lt;/echo&gt;&#010;&gt;     &lt;/target&gt;&#010;&gt;&#010;&gt;     &lt;target name="-test.error" if="testaction.error"&gt;&#010;&gt;         &lt;fail&gt;When specifying -Dtestmethod=${testmethod} you also have to&#010;&gt; specify the property 'testclass'&lt;/fail&gt;&#010;&gt;     &lt;/target&gt;&#010;&gt;&#010;&gt;&#010;&gt;     &lt;target name="test"&#010;&gt; depends="-test.check,-test.suite,-test.class,-test.method,-test.error"&#010;&gt; description="Runs the tests"/&gt;&#010;&gt;&#010;&gt; &lt;/project&gt;&#010;&gt;&#010;&gt;&#010;&gt;&#010;&gt; &gt; -----Ursprüngliche Nachricht-----&#010;&gt; &gt; Von: Antoine Levy Lambert [mailto:antoine@gmx.de]&#010;&gt; &gt; Gesendet: Sonntag, 12. Mai 2013 17:34&#010;&gt; &gt; An: Ant Users List&#010;&gt; &gt; Betreff: Re: How to run a single junit test method with ant&#010;&gt; &gt;&#010;&gt; &gt; Hello Xiaomou,&#010;&gt; &gt;&#010;&gt; &gt; the documentation of the junit task&#010;&gt; &gt; http://ant.apache.org/manual/Tasks/junit.html&#010;&gt; &gt; mentions that the test nested element can have a methods attribute to&#010;&gt; &gt; specify the methods you want to run&#010;&gt; &gt;&#010;&gt; &gt; Comma-separated list of names of test case methods to execute. Since&#010;&gt; &gt; 1.8.2&#010;&gt; &gt;&#010;&gt; &gt; &lt;junit …&gt;&#010;&gt; &gt;    &lt;test name="com.something.XyzTest" methods="test1"&gt;&#010;&gt; &gt;    &lt;/test&gt;&#010;&gt; &gt; &lt;/junit&gt;&#010;&gt; &gt;&#010;&gt; &gt; Regards,&#010;&gt; &gt;&#010;&gt; &gt; Antoine&#010;&gt; &gt; On May 11, 2013, at 2:15 PM, 肖谋 wrote:&#010;&gt; &gt;&#010;&gt; &gt; &gt; Thanks for your reply. Perhaps I did not express my problem clearly,&#010;&gt; &gt; &gt; or may not understand your solution.&#010;&gt; &gt; &gt; My problem is : I have junit test class:&#010;&gt; &gt; &gt; class TestService {&#010;&gt; &gt; &gt;  @Test&#010;&gt; &gt; &gt;   void test1() {}&#010;&gt; &gt; &gt;  @Test&#010;&gt; &gt; &gt;   void test2() {}&#010;&gt; &gt; &gt; }&#010;&gt; &gt; &gt;&#010;&gt; &gt; &gt; now I'd like to only test the "test2" with ant command line like&#010;&gt; &gt; this:&#010;&gt; &gt; &gt; ant -Dtest=TestService -Dtestcase=test2 test-target Then how to write&#010;&gt; &gt; &gt; the build.xml?&#010;&gt; &gt; &gt;&#010;&gt; &gt; &gt; Thanks&#010;&gt; &gt; &gt;&#010;&gt; &gt; &gt;&#010;&gt; &gt; &gt; XiaoMou&#010;&gt; &gt; &gt;&#010;&gt; &gt; &gt;&#010;&gt; &gt; &gt;&#010;&gt; &gt; &gt;&#010;&gt; &gt; &gt;&#010;&gt; &gt; &gt; On Sat, May 11, 2013 at 4:00 PM, Jan Matèrne (jhm)&#010;&gt; &gt; &lt;apache@materne.de&gt;&#010;&gt; &gt; &gt; wrote:&#010;&gt; &gt; &gt;&#010;&gt; &gt; &gt;&gt; Basic idea is&#010;&gt; &gt; &gt;&gt; - specify the test to run via command line property (-Dtestcase=...)&#010;&gt; &gt; &gt;&gt; - test-targets depends on two targets running a single test or the&#010;&gt; &gt; &gt;&gt; whole test suite&#010;&gt; &gt; &gt;&gt;   &lt;target name="test" depends="-test.single,-test.all"/&gt;&#010;&gt; &gt; &gt;&gt; - that two targets are conditional according to that property&#010;&gt; &gt; &gt;&gt;   &lt;target name="-test.single" if="testcase"&gt;&#010;&gt; &gt; &gt;&gt;   &lt;target name="-test.all" unless="testcase"&gt;&#010;&gt; &gt; &gt;&gt;&#010;&gt; &gt; &gt;&gt; Jan&#010;&gt; &gt; &gt;&gt;&#010;&gt; &gt; &gt;&gt;&gt; -----Ursprüngliche Nachricht-----&#010;&gt; &gt; &gt;&gt;&gt; Von: Matt Benson [mailto:gudnabrsam@gmail.com]&#010;&gt; &gt; &gt;&gt;&gt; Gesendet: Freitag, 10. Mai 2013 16:55&#010;&gt; &gt; &gt;&gt;&gt; An: Ant Users List&#010;&gt; &gt; &gt;&gt;&gt; Betreff: Re: How to run a single junit test method with ant&#010;&gt; &gt; &gt;&gt;&gt;&#010;&gt; &gt; &gt;&gt;&gt; Typically this would be done using separate targets.  Ant's own&#010;&gt; &gt; &gt;&gt;&gt; build.xml provides an example.&#010;&gt; &gt; &gt;&gt;&gt;&#010;&gt; &gt; &gt;&gt;&gt; HTH,&#010;&gt; &gt; &gt;&gt;&gt; Matt&#010;&gt; &gt; &gt;&gt;&gt;&#010;&gt; &gt; &gt;&gt;&gt;&#010;&gt; &gt; &gt;&gt;&gt; On Thu, May 9, 2013 at 11:33 PM, 肖谋 &lt;xiaomou@gmail.com&gt; wrote:&#010;&gt; &gt; &gt;&gt;&gt;&#010;&gt; &gt; &gt;&gt;&gt;&gt; Hi, Users.&#010;&gt; &gt; &gt;&gt;&gt;&gt;   I am using ant in Linux. I can use ant junit task to run all&#010;&gt; &gt; test&#010;&gt; &gt; &gt;&gt;&gt;&gt; methods in a junit4 test class but fail to find the way to  run&#010;a&#010;&gt; &gt; &gt;&gt;&gt;&gt; single test method.  I googled and found a helpful article at&#010;&gt; &gt; &gt;&gt;&gt;&gt; https://today.java.net/pub/a/today/2003/09/12/individual-test-&#010;&gt; &gt; &gt;&gt;&gt; cases.html.&#010;&gt; &gt; &gt;&gt;&gt;&gt; However, the solution it provides does not help. My ant seems not&#010;&gt; &gt; &gt;&gt;&gt;&gt; to recognize the "tests" sysproperty.&#010;&gt; &gt; &gt;&gt;&gt;&gt;  My ant version is 1.8.4. and the related content of build.xml&#010;is&#010;&gt; &gt; &gt;&gt;&gt;&gt; listed as follows:&#010;&gt; &gt; &gt;&gt;&gt;&gt;&#010;&gt; &gt; &gt;&gt;&gt;&gt;   &lt;target name="ensure-test-name" unless="test"&gt;&#010;&gt; &gt; &gt;&gt;&gt;&gt;        &lt;fail message="You must run this target with -&#010;&gt; &gt; &gt;&gt;&gt; Dtest=TestName"/&gt;&#010;&gt; &gt; &gt;&gt;&gt;&gt;    &lt;/target&gt;&#010;&gt; &gt; &gt;&gt;&gt;&gt;&#010;&gt; &gt; &gt;&gt;&gt;&gt;    &lt;target name="run-general-test" description="Runs the test&#010;you&#010;&gt; &gt; &gt;&gt;&gt;&gt; specify on the command&#010;&gt; &gt; &gt;&gt;&gt;&gt;        line with -Dtest=" depends="compile, ensure-test-name"&gt;&#010;&gt; &gt; &gt;&gt;&gt;&gt;        &lt;junit printsummary="withOutAndErr" fork="true"&gt;&#010;&gt; &gt; &gt;&gt;&gt;&gt;            &lt;sysproperty key="tests" value="${tests}"/&gt;&#010;&gt; &gt; &gt;&gt;&gt;&gt;            &lt;classpath refid="test.classpath" /&gt;&#010;&gt; &gt; &gt;&gt;&gt;&gt;            &lt;formatter type="plain" usefile="false"/&gt;&#010;&gt; &gt; &gt;&gt;&gt;&gt;            &lt;batchtest&gt;&#010;&gt; &gt; &gt;&gt;&gt;&gt;                &lt;fileset dir="${test.src.dir}"&gt;&#010;&gt; &gt; &gt;&gt;&gt;&gt;                    &lt;include name="**/${test}.java"/&gt;&#010;&gt; &gt; &gt;&gt;&gt;&gt;                &lt;/fileset&gt;&#010;&gt; &gt; &gt;&gt;&gt;&gt;            &lt;/batchtest&gt;&#010;&gt; &gt; &gt;&gt;&gt;&gt;        &lt;/junit&gt;&#010;&gt; &gt; &gt;&gt;&gt;&gt;    &lt;/target&gt;&#010;&gt; &gt; &gt;&gt;&gt;&gt;&#010;&gt; &gt; &gt;&gt;&gt;&gt;  Please help! Thanks a lot!&#010;&gt; &gt; &gt;&gt;&gt;&gt;&#010;&gt; &gt; &gt;&gt;&gt;&gt; Regards&#010;&gt; &gt; &gt;&gt;&gt;&gt; xiaomou&#010;&gt; &gt; &gt;&gt;&gt;&gt;&#010;&gt; &gt; &gt;&gt;&#010;&gt; &gt; &gt;&gt;&#010;&gt; &gt; &gt;&gt; --------------------------------------------------------------------&#010;&gt; &gt; -&#010;&gt; &gt; &gt;&gt; To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For&#010;&gt; &gt; &gt;&gt; additional commands, e-mail: user-help@ant.apache.org&#010;&gt; &gt; &gt;&gt;&#010;&gt; &gt; &gt;&gt;&#010;&gt;&#010;&gt;&#010;&gt;&#010;&gt; ---------------------------------------------------------------------&#010;&gt; To unsubscribe, e-mail: user-unsubscribe@ant.apache.org&#010;&gt; For additional commands, e-mail: user-help@ant.apache.org&#010;&gt;&#010;&gt;&#010;&#010;
</pre>
</div>
</content>
</entry>
<entry>
<title>Re: How to run a single junit test method with ant</title>
<author><name>肖谋 &lt;xiaomou@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/ant-user/201305.mbox/%3cCACU_ZbzUKZcdiTKoQiR6EoEw91b1E9k9UmaabGmCcefoASqirA@mail.gmail.com%3e"/>
<id>urn:uuid:%3cCACU_ZbzUKZcdiTKoQiR6EoEw91b1E9k9UmaabGmCcefoASqirA@mail-gmail-com%3e</id>
<updated>2013-05-19T13:40:05Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Thank you  very much!&#010;I missed that important property.&#010;&#010;Regards&#010;xiaomou&#010;&#010;&#010;On Sun, May 12, 2013 at 11:33 PM, Antoine Levy Lambert &lt;antoine@gmx.de&gt;wrote:&#010;&#010;&gt; Hello Xiaomou,&#010;&gt;&#010;&gt; the documentation of the junit task&#010;&gt; http://ant.apache.org/manual/Tasks/junit.html&#010;&gt; mentions that the test nested element can have a methods attribute to&#010;&gt; specify the methods you want to run&#010;&gt;&#010;&gt; Comma-separated list of names of test case methods to execute. Since 1.8.2&#010;&gt;&#010;&gt; &lt;junit …&gt;&#010;&gt;    &lt;test name="com.something.XyzTest" methods="test1"&gt;&#010;&gt;    &lt;/test&gt;&#010;&gt; &lt;/junit&gt;&#010;&gt;&#010;&gt; Regards,&#010;&gt;&#010;&gt; Antoine&#010;&gt; On May 11, 2013, at 2:15 PM, 肖谋 wrote:&#010;&gt;&#010;&gt; &gt; Thanks for your reply. Perhaps I did not express my problem clearly, or&#010;&gt; may&#010;&gt; &gt; not understand your solution.&#010;&gt; &gt; My problem is : I have junit test class:&#010;&gt; &gt; class TestService {&#010;&gt; &gt;  @Test&#010;&gt; &gt;   void test1() {}&#010;&gt; &gt;  @Test&#010;&gt; &gt;   void test2() {}&#010;&gt; &gt; }&#010;&gt; &gt;&#010;&gt; &gt; now I'd like to only test the "test2" with ant command line like this:&#010;&gt; &gt; ant -Dtest=TestService -Dtestcase=test2 test-target&#010;&gt; &gt; Then how to write the build.xml?&#010;&gt; &gt;&#010;&gt; &gt; Thanks&#010;&gt; &gt;&#010;&gt; &gt;&#010;&gt; &gt; XiaoMou&#010;&gt; &gt;&#010;&gt; &gt;&#010;&gt; &gt;&#010;&gt; &gt;&#010;&gt; &gt;&#010;&gt; &gt; On Sat, May 11, 2013 at 4:00 PM, Jan Matèrne (jhm) &lt;apache@materne.de&gt;&#010;&gt; &gt; wrote:&#010;&gt; &gt;&#010;&gt; &gt;&gt; Basic idea is&#010;&gt; &gt;&gt; - specify the test to run via command line property (-Dtestcase=...)&#010;&gt; &gt;&gt; - test-targets depends on two targets running a single test or the whole&#010;&gt; &gt;&gt; test suite&#010;&gt; &gt;&gt;   &lt;target name="test" depends="-test.single,-test.all"/&gt;&#010;&gt; &gt;&gt; - that two targets are conditional according to that property&#010;&gt; &gt;&gt;   &lt;target name="-test.single" if="testcase"&gt;&#010;&gt; &gt;&gt;   &lt;target name="-test.all" unless="testcase"&gt;&#010;&gt; &gt;&gt;&#010;&gt; &gt;&gt; Jan&#010;&gt; &gt;&gt;&#010;&gt; &gt;&gt;&gt; -----Ursprüngliche Nachricht-----&#010;&gt; &gt;&gt;&gt; Von: Matt Benson [mailto:gudnabrsam@gmail.com]&#010;&gt; &gt;&gt;&gt; Gesendet: Freitag, 10. Mai 2013 16:55&#010;&gt; &gt;&gt;&gt; An: Ant Users List&#010;&gt; &gt;&gt;&gt; Betreff: Re: How to run a single junit test method with ant&#010;&gt; &gt;&gt;&gt;&#010;&gt; &gt;&gt;&gt; Typically this would be done using separate targets.  Ant's own&#010;&gt; &gt;&gt;&gt; build.xml provides an example.&#010;&gt; &gt;&gt;&gt;&#010;&gt; &gt;&gt;&gt; HTH,&#010;&gt; &gt;&gt;&gt; Matt&#010;&gt; &gt;&gt;&gt;&#010;&gt; &gt;&gt;&gt;&#010;&gt; &gt;&gt;&gt; On Thu, May 9, 2013 at 11:33 PM, 肖谋 &lt;xiaomou@gmail.com&gt; wrote:&#010;&gt; &gt;&gt;&gt;&#010;&gt; &gt;&gt;&gt;&gt; Hi, Users.&#010;&gt; &gt;&gt;&gt;&gt;   I am using ant in Linux. I can use ant junit task to run all test&#010;&gt; &gt;&gt;&gt;&gt; methods in a junit4 test class but fail to find the way to  run a&#010;&gt; &gt;&gt;&gt;&gt; single test method.  I googled and found a helpful article at&#010;&gt; &gt;&gt;&gt;&gt; https://today.java.net/pub/a/today/2003/09/12/individual-test-&#010;&gt; &gt;&gt;&gt; cases.html.&#010;&gt; &gt;&gt;&gt;&gt; However, the solution it provides does not help. My ant seems not to&#010;&gt; &gt;&gt;&gt;&gt; recognize the "tests" sysproperty.&#010;&gt; &gt;&gt;&gt;&gt;  My ant version is 1.8.4. and the related content of build.xml is&#010;&gt; &gt;&gt;&gt;&gt; listed as follows:&#010;&gt; &gt;&gt;&gt;&gt;&#010;&gt; &gt;&gt;&gt;&gt;   &lt;target name="ensure-test-name" unless="test"&gt;&#010;&gt; &gt;&gt;&gt;&gt;        &lt;fail message="You must run this target with -&#010;&gt; &gt;&gt;&gt; Dtest=TestName"/&gt;&#010;&gt; &gt;&gt;&gt;&gt;    &lt;/target&gt;&#010;&gt; &gt;&gt;&gt;&gt;&#010;&gt; &gt;&gt;&gt;&gt;    &lt;target name="run-general-test" description="Runs the test you&#010;&gt; &gt;&gt;&gt;&gt; specify on the command&#010;&gt; &gt;&gt;&gt;&gt;        line with -Dtest=" depends="compile, ensure-test-name"&gt;&#010;&gt; &gt;&gt;&gt;&gt;        &lt;junit printsummary="withOutAndErr" fork="true"&gt;&#010;&gt; &gt;&gt;&gt;&gt;            &lt;sysproperty key="tests" value="${tests}"/&gt;&#010;&gt; &gt;&gt;&gt;&gt;            &lt;classpath refid="test.classpath" /&gt;&#010;&gt; &gt;&gt;&gt;&gt;            &lt;formatter type="plain" usefile="false"/&gt;&#010;&gt; &gt;&gt;&gt;&gt;            &lt;batchtest&gt;&#010;&gt; &gt;&gt;&gt;&gt;                &lt;fileset dir="${test.src.dir}"&gt;&#010;&gt; &gt;&gt;&gt;&gt;                    &lt;include name="**/${test}.java"/&gt;&#010;&gt; &gt;&gt;&gt;&gt;                &lt;/fileset&gt;&#010;&gt; &gt;&gt;&gt;&gt;            &lt;/batchtest&gt;&#010;&gt; &gt;&gt;&gt;&gt;        &lt;/junit&gt;&#010;&gt; &gt;&gt;&gt;&gt;    &lt;/target&gt;&#010;&gt; &gt;&gt;&gt;&gt;&#010;&gt; &gt;&gt;&gt;&gt;  Please help! Thanks a lot!&#010;&gt; &gt;&gt;&gt;&gt;&#010;&gt; &gt;&gt;&gt;&gt; Regards&#010;&gt; &gt;&gt;&gt;&gt; xiaomou&#010;&gt; &gt;&gt;&gt;&gt;&#010;&gt; &gt;&gt;&#010;&gt; &gt;&gt;&#010;&gt; &gt;&gt; ---------------------------------------------------------------------&#010;&gt; &gt;&gt; To unsubscribe, e-mail: user-unsubscribe@ant.apache.org&#010;&gt; &gt;&gt; For additional commands, e-mail: user-help@ant.apache.org&#010;&gt; &gt;&gt;&#010;&gt; &gt;&gt;&#010;&gt;&#010;&gt;&#010;&#010;
</pre>
</div>
</content>
</entry>
<entry>
<title>AW: editstring macro</title>
<author><name>Jan Matèrne (jhm) &lt;apache@materne.de&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/ant-user/201305.mbox/%3c000001ce51f3$60240840$206c18c0$@de%3e"/>
<id>urn:uuid:%3c000001ce51f3$60240840$206c18c0$@de%3e</id>
<updated>2013-05-16T05:08:16Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
No props is one of the developed antlibs, which were never released.&#010;Sources and tests are all available under ASL at ASF servers.&#010;But there is not binary distro, so you must build it yourself (which&#010;shouldn't be more difficult than &#010;invoking "ant").&#010;&#010;Jan&#010;&#010;&gt; -----Ursprüngliche Nachricht-----&#010;&gt; Von: Peter West [mailto:lists@pbw.id.au]&#010;&gt; Gesendet: Mittwoch, 15. Mai 2013 23:59&#010;&gt; An: Ant Users List&#010;&gt; Betreff: Re: editstring macro&#010;&gt; &#010;&gt; Thanks Jan.&#010;&gt; &#010;&gt; I saw the description of propertyhelper in the manual, but got the&#010;&gt; impression that it was for developing implementations external to the&#010;&gt; distribution.  Is the props antlib part of the standard distribution?&#010;&gt; There is nothing that I could see about props antlib in the downloads&#010;&gt; section of the Apache Props Antlib webpage. Is it part of antunit? I&#010;&gt; couldn't see any indication of that in antunit jar.&#010;&gt; &#010;&gt; I was after a solution that did _not_ require any additional&#010;&gt; dependencies.&#010;&gt; &#010;&gt; Peter West&#010;&gt; &#010;&gt; "When the Spirit of truth comes, he will guide you into all the&#010;&gt; truth..."&#010;&gt; &#010;&gt; On 15/05/2013, at 3:54 PM, Jan Matèrne (jhm) &lt;apache@materne.de&gt; wrote:&#010;&gt; &#010;&gt; &gt; Have you tried Ant Props?&#010;&gt; &gt; http://ant.apache.org/antlibs/props/index.html&#010;&gt; &gt;&#010;&gt; https://svn.apache.org/repos/asf/ant/antlibs/props/trunk/src/tests/ant&#010;&gt; &gt; unit/s&#010;&gt; &gt; tringops-test.xml&#010;&gt; &gt; - testReplaceFirst&#010;&gt; &gt; - testReplaceAll&#010;&gt; &gt; - testPackageMapping&#010;&gt; &gt;&#010;&gt; &gt; Jan&#010;&gt; &gt;&#010;&gt; &gt;&gt; -----Ursprüngliche Nachricht-----&#010;&gt; &gt;&gt; Von: Peter West [mailto:lists@pbw.id.au]&#010;&gt; &gt;&gt; Gesendet: Mittwoch, 15. Mai 2013 04:08&#010;&gt; &gt;&gt; An: Ant Users List&#010;&gt; &gt;&gt; Betreff: editstring macro&#010;&gt; &gt;&gt;&#010;&gt; &gt;&gt; I have posted a discussion and code for a macro to edit a string&#010;&gt; &gt;&gt; value, placing the result into a property.  I'm sure various people&#010;&gt; &gt;&gt; have done the same sort of thing before, but this might be a handy&#010;&gt; reference.&#010;&gt; &gt;&gt;&#010;&gt; &gt;&gt; http://codepulsive.blogspot.com.au/2013/05/ant-edit-property-&#010;&gt; &gt;&gt; values.html&#010;&gt; &gt;&gt;&#010;&gt; &gt;&gt; An example build.xml is available at&#010;&gt; &gt;&gt; &lt;http://pbw.id.au/editstring/build.xml&gt;.&#010;&gt; &gt;&gt;&#010;&gt; &gt;&gt;&#010;&gt; &gt;&gt; Peter West&#010;&gt; &gt;&gt;&#010;&gt; &gt;&gt; "When the Spirit of truth comes, he will guide you into all the&#010;&gt; &gt;&gt; truth..."&#010;&gt; &gt;&gt;&#010;&gt; &gt;&gt;&#010;&gt; &gt;&gt; --------------------------------------------------------------------&#010;&gt; -&#010;&gt; &gt;&gt; To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For&#010;&gt; &gt;&gt; additional commands, e-mail: user-help@ant.apache.org&#010;&gt; &gt;&#010;&gt; &gt;&#010;&gt; &gt;&#010;&gt; &gt; ---------------------------------------------------------------------&#010;&gt; &gt; To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For&#010;&gt; additional&#010;&gt; &gt; commands, e-mail: user-help@ant.apache.org&#010;&gt; &gt;&#010;&gt; &#010;&gt; &#010;&gt; ---------------------------------------------------------------------&#010;&gt; To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional&#010;&gt; commands, e-mail: user-help@ant.apache.org&#010;&#010;&#010;&#010;---------------------------------------------------------------------&#010;To unsubscribe, e-mail: user-unsubscribe@ant.apache.org&#010;For additional commands, e-mail: user-help@ant.apache.org&#010;&#010;&#010;
</pre>
</div>
</content>
</entry>
<entry>
<title>Re: How to invoke the JDK 1.6 annotation processing engine?</title>
<author><name>OrlandoDFree &lt;odfree@sbcglobal.net&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/ant-user/201305.mbox/%3c1368659415798-5714170.post@n5.nabble.com%3e"/>
<id>urn:uuid:%3c1368659415798-5714170-post@n5-nabble-com%3e</id>
<updated>2013-05-15T23:10:15Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
In Java 1.6, you access the annotation processor by a flag sent to the&#010;compiler. So you can do the same thing in ANT, using the javac ANT task.&#010;&#010;&#009;&#009;&lt;javac srcdir="${src}" destdir="${src}" excludes="*_.java" source="1.7"&gt;&#010;&#009;&#009;&#009;&lt;classpath refid="lib.path"/&gt;&#010;&#009;&#009;&#009;&lt;compilerarg value="-Aopenjpa.metamodel=true"/&gt;&#010;&#009;&#009;&lt;/javac&gt;&#010;&#010;&#010;&#010;&#010;--&#010;View this message in context: http://ant.1045680.n5.nabble.com/How-to-invoke-the-JDK-1-6-annotation-processing-engine-tp1347722p5714170.html&#010;Sent from the Ant - Users mailing list archive at Nabble.com.&#010;&#010;---------------------------------------------------------------------&#010;To unsubscribe, e-mail: user-unsubscribe@ant.apache.org&#010;For additional commands, e-mail: user-help@ant.apache.org&#010;&#010;&#010;
</pre>
</div>
</content>
</entry>
<entry>
<title>Re: editstring macro</title>
<author><name>Peter West &lt;lists@pbw.id.au&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/ant-user/201305.mbox/%3cE3E215D4-95BC-4AB5-BF22-2B83D88851C4@pbw.id.au%3e"/>
<id>urn:uuid:%3cE3E215D4-95BC-4AB5-BF22-2B83D88851C4@pbw-id-au%3e</id>
<updated>2013-05-15T21:58:45Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Thanks Jan.&#010;&#010;I saw the description of propertyhelper in the manual, but got the impression that it was&#010;for developing implementations external to the distribution.  Is the props antlib part of&#010;the standard distribution? There is nothing that I could see about props antlib in the downloads&#010;section of the Apache Props Antlib webpage. Is it part of antunit? I couldn't see any indication&#010;of that in antunit jar.&#010;&#010;I was after a solution that did _not_ require any additional dependencies.&#010;&#010;Peter West&#010;&#010;"When the Spirit of truth comes, he will guide you into all the truth..."&#010;&#010;On 15/05/2013, at 3:54 PM, Jan Matèrne (jhm) &lt;apache@materne.de&gt; wrote:&#010;&#010;&gt; Have you tried Ant Props?&#010;&gt; http://ant.apache.org/antlibs/props/index.html&#010;&gt; https://svn.apache.org/repos/asf/ant/antlibs/props/trunk/src/tests/antunit/s&#010;&gt; tringops-test.xml&#010;&gt; - testReplaceFirst&#010;&gt; - testReplaceAll&#010;&gt; - testPackageMapping&#010;&gt; &#010;&gt; Jan&#010;&gt; &#010;&gt;&gt; -----Ursprüngliche Nachricht-----&#010;&gt;&gt; Von: Peter West [mailto:lists@pbw.id.au]&#010;&gt;&gt; Gesendet: Mittwoch, 15. Mai 2013 04:08&#010;&gt;&gt; An: Ant Users List&#010;&gt;&gt; Betreff: editstring macro&#010;&gt;&gt; &#010;&gt;&gt; I have posted a discussion and code for a macro to edit a string value,&#010;&gt;&gt; placing the result into a property.  I'm sure various people have done&#010;&gt;&gt; the same sort of thing before, but this might be a handy reference.&#010;&gt;&gt; &#010;&gt;&gt; http://codepulsive.blogspot.com.au/2013/05/ant-edit-property-&#010;&gt;&gt; values.html&#010;&gt;&gt; &#010;&gt;&gt; An example build.xml is available at&#010;&gt;&gt; &lt;http://pbw.id.au/editstring/build.xml&gt;.&#010;&gt;&gt; &#010;&gt;&gt; &#010;&gt;&gt; Peter West&#010;&gt;&gt; &#010;&gt;&gt; "When the Spirit of truth comes, he will guide you into all the&#010;&gt;&gt; truth..."&#010;&gt;&gt; &#010;&gt;&gt; &#010;&gt;&gt; ---------------------------------------------------------------------&#010;&gt;&gt; To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional&#010;&gt;&gt; commands, e-mail: user-help@ant.apache.org&#010;&gt; &#010;&gt; &#010;&gt; &#010;&gt; ---------------------------------------------------------------------&#010;&gt; To unsubscribe, e-mail: user-unsubscribe@ant.apache.org&#010;&gt; For additional commands, e-mail: user-help@ant.apache.org&#010;&gt; &#010;&#010;&#010;---------------------------------------------------------------------&#010;To unsubscribe, e-mail: user-unsubscribe@ant.apache.org&#010;For additional commands, e-mail: user-help@ant.apache.org&#010;&#010;&#010;
</pre>
</div>
</content>
</entry>
<entry>
<title>Re: &lt;target unless=...&gt;</title>
<author><name>Eric Fetzer &lt;elstonkers@yahoo.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/ant-user/201305.mbox/%3c1368633545.62100.YahooMailNeo@web126105.mail.ne1.yahoo.com%3e"/>
<id>urn:uuid:%3c1368633545-62100-YahooMailNeo@web126105-mail-ne1-yahoo-com%3e</id>
<updated>2013-05-15T15:59:05Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Ahhh, you're using var instead of property.  I missed that before.  Since you instantiate&#010;it first, the scope remains over the antcalls.  Beautiful, thanks Budd!&#010; &#010;Eric&#010;&#010;----- Original Message -----&#010;From: "McNish, Budd" &lt;bmcnish@HealthPlan.com&gt;&#010;To: Ant Users List &lt;user@ant.apache.org&gt;; 'Eric Fetzer' &lt;elstonkers@yahoo.com&gt;&#010;Cc: &#010;Sent: Wednesday, May 15, 2013 9:36 AM&#010;Subject: RE: &lt;target unless=...&gt;&#010;&#010;Eric,&#010;&#010;Okay try this one.&#010;&#010;&lt;project default="invalid"&gt;&#010;  &lt;target name="invalid"&gt;&#010;      &lt;taskdef resource="net/sf/antcontrib/antcontrib.properties"&gt;&#010;      &lt;classpath location="${antcontrib.jar}"/&gt;&#010;    &lt;/taskdef&gt;&#010;      &lt;var name="testit" value="" /&gt;&#010;      &lt;antcall target="test1" inheritall="true" /&gt;&#010;    &lt;antcall target="test2" inheritall="true" /&gt;&#010;  &lt;/target&gt;&#010;  &lt;target name="test1" depends="setvalue"&gt;&#010;    &lt;echo message="in test1 and value of testit is:  ${testit}"/&gt;&#010;  &lt;/target&gt;&#010;  &lt;target name="test2" unless="testit"&gt;&#010;    &lt;echo message="in test2"/&gt;&#010;    &lt;echo message="value of testit is:  ${testit}"/&gt;&#010;  &lt;/target&gt;&#010;  &lt;target name="setvalue"&gt;&#010;      &lt;echo&gt;setting the value to 1.2.3.4&lt;/echo&gt;&#010;      &lt;var name="testit" value="1.2.3.4" /&gt;&#010;      &lt;echo&gt;testit = ${testit}&lt;/echo&gt;&#010;  &lt;/target&gt;&#010;&lt;/project&gt;&#010;&#010;C:\IBM&gt;ant -f /temp/throw.xml&#010;Buildfile: C:\temp\throw.xml&#010;&#010;invalid:&#010;&#010;setvalue:&#010;    [echo] setting the value to 1.2.3.4&#010;    [echo] testit = 1.2.3.4&#010;&#010;test1:&#010;    [echo] in test1 and value of testit is:  1.2.3.4&#010;&#010;test2:&#010;&#010;BUILD SUCCESSFUL&#010;Total time: 0 seconds&#010;&#010;C:\IBM&gt;&#010;&#010;Budd A. McNish&#010;&#010;Health Plan Services&#010;813-289-1000 ext. 2352&#010;&#010;&#010;&#010;&#010;-----Original Message-----&#010;From: Eric Fetzer [mailto:elstonkers@yahoo.com] &#010;Sent: Wednesday, May 15, 2013 11:21 AM&#010;To: Ant Users List&#010;Subject: Re: &lt;target unless=...&gt;&#010;&#010;Sorry Budd, it looks like I wasn't clear on one aspect of this.  The value of this property&#010;must be set inside of the first target called.  In reality, the first target called has a depends&#010;target that may set this property.  Based on whether it sets that property, we may or&#010;may not want to come back to that target again.  So a more valid repro would be:&#010;&#010;&lt;project name="test" default="testIt"&gt;&#010;  &lt;taskdef resource="net/sf/antcontrib/antlib.xml"/&gt;&#010;  &lt;target name="testIt"&gt;&#010;     &lt;antcall target="test1" inheritall="true" /&gt;&#010;     &lt;echo message="back out to main target, label is:  ${label}"/&gt;&#010;     &lt;antcall target="test2" inheritall="true" /&gt;&#010;  &lt;/target&gt;&#010;  &lt;target name="test1" depends="setLabel" &gt;&#010;    &lt;echo message="in test1 and value of label is:  ${label}"/&gt;&#010;  &lt;/target&gt;&#010;  &lt;target name="test2" depends="setLabel"&gt;&#010;    &lt;echo message="in test2"/&gt;&#010;    &lt;echo message="value of label is:  ${label}"/&gt;&#010;  &lt;/target&gt;&#010;  &lt;target name="setLabel" unless="label"&gt;&#010;    &lt;property name="label" value="1.2.3.4"/&gt;&#010;    &lt;echo message="I'm creating a label here..."/&gt;&#010;  &lt;/target&gt;&#010;&lt;/project&gt;&#010;&#010;And the results from running this are:&#010;&#010;&#010;Buildfile: test.xml&#010;testIt:&#010;setLabel:&#010;     [echo] I'm creating a label here...&#010;test1:&#010;     [echo] in test1 and value of label is:  1.2.3.4&#010;     [echo] back out to main target, label is:  ${label}&#010;setLabel:&#010;     [echo] I'm creating a label here...&#010;test2:&#010;     [echo] in test2&#010;     [echo] value of label is:  1.2.3.4&#010;BUILD SUCCESSFUL&#010;Total time: 0 seconds&#010;&#010;&#010;You see that it attempts to create the label twice which will fail in my real application. &#010;I think what I need to do instead is:&#010;&#010;&lt;project name="test" default="testIt"&gt;&#010;  &lt;taskdef resource="net/sf/antcontrib/antlib.xml"/&gt;&#010;  &lt;target name="testIt" depends="setLabel"&gt;&#010;     &lt;antcall target="test1" inheritall="true" /&gt;&#010;     &lt;antcall target="test2" inheritall="true" /&gt;&#010;  &lt;/target&gt;&#010;  &lt;target name="test1"&gt;&#010;    &lt;echo message="in test1 and value of label is:  ${label}"/&gt;&#010;  &lt;/target&gt;&#010;  &lt;target name="test2"&gt;&#010;    &lt;echo message="in test2"/&gt;&#010;    &lt;echo message="value of label is:  ${label}"/&gt;&#010;  &lt;/target&gt;&#010;  &lt;target name="setLabel"&gt;&#010;    &lt;property name="label" value="1.2.3.4"/&gt;&#010;    &lt;echo message="I'm creating a label here..."/&gt;&#010;  &lt;/target&gt;&#010;&lt;/project&gt;&#010;&#010;In my real world application, that will take some rewriting, but simple is good...  Thanks&#010;for looking at my spaghetti (mmmmmm, meatballs)!&#010;&#010;Thanks,&#010;Eric&#010;&#010;&#010;&#010;----- Original Message -----&#010;From: "McNish, Budd" &lt;bmcnish@HealthPlan.com&gt;&#010;To: Ant Users &lt;user@ant.apache.org&gt;; 'Eric Fetzer' &lt;elstonkers@yahoo.com&gt;&#010;Cc: &#010;Sent: Wednesday, May 15, 2013 8:48 AM&#010;Subject: RE: &lt;target unless=...&gt;&#010;&#010;This works.&#010;&#010;&lt;project default="invalid"&gt;&#010;  &lt;target name="invalid"&gt;&#010;      &lt;property name="testit" value="" /&gt;&#010;      &lt;antcall target="test1" inheritall="true" &gt;&#010;        &lt;param name="testit" value="true"/&gt;&#010;      &lt;/antcall&gt;&#010;    &lt;antcall target="test2" inheritall="true" /&gt;&#010;  &lt;/target&gt;&#010;  &lt;target name="test1"&gt;&#010;    &lt;echo message="in test1 and value of testit is:  ${testit}"/&gt;&#010;  &lt;/target&gt;&#010;  &lt;target name="test2" unless="testit"&gt;&#010;    &lt;echo message="in test2"/&gt;&#010;    &lt;echo message="value of testit is:  ${testit}"/&gt;&#010;  &lt;/target&gt;&#010;&#010;&lt;/project&gt;&#010;&#010;C:\IBM&gt;ant -f /temp/throw.xml&#010;Buildfile: C:\temp\throw.xml&#010;&#010;invalid:&#010;&#010;test1:&#010;    [echo] in test1 and value of testit is:  true&#010;&#010;test2:&#010;&#010;BUILD SUCCESSFUL&#010;Total time: 0 seconds&#010;&#010;C:\IBM&gt;&#010;&#010;Budd A. McNish&#010;&#010;Health Plan Services&#010;813-289-1000 ext. 2352&#010;&#010;&#010;&#010;&#010;-----Original Message-----&#010;From: Eric Fetzer [mailto:elstonkers@yahoo.com]&#010;Sent: Wednesday, May 15, 2013 10:14 AM&#010;To: Ant Users&#010;Subject: &lt;target unless=...&gt;&#010;&#010;Hi!  I've found that my unless= is somewhat useless when using &lt;antcall&gt;.  Here's&#010;a repro for what I'm trying to do:&#010; &#010;&lt;project name="test" default="testIt"&gt;&#010;  &lt;taskdef resource="net/sf/antcontrib/antlib.xml"/&gt;&#010;  &lt;target name="testIt"&gt;&#010;     &lt;antcall target="test1" inheritall="true" /&gt;&#010;     &lt;antcall target="test2" inheritall="true" /&gt;&#010;  &lt;/target&gt;&#010;  &lt;target name="test1"&gt;&#010;    &lt;property name="testit" value="true"/&gt;&#010;    &lt;echo message="in test1 and value of testit is:  ${testit}"/&gt;&#010;  &lt;/target&gt;&#010;  &lt;target name="test2" unless="testit"&gt;&#010;    &lt;echo message="in test2"/&gt;&#010;    &lt;echo message="value of testit is:  ${testit}"/&gt;&#010;  &lt;/target&gt;&#010;&lt;/project&gt;&#010; &#010;And the results that I'm sure you anticipate as you understand how antcall works:&#010; &#010;[me@myMachine]$ ant -f test.xml&#010;Buildfile: test.xml&#010;testIt:&#010;test1:&#010;     [echo] in test1 and value of testit is:  true&#010;test2:&#010;     [echo] in test2&#010;     [echo] value of testit is:  ${testit} BUILD SUCCESSFUL Total time: 0 seconds&#010; &#010; &#010;My actual antcall is in a for loop using a list to call targets that start with the same word,&#010;like so:&#010; &#010;&lt;for list="${build.apps} param="app"&gt;&#010;   &lt;sequential&gt;&#010;      &lt;antcall target="build@{app}"/&gt;&#010;   &lt;/sequential&gt;&#010;&lt;/for&gt;&#010; &#010;Can anyone give me a better methodology for achieving the results I'm after?&#010; &#010;Thanks,&#010;Eric&#010;&#010;---------------------------------------------------------------------&#010;To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org&#010;&#010;_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ CONFIDENTIALITY&#010;NOTICE: If you have received this email in error, please immediately notify the sender by&#010;e-mail at the address shown.This email transmission may contain confidential information.This&#010;information is intended only for the use of the individual(s) or entity to whom it is intended&#010;even if addressed incorrectly. Please delete it from your files if you are not the intended&#010;recipient. Thank you for your compliance.&#010;&#010;---------------------------------------------------------------------&#010;To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org&#010;&#010;&#010;---------------------------------------------------------------------&#010;To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org&#010;&#010;_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _&#010;CONFIDENTIALITY NOTICE: If you have received this email in error, please immediately notify&#010;the sender by e-mail at the address shown.This email transmission may contain confidential&#010;information.This information is intended only for the use of the individual(s) or entity to&#010;whom it is intended even if addressed incorrectly. Please delete it from your files if you&#010;are not the intended recipient. Thank you for your compliance. &#010;&#010;---------------------------------------------------------------------&#010;To unsubscribe, e-mail: user-unsubscribe@ant.apache.org&#010;For additional commands, e-mail: user-help@ant.apache.org&#010;&#010;&#010;
</pre>
</div>
</content>
</entry>
<entry>
<title>RE: &lt;target unless=...&gt;</title>
<author><name>&quot;McNish, Budd&quot; &lt;bmcnish@HealthPlan.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/ant-user/201305.mbox/%3c80F7368F81C4A2418857DEC06EAB462620995B2E@WIN-EXDAG-01.HPS.HPH.AD%3e"/>
<id>urn:uuid:%3c80F7368F81C4A2418857DEC06EAB462620995B2E@WIN-EXDAG-01-HPS-HPH-AD%3e</id>
<updated>2013-05-15T15:36:07Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Eric,&#010;&#010;Okay try this one.&#010;&#010;&lt;project default="invalid"&gt;&#010;  &lt;target name="invalid"&gt;&#010;  &#009;&lt;taskdef resource="net/sf/antcontrib/antcontrib.properties"&gt;&#010;      &lt;classpath location="${antcontrib.jar}"/&gt;&#010;    &lt;/taskdef&gt;&#010;  &#009; &lt;var name="testit" value="" /&gt;&#010;  &#009; &lt;antcall target="test1" inheritall="true" /&gt;&#010;     &lt;antcall target="test2" inheritall="true" /&gt;&#010;  &lt;/target&gt;&#010;  &lt;target name="test1" depends="setvalue"&gt;&#010;    &lt;echo message="in test1 and value of testit is:  ${testit}"/&gt;&#010;  &lt;/target&gt;&#010;  &lt;target name="test2" unless="testit"&gt;&#010;    &lt;echo message="in test2"/&gt;&#010;    &lt;echo message="value of testit is:  ${testit}"/&gt;&#010;  &lt;/target&gt;&#010;  &lt;target name="setvalue"&gt;&#010;  &#009; &lt;echo&gt;setting the value to 1.2.3.4&lt;/echo&gt;&#010;  &#009; &lt;var name="testit" value="1.2.3.4" /&gt;&#010;  &#009; &lt;echo&gt;testit = ${testit}&lt;/echo&gt;&#010;  &lt;/target&gt;&#010;&lt;/project&gt;&#010;&#010;C:\IBM&gt;ant -f /temp/throw.xml&#010;Buildfile: C:\temp\throw.xml&#010;&#010;invalid:&#010;&#010;setvalue:&#010;     [echo] setting the value to 1.2.3.4&#010;     [echo] testit = 1.2.3.4&#010;&#010;test1:&#010;     [echo] in test1 and value of testit is:  1.2.3.4&#010;&#010;test2:&#010;&#010;BUILD SUCCESSFUL&#010;Total time: 0 seconds&#010;&#010;C:\IBM&gt;&#010;&#010;Budd A. McNish&#010;&#010;Health Plan Services&#010;813-289-1000 ext. 2352&#010;&#010;&#010;&#010;&#010;-----Original Message-----&#010;From: Eric Fetzer [mailto:elstonkers@yahoo.com] &#010;Sent: Wednesday, May 15, 2013 11:21 AM&#010;To: Ant Users List&#010;Subject: Re: &lt;target unless=...&gt;&#010;&#010;Sorry Budd, it looks like I wasn't clear on one aspect of this.  The value of this property&#010;must be set inside of the first target called.  In reality, the first target called has a depends&#010;target that may set this property.  Based on whether it sets that property, we may or&#010;may not want to come back to that target again.  So a more valid repro would be:&#010;&#010;&lt;project name="test" default="testIt"&gt;&#010;  &lt;taskdef resource="net/sf/antcontrib/antlib.xml"/&gt;&#010;  &lt;target name="testIt"&gt;&#010;     &lt;antcall target="test1" inheritall="true" /&gt;&#010;     &lt;echo message="back out to main target, label is:  ${label}"/&gt;&#010;     &lt;antcall target="test2" inheritall="true" /&gt;&#010;  &lt;/target&gt;&#010;  &lt;target name="test1" depends="setLabel" &gt;&#010;    &lt;echo message="in test1 and value of label is:  ${label}"/&gt;&#010;  &lt;/target&gt;&#010;  &lt;target name="test2" depends="setLabel"&gt;&#010;    &lt;echo message="in test2"/&gt;&#010;    &lt;echo message="value of label is:  ${label}"/&gt;&#010;  &lt;/target&gt;&#010;  &lt;target name="setLabel" unless="label"&gt;&#010;    &lt;property name="label" value="1.2.3.4"/&gt;&#010;    &lt;echo message="I'm creating a label here..."/&gt;&#010;  &lt;/target&gt;&#010;&lt;/project&gt;&#010;&#010;And the results from running this are:&#010;&#010;&#010;Buildfile: test.xml&#010;testIt:&#010;setLabel:&#010;     [echo] I'm creating a label here...&#010;test1:&#010;     [echo] in test1 and value of label is:  1.2.3.4&#010;     [echo] back out to main target, label is:  ${label}&#010;setLabel:&#010;     [echo] I'm creating a label here...&#010;test2:&#010;     [echo] in test2&#010;     [echo] value of label is:  1.2.3.4&#010;BUILD SUCCESSFUL&#010;Total time: 0 seconds&#010;&#010;&#010;You see that it attempts to create the label twice which will fail in my real application. &#010;I think what I need to do instead is:&#010;&#010;&lt;project name="test" default="testIt"&gt;&#010;  &lt;taskdef resource="net/sf/antcontrib/antlib.xml"/&gt;&#010;  &lt;target name="testIt" depends="setLabel"&gt;&#010;     &lt;antcall target="test1" inheritall="true" /&gt;&#010;     &lt;antcall target="test2" inheritall="true" /&gt;&#010;  &lt;/target&gt;&#010;  &lt;target name="test1"&gt;&#010;    &lt;echo message="in test1 and value of label is:  ${label}"/&gt;&#010;  &lt;/target&gt;&#010;  &lt;target name="test2"&gt;&#010;    &lt;echo message="in test2"/&gt;&#010;    &lt;echo message="value of label is:  ${label}"/&gt;&#010;  &lt;/target&gt;&#010;  &lt;target name="setLabel"&gt;&#010;    &lt;property name="label" value="1.2.3.4"/&gt;&#010;    &lt;echo message="I'm creating a label here..."/&gt;&#010;  &lt;/target&gt;&#010;&lt;/project&gt;&#010;&#010;In my real world application, that will take some rewriting, but simple is good...  Thanks&#010;for looking at my spaghetti (mmmmmm, meatballs)!&#010;&#010;Thanks,&#010;Eric&#010;&#010;&#010;&#010;----- Original Message -----&#010;From: "McNish, Budd" &lt;bmcnish@HealthPlan.com&gt;&#010;To: Ant Users &lt;user@ant.apache.org&gt;; 'Eric Fetzer' &lt;elstonkers@yahoo.com&gt;&#010;Cc: &#010;Sent: Wednesday, May 15, 2013 8:48 AM&#010;Subject: RE: &lt;target unless=...&gt;&#010;&#010;This works.&#010;&#010;&lt;project default="invalid"&gt;&#010;  &lt;target name="invalid"&gt;&#010;      &lt;property name="testit" value="" /&gt;&#010;      &lt;antcall target="test1" inheritall="true" &gt;&#010;        &lt;param name="testit" value="true"/&gt;&#010;      &lt;/antcall&gt;&#010;    &lt;antcall target="test2" inheritall="true" /&gt;&#010;  &lt;/target&gt;&#010;  &lt;target name="test1"&gt;&#010;    &lt;echo message="in test1 and value of testit is:  ${testit}"/&gt;&#010;  &lt;/target&gt;&#010;  &lt;target name="test2" unless="testit"&gt;&#010;    &lt;echo message="in test2"/&gt;&#010;    &lt;echo message="value of testit is:  ${testit}"/&gt;&#010;  &lt;/target&gt;&#010;&#010;&lt;/project&gt;&#010;&#010;C:\IBM&gt;ant -f /temp/throw.xml&#010;Buildfile: C:\temp\throw.xml&#010;&#010;invalid:&#010;&#010;test1:&#010;    [echo] in test1 and value of testit is:  true&#010;&#010;test2:&#010;&#010;BUILD SUCCESSFUL&#010;Total time: 0 seconds&#010;&#010;C:\IBM&gt;&#010;&#010;Budd A. McNish&#010;&#010;Health Plan Services&#010;813-289-1000 ext. 2352&#010;&#010;&#010;&#010;&#010;-----Original Message-----&#010;From: Eric Fetzer [mailto:elstonkers@yahoo.com]&#010;Sent: Wednesday, May 15, 2013 10:14 AM&#010;To: Ant Users&#010;Subject: &lt;target unless=...&gt;&#010;&#010;Hi!  I've found that my unless= is somewhat useless when using &lt;antcall&gt;.  Here's&#010;a repro for what I'm trying to do:&#010; &#010;&lt;project name="test" default="testIt"&gt;&#010;  &lt;taskdef resource="net/sf/antcontrib/antlib.xml"/&gt;&#010;  &lt;target name="testIt"&gt;&#010;     &lt;antcall target="test1" inheritall="true" /&gt;&#010;     &lt;antcall target="test2" inheritall="true" /&gt;&#010;  &lt;/target&gt;&#010;  &lt;target name="test1"&gt;&#010;    &lt;property name="testit" value="true"/&gt;&#010;    &lt;echo message="in test1 and value of testit is:  ${testit}"/&gt;&#010;  &lt;/target&gt;&#010;  &lt;target name="test2" unless="testit"&gt;&#010;    &lt;echo message="in test2"/&gt;&#010;    &lt;echo message="value of testit is:  ${testit}"/&gt;&#010;  &lt;/target&gt;&#010;&lt;/project&gt;&#010; &#010;And the results that I'm sure you anticipate as you understand how antcall works:&#010; &#010;[me@myMachine]$ ant -f test.xml&#010;Buildfile: test.xml&#010;testIt:&#010;test1:&#010;     [echo] in test1 and value of testit is:  true&#010;test2:&#010;     [echo] in test2&#010;     [echo] value of testit is:  ${testit} BUILD SUCCESSFUL Total time: 0 seconds&#010; &#010; &#010;My actual antcall is in a for loop using a list to call targets that start with the same word,&#010;like so:&#010; &#010;&lt;for list="${build.apps} param="app"&gt;&#010;   &lt;sequential&gt;&#010;      &lt;antcall target="build@{app}"/&gt;&#010;   &lt;/sequential&gt;&#010;&lt;/for&gt;&#010; &#010;Can anyone give me a better methodology for achieving the results I'm after?&#010; &#010;Thanks,&#010;Eric&#010;&#010;---------------------------------------------------------------------&#010;To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org&#010;&#010;_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ CONFIDENTIALITY&#010;NOTICE: If you have received this email in error, please immediately notify the sender by&#010;e-mail at the address shown.This email transmission may contain confidential information.This&#010;information is intended only for the use of the individual(s) or entity to whom it is intended&#010;even if addressed incorrectly. Please delete it from your files if you are not the intended&#010;recipient. Thank you for your compliance.&#010;&#010;---------------------------------------------------------------------&#010;To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org&#010;&#010;&#010;---------------------------------------------------------------------&#010;To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org&#010;&#010;_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _&#010;CONFIDENTIALITY NOTICE: If you have received this email in error, please immediately notify&#010;the sender by e-mail at the address shown.This email transmission may contain confidential&#010;information.This information is intended only for the use of the individual(s) or entity to&#010;whom it is intended even if addressed incorrectly. Please delete it from your files if you&#010;are not the intended recipient. Thank you for your compliance.&#010;&#010;---------------------------------------------------------------------&#010;To unsubscribe, e-mail: user-unsubscribe@ant.apache.org&#010;For additional commands, e-mail: user-help@ant.apache.org&#010;&#010;&#010;
</pre>
</div>
</content>
</entry>
<entry>
<title>Re: &lt;target unless=...&gt;</title>
<author><name>Eric Fetzer &lt;elstonkers@yahoo.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/ant-user/201305.mbox/%3c1368631280.2212.YahooMailNeo@web126106.mail.ne1.yahoo.com%3e"/>
<id>urn:uuid:%3c1368631280-2212-YahooMailNeo@web126106-mail-ne1-yahoo-com%3e</id>
<updated>2013-05-15T15:21:20Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Sorry Budd, it looks like I wasn't clear on one aspect of this.  The value of this property&#010;must be set inside of the first target called.  In reality, the first target called has a depends&#010;target that may set this property.  Based on whether it sets that property, we may or&#010;may not want to come back to that target again.  So a more valid repro would be:&#010;&#010;&lt;project name="test" default="testIt"&gt;&#010;  &lt;taskdef resource="net/sf/antcontrib/antlib.xml"/&gt;&#010;  &lt;target name="testIt"&gt;&#010;     &lt;antcall target="test1" inheritall="true" /&gt;&#010;     &lt;echo message="back out to main target, label is:  ${label}"/&gt;&#010;     &lt;antcall target="test2" inheritall="true" /&gt;&#010;  &lt;/target&gt;&#010;  &lt;target name="test1" depends="setLabel" &gt;&#010;    &lt;echo message="in test1 and value of label is:  ${label}"/&gt;&#010;  &lt;/target&gt;&#010;  &lt;target name="test2" depends="setLabel"&gt;&#010;    &lt;echo message="in test2"/&gt;&#010;    &lt;echo message="value of label is:  ${label}"/&gt;&#010;  &lt;/target&gt;&#010;  &lt;target name="setLabel" unless="label"&gt;&#010;    &lt;property name="label" value="1.2.3.4"/&gt;&#010;    &lt;echo message="I'm creating a label here..."/&gt;&#010;  &lt;/target&gt;&#010;&lt;/project&gt;&#010;&#010;And the results from running this are:&#010;&#010;&#010;Buildfile: test.xml&#010;testIt:&#010;setLabel:&#010;     [echo] I'm creating a label here...&#010;test1:&#010;     [echo] in test1 and value of label is:  1.2.3.4&#010;     [echo] back out to main target, label is:  ${label}&#010;setLabel:&#010;     [echo] I'm creating a label here...&#010;test2:&#010;     [echo] in test2&#010;     [echo] value of label is:  1.2.3.4&#010;BUILD SUCCESSFUL&#010;Total time: 0 seconds&#010;&#010;&#010;You see that it attempts to create the label twice which will fail in my real application. &#010;I think what I need to do instead is:&#010;&#010;&lt;project name="test" default="testIt"&gt;&#010;  &lt;taskdef resource="net/sf/antcontrib/antlib.xml"/&gt;&#010;  &lt;target name="testIt" depends="setLabel"&gt;&#010;     &lt;antcall target="test1" inheritall="true" /&gt;&#010;     &lt;antcall target="test2" inheritall="true" /&gt;&#010;  &lt;/target&gt;&#010;  &lt;target name="test1"&gt;&#010;    &lt;echo message="in test1 and value of label is:  ${label}"/&gt;&#010;  &lt;/target&gt;&#010;  &lt;target name="test2"&gt;&#010;    &lt;echo message="in test2"/&gt;&#010;    &lt;echo message="value of label is:  ${label}"/&gt;&#010;  &lt;/target&gt;&#010;  &lt;target name="setLabel"&gt;&#010;    &lt;property name="label" value="1.2.3.4"/&gt;&#010;    &lt;echo message="I'm creating a label here..."/&gt;&#010;  &lt;/target&gt;&#010;&lt;/project&gt;&#010;&#010;In my real world application, that will take some rewriting, but simple is good...  Thanks&#010;for looking at my spaghetti (mmmmmm, meatballs)!&#010;&#010;Thanks,&#010;Eric&#010;&#010;&#010;&#010;----- Original Message -----&#010;From: "McNish, Budd" &lt;bmcnish@HealthPlan.com&gt;&#010;To: Ant Users &lt;user@ant.apache.org&gt;; 'Eric Fetzer' &lt;elstonkers@yahoo.com&gt;&#010;Cc: &#010;Sent: Wednesday, May 15, 2013 8:48 AM&#010;Subject: RE: &lt;target unless=...&gt;&#010;&#010;This works.&#010;&#010;&lt;project default="invalid"&gt;&#010;  &lt;target name="invalid"&gt;&#010;      &lt;property name="testit" value="" /&gt;&#010;      &lt;antcall target="test1" inheritall="true" &gt;&#010;        &lt;param name="testit" value="true"/&gt;&#010;      &lt;/antcall&gt;&#010;    &lt;antcall target="test2" inheritall="true" /&gt;&#010;  &lt;/target&gt;&#010;  &lt;target name="test1"&gt;&#010;    &lt;echo message="in test1 and value of testit is:  ${testit}"/&gt;&#010;  &lt;/target&gt;&#010;  &lt;target name="test2" unless="testit"&gt;&#010;    &lt;echo message="in test2"/&gt;&#010;    &lt;echo message="value of testit is:  ${testit}"/&gt;&#010;  &lt;/target&gt;&#010;&#010;&lt;/project&gt;&#010;&#010;C:\IBM&gt;ant -f /temp/throw.xml&#010;Buildfile: C:\temp\throw.xml&#010;&#010;invalid:&#010;&#010;test1:&#010;    [echo] in test1 and value of testit is:  true&#010;&#010;test2:&#010;&#010;BUILD SUCCESSFUL&#010;Total time: 0 seconds&#010;&#010;C:\IBM&gt;&#010;&#010;Budd A. McNish&#010;&#010;Health Plan Services&#010;813-289-1000 ext. 2352&#010;&#010;&#010;&#010;&#010;-----Original Message-----&#010;From: Eric Fetzer [mailto:elstonkers@yahoo.com] &#010;Sent: Wednesday, May 15, 2013 10:14 AM&#010;To: Ant Users&#010;Subject: &lt;target unless=...&gt;&#010;&#010;Hi!  I've found that my unless= is somewhat useless when using &lt;antcall&gt;.  Here's&#010;a repro for what I'm trying to do:&#010; &#010;&lt;project name="test" default="testIt"&gt;&#010;  &lt;taskdef resource="net/sf/antcontrib/antlib.xml"/&gt;&#010;  &lt;target name="testIt"&gt;&#010;     &lt;antcall target="test1" inheritall="true" /&gt;&#010;     &lt;antcall target="test2" inheritall="true" /&gt;&#010;  &lt;/target&gt;&#010;  &lt;target name="test1"&gt;&#010;    &lt;property name="testit" value="true"/&gt;&#010;    &lt;echo message="in test1 and value of testit is:  ${testit}"/&gt;&#010;  &lt;/target&gt;&#010;  &lt;target name="test2" unless="testit"&gt;&#010;    &lt;echo message="in test2"/&gt;&#010;    &lt;echo message="value of testit is:  ${testit}"/&gt;&#010;  &lt;/target&gt;&#010;&lt;/project&gt;&#010; &#010;And the results that I'm sure you anticipate as you understand how antcall works:&#010; &#010;[me@myMachine]$ ant -f test.xml&#010;Buildfile: test.xml&#010;testIt:&#010;test1:&#010;     [echo] in test1 and value of testit is:  true&#010;test2:&#010;     [echo] in test2&#010;     [echo] value of testit is:  ${testit} BUILD SUCCESSFUL Total time: 0 seconds&#010; &#010; &#010;My actual antcall is in a for loop using a list to call targets that start with the same word,&#010;like so:&#010; &#010;&lt;for list="${build.apps} param="app"&gt;&#010;   &lt;sequential&gt;&#010;      &lt;antcall target="build@{app}"/&gt;&#010;   &lt;/sequential&gt;&#010;&lt;/for&gt;&#010; &#010;Can anyone give me a better methodology for achieving the results I'm after?&#010; &#010;Thanks,&#010;Eric&#010;&#010;---------------------------------------------------------------------&#010;To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org&#010;&#010;_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _&#010;CONFIDENTIALITY NOTICE: If you have received this email in error, please immediately notify&#010;the sender by e-mail at the address shown.This email transmission may contain confidential&#010;information.This information is intended only for the use of the individual(s) or entity to&#010;whom it is intended even if addressed incorrectly. Please delete it from your files if you&#010;are not the intended recipient. Thank you for your compliance.&#010;&#010;---------------------------------------------------------------------&#010;To unsubscribe, e-mail: user-unsubscribe@ant.apache.org&#010;For additional commands, e-mail: user-help@ant.apache.org&#010;&#010;&#010;---------------------------------------------------------------------&#010;To unsubscribe, e-mail: user-unsubscribe@ant.apache.org&#010;For additional commands, e-mail: user-help@ant.apache.org&#010;&#010;&#010;
</pre>
</div>
</content>
</entry>
<entry>
<title>RE: &lt;target unless=...&gt;</title>
<author><name>&quot;McNish, Budd&quot; &lt;bmcnish@HealthPlan.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/ant-user/201305.mbox/%3c80F7368F81C4A2418857DEC06EAB4626209947A8@WIN-EXDAG-01.HPS.HPH.AD%3e"/>
<id>urn:uuid:%3c80F7368F81C4A2418857DEC06EAB4626209947A8@WIN-EXDAG-01-HPS-HPH-AD%3e</id>
<updated>2013-05-15T14:48:08Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
This works.&#010;&#010;&lt;project default="invalid"&gt;&#010;  &lt;target name="invalid"&gt;&#010;  &#009; &lt;property name="testit" value="" /&gt;&#010;  &#009; &lt;antcall target="test1" inheritall="true" &gt;&#010;  &#009;   &lt;param name="testit" value="true"/&gt;&#010;  &#009; &lt;/antcall&gt;&#010;     &lt;antcall target="test2" inheritall="true" /&gt;&#010;  &lt;/target&gt;&#010;  &lt;target name="test1"&gt;&#010;    &lt;echo message="in test1 and value of testit is:  ${testit}"/&gt;&#010;  &lt;/target&gt;&#010;  &lt;target name="test2" unless="testit"&gt;&#010;    &lt;echo message="in test2"/&gt;&#010;    &lt;echo message="value of testit is:  ${testit}"/&gt;&#010;  &lt;/target&gt;&#010;&#010;&lt;/project&gt;&#010;&#010;C:\IBM&gt;ant -f /temp/throw.xml&#010;Buildfile: C:\temp\throw.xml&#010;&#010;invalid:&#010;&#010;test1:&#010;     [echo] in test1 and value of testit is:  true&#010;&#010;test2:&#010;&#010;BUILD SUCCESSFUL&#010;Total time: 0 seconds&#010;&#010;C:\IBM&gt;&#010;&#010;Budd A. McNish&#010;&#010;Health Plan Services&#010;813-289-1000 ext. 2352&#010;&#010;&#010;&#010;&#010;-----Original Message-----&#010;From: Eric Fetzer [mailto:elstonkers@yahoo.com] &#010;Sent: Wednesday, May 15, 2013 10:14 AM&#010;To: Ant Users&#010;Subject: &lt;target unless=...&gt;&#010;&#010;Hi!  I've found that my unless= is somewhat useless when using &lt;antcall&gt;.  Here's&#010;a repro for what I'm trying to do:&#010; &#010;&lt;project name="test" default="testIt"&gt;&#010;  &lt;taskdef resource="net/sf/antcontrib/antlib.xml"/&gt;&#010;  &lt;target name="testIt"&gt;&#010;     &lt;antcall target="test1" inheritall="true" /&gt;&#010;     &lt;antcall target="test2" inheritall="true" /&gt;&#010;  &lt;/target&gt;&#010;  &lt;target name="test1"&gt;&#010;    &lt;property name="testit" value="true"/&gt;&#010;    &lt;echo message="in test1 and value of testit is:  ${testit}"/&gt;&#010;  &lt;/target&gt;&#010;  &lt;target name="test2" unless="testit"&gt;&#010;    &lt;echo message="in test2"/&gt;&#010;    &lt;echo message="value of testit is:  ${testit}"/&gt;&#010;  &lt;/target&gt;&#010;&lt;/project&gt;&#010; &#010;And the results that I'm sure you anticipate as you understand how antcall works:&#010; &#010;[me@myMachine]$ ant -f test.xml&#010;Buildfile: test.xml&#010;testIt:&#010;test1:&#010;     [echo] in test1 and value of testit is:  true&#010;test2:&#010;     [echo] in test2&#010;     [echo] value of testit is:  ${testit} BUILD SUCCESSFUL Total time: 0 seconds&#010; &#010; &#010;My actual antcall is in a for loop using a list to call targets that start with the same word,&#010;like so:&#010; &#010;&lt;for list="${build.apps} param="app"&gt;&#010;   &lt;sequential&gt;&#010;      &lt;antcall target="build@{app}"/&gt;&#010;   &lt;/sequential&gt;&#010;&lt;/for&gt;&#010; &#010;Can anyone give me a better methodology for achieving the results I'm after?&#010; &#010;Thanks,&#010;Eric&#010;&#010;---------------------------------------------------------------------&#010;To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org&#010;&#010;_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _&#010;CONFIDENTIALITY NOTICE: If you have received this email in error, please immediately notify&#010;the sender by e-mail at the address shown.This email transmission may contain confidential&#010;information.This information is intended only for the use of the individual(s) or entity to&#010;whom it is intended even if addressed incorrectly. Please delete it from your files if you&#010;are not the intended recipient. Thank you for your compliance.&#010;&#010;---------------------------------------------------------------------&#010;To unsubscribe, e-mail: user-unsubscribe@ant.apache.org&#010;For additional commands, e-mail: user-help@ant.apache.org&#010;&#010;&#010;
</pre>
</div>
</content>
</entry>
<entry>
<title>&lt;target unless=...&gt;</title>
<author><name>Eric Fetzer &lt;elstonkers@yahoo.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/ant-user/201305.mbox/%3c1368627214.97100.YahooMailNeo@web126101.mail.ne1.yahoo.com%3e"/>
<id>urn:uuid:%3c1368627214-97100-YahooMailNeo@web126101-mail-ne1-yahoo-com%3e</id>
<updated>2013-05-15T14:13:34Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Hi!  I've found that my unless= is somewhat useless when using &lt;antcall&gt;.  Here's a&#010;repro for what I'm trying to do:&#010; &#010;&lt;project name="test" default="testIt"&gt;&#010;  &lt;taskdef resource="net/sf/antcontrib/antlib.xml"/&gt;&#010;  &lt;target name="testIt"&gt;&#010;     &lt;antcall target="test1" inheritall="true" /&gt;&#010;     &lt;antcall target="test2" inheritall="true" /&gt;&#010;  &lt;/target&gt;&#010;  &lt;target name="test1"&gt;&#010;    &lt;property name="testit" value="true"/&gt;&#010;    &lt;echo message="in test1 and value of testit is:  ${testit}"/&gt;&#010;  &lt;/target&gt;&#010;  &lt;target name="test2" unless="testit"&gt;&#010;    &lt;echo message="in test2"/&gt;&#010;    &lt;echo message="value of testit is:  ${testit}"/&gt;&#010;  &lt;/target&gt;&#010;&lt;/project&gt;&#010; &#010;And the results that I'm sure you anticipate as you understand how antcall works:&#010; &#010;[me@myMachine]$ ant -f test.xml&#010;Buildfile: test.xml&#010;testIt:&#010;test1:&#010;     [echo] in test1 and value of testit is:  true&#010;test2:&#010;     [echo] in test2&#010;     [echo] value of testit is:  ${testit}&#010;BUILD SUCCESSFUL&#010;Total time: 0 seconds&#010; &#010; &#010;My actual antcall is in a for loop using a list to call targets that start with the same word,&#010;like so:&#010; &#010;&lt;for list="${build.apps} param="app"&gt;&#010;   &lt;sequential&gt;&#010;      &lt;antcall target="build@{app}"/&gt;&#010;   &lt;/sequential&gt;&#010;&lt;/for&gt;&#010; &#010;Can anyone give me a better methodology for achieving the results I'm after?&#010; &#010;Thanks,&#010;Eric&#010;&#010;---------------------------------------------------------------------&#010;To unsubscribe, e-mail: user-unsubscribe@ant.apache.org&#010;For additional commands, e-mail: user-help@ant.apache.org&#010;&#010;&#010;
</pre>
</div>
</content>
</entry>
<entry>
<title>Java task - why is redirecting out stream to file not compatible with spawn</title>
<author><name>Grzegorz Słowikowski &lt;gslowikowski@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/ant-user/201305.mbox/%3c51939585.4050303@gmail.com%3e"/>
<id>urn:uuid:%3c51939585-4050303@gmail-com%3e</id>
<updated>2013-05-15T14:02:45Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Hi&#010;&#010;I'm starting a process by configuring and executing Ant Java task from&#010;my software, see:&#010;https://maven-play-plugin.googlecode.com/svn/mavensite/1.0.0-beta5/play-maven-plugin/xref/com/google/code/play/AbstractAntJavaBasedPlayMojo.html&#010;https://maven-play-plugin.googlecode.com/svn/mavensite/1.0.0-beta5/play-maven-plugin/xref/com/google/code/play/AbstractPlayServerMojo.html&#010;https://maven-play-plugin.googlecode.com/svn/mavensite/1.0.0-beta5/play-maven-plugin/xref/com/google/code/play/AbstractPlayStartServerMojo.html&#010;&#010;Sometimes I need to redirect output stream to a file when starting&#010;external process. This is configurable,&#010;but by default I start it with spawn flag set. When spawning, I cannot&#010;redirect process'es output stream to a file, Ant does not allow it. I&#010;wonder why.&#010;&#010;I found a workaround:&#010;When spawning I set system property telling spawned process to redirect&#010;its output to a file:&#010;https://maven-play-plugin.googlecode.com/svn/mavensite/1.0.0-beta5/play-maven-plugin/xref/com/google/code/play/AbstractPlayStartServerMojo.html#73&#010;&#010;In the spawned process:&#010;https://maven-play-plugin.googlecode.com/svn/mavensite/1.0.0-beta5/play-server-booter/xref/com/google/code/play/PlayServerBooter.html#33&#010;&#010;I don't like this solution, but it works if everything goes well.&#010;&#010;I the spawned process does not start (for example I try to allocate too&#010;much memory with Xmx argument) I cannot tell what went wrong. The reason&#010;is written&#010;to the output stream, but the output stream is not being output anywhere.&#010;&#010;Regards&#010;&#010;Grzegorz Slowikowski&#010;&#010;&#010;&#010;&#010;---------------------------------------------------------------------&#010;To unsubscribe, e-mail: user-unsubscribe@ant.apache.org&#010;For additional commands, e-mail: user-help@ant.apache.org&#010;&#010;&#010;
</pre>
</div>
</content>
</entry>
<entry>
<title>AW: editstring macro</title>
<author><name>Jan Matèrne (jhm) &lt;apache@materne.de&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/ant-user/201305.mbox/%3c001d01ce5130$b1046b60$130d4220$@de%3e"/>
<id>urn:uuid:%3c001d01ce5130$b1046b60$130d4220$@de%3e</id>
<updated>2013-05-15T05:54:40Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Have you tried Ant Props?&#010;http://ant.apache.org/antlibs/props/index.html&#010;https://svn.apache.org/repos/asf/ant/antlibs/props/trunk/src/tests/antunit/s&#010;tringops-test.xml&#010;- testReplaceFirst&#010;- testReplaceAll&#010;- testPackageMapping&#010;&#010;Jan&#010;&#010;&gt; -----Ursprüngliche Nachricht-----&#010;&gt; Von: Peter West [mailto:lists@pbw.id.au]&#010;&gt; Gesendet: Mittwoch, 15. Mai 2013 04:08&#010;&gt; An: Ant Users List&#010;&gt; Betreff: editstring macro&#010;&gt; &#010;&gt; I have posted a discussion and code for a macro to edit a string value,&#010;&gt; placing the result into a property.  I'm sure various people have done&#010;&gt; the same sort of thing before, but this might be a handy reference.&#010;&gt; &#010;&gt; http://codepulsive.blogspot.com.au/2013/05/ant-edit-property-&#010;&gt; values.html&#010;&gt; &#010;&gt; An example build.xml is available at&#010;&gt; &lt;http://pbw.id.au/editstring/build.xml&gt;.&#010;&gt; &#010;&gt; &#010;&gt; Peter West&#010;&gt; &#010;&gt; "When the Spirit of truth comes, he will guide you into all the&#010;&gt; truth..."&#010;&gt; &#010;&gt; &#010;&gt; ---------------------------------------------------------------------&#010;&gt; To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional&#010;&gt; commands, e-mail: user-help@ant.apache.org&#010;&#010;&#010;&#010;---------------------------------------------------------------------&#010;To unsubscribe, e-mail: user-unsubscribe@ant.apache.org&#010;For additional commands, e-mail: user-help@ant.apache.org&#010;&#010;&#010;
</pre>
</div>
</content>
</entry>
<entry>
<title>editstring macro</title>
<author><name>Peter West &lt;lists@pbw.id.au&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/ant-user/201305.mbox/%3cE68D0D16-DCE9-4FF0-A046-CF114CCA94CA@pbw.id.au%3e"/>
<id>urn:uuid:%3cE68D0D16-DCE9-4FF0-A046-CF114CCA94CA@pbw-id-au%3e</id>
<updated>2013-05-15T02:08:24Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
I have posted a discussion and code for a macro to edit a string value, placing the result&#010;into a property.  I'm sure various people have done the same sort of thing before, but this&#010;might be a handy reference.&#010;&#010;http://codepulsive.blogspot.com.au/2013/05/ant-edit-property-values.html&#010;&#010;An example build.xml is available at &lt;http://pbw.id.au/editstring/build.xml&gt;.&#010;&#010;&#010;Peter West&#010;&#010;"When the Spirit of truth comes, he will guide you into all the truth..."&#010;&#010;&#010;---------------------------------------------------------------------&#010;To unsubscribe, e-mail: user-unsubscribe@ant.apache.org&#010;For additional commands, e-mail: user-help@ant.apache.org&#010;&#010;&#010;
</pre>
</div>
</content>
</entry>
<entry>
<title>AW: How to run a single junit test method with ant</title>
<author><name>Jan Matèrne (jhm) &lt;apache@materne.de&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/ant-user/201305.mbox/%3c005501ce5073$30610990$91231cb0$@de%3e"/>
<id>urn:uuid:%3c005501ce5073$30610990$91231cb0$@de%3e</id>
<updated>2013-05-14T07:18:09Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Here is a skeleton which could be what you need.&#009;&#010;  ant test -Dtestclass=xy -Dtestmethod=xy  :  runs the testmethod in that test class&#010;  ant test -Dtestclass=xy                  :  runs all tests in that test class&#010;  ant test                -Dtestmethod=xy  :  invalid as the class must be specified, so fail&#010;the build&#010;  ant test                                 :  runs all tests&#010;&#010;&#010;Jan&#010;&#010;&#010;&lt;project&gt;&#010;&#010;    &lt;target name="-test.check"&gt;&#009;&#010;        &lt;!-- &#010;        decision matrix:&#010;                testclass   testmethod&#010;        suite      -             -&#010;        class      X             -&#010;        method     X             X&#010;        error      -             X&#010;        --&gt;&#010;        &lt;condition property="testaction.suite"&gt;&#010;            &lt;and&gt;&#010;                &lt;not&gt;&lt;isset property="testclass"/&gt;&lt;/not&gt;&#010;                &lt;not&gt;&lt;isset property="testmethod"/&gt;&lt;/not&gt;&#010;            &lt;/and&gt;    &#010;        &lt;/condition&gt;&#010;        &lt;condition property="testaction.class"&gt;&#010;            &lt;and&gt;&#010;                &lt;isset property="testclass"/&gt;&#010;                &lt;not&gt;&lt;isset property="testmethod"/&gt;&lt;/not&gt;&#010;            &lt;/and&gt;    &#010;        &lt;/condition&gt;&#010;        &lt;condition property="testaction.method"&gt;&#010;            &lt;and&gt;&#010;                &lt;isset property="testclass"/&gt;&#010;                &lt;isset property="testmethod"/&gt;&#010;            &lt;/and&gt;    &#010;        &lt;/condition&gt;&#010;        &lt;condition property="testaction.error"&gt;&#010;            &lt;and&gt;&#010;                &lt;not&gt;&lt;isset property="testclass"/&gt;&lt;/not&gt;&#010;                &lt;isset property="testmethod"/&gt;&#010;            &lt;/and&gt;    &#010;        &lt;/condition&gt;&#010;    &lt;/target&gt;&#010;    &#010;    &lt;target name="-test.suite" if="testaction.suite"&gt;&#010;        &lt;echo&gt;Run JUnit using 'batchtest' and fileset&lt;/echo&gt;&#010;    &lt;/target&gt;&#010;    &#010;    &lt;target name="-test.class" if="testaction.class"&gt;&#010;        &lt;echo&gt;Run JUnit using 'test name=$${testclass}'&lt;/echo&gt;&#010;    &lt;/target&gt;&#010;    &#010;    &lt;target name="-test.method" if="testaction.method"&gt;&#010;        &lt;echo&gt;Run JUnit using 'test name=$${testclass} method=$${testmethod}'&lt;/echo&gt;&#010;    &lt;/target&gt;&#010;    &#010;    &lt;target name="-test.error" if="testaction.error"&gt;&#010;        &lt;fail&gt;When specifying -Dtestmethod=${testmethod} you also have to specify the&#010;property 'testclass'&lt;/fail&gt;&#010;    &lt;/target&gt;&#010;    &#010;    &#010;    &lt;target name="test" depends="-test.check,-test.suite,-test.class,-test.method,-test.error"&#010;description="Runs the tests"/&gt;&#010;&#010;&lt;/project&gt;&#010;&#010;&#010;&#010;&gt; -----Ursprüngliche Nachricht-----&#010;&gt; Von: Antoine Levy Lambert [mailto:antoine@gmx.de]&#010;&gt; Gesendet: Sonntag, 12. Mai 2013 17:34&#010;&gt; An: Ant Users List&#010;&gt; Betreff: Re: How to run a single junit test method with ant&#010;&gt; &#010;&gt; Hello Xiaomou,&#010;&gt; &#010;&gt; the documentation of the junit task&#010;&gt; http://ant.apache.org/manual/Tasks/junit.html&#010;&gt; mentions that the test nested element can have a methods attribute to&#010;&gt; specify the methods you want to run&#010;&gt; &#010;&gt; Comma-separated list of names of test case methods to execute. Since&#010;&gt; 1.8.2&#010;&gt; &#010;&gt; &lt;junit …&gt;&#010;&gt;    &lt;test name="com.something.XyzTest" methods="test1"&gt;&#010;&gt;    &lt;/test&gt;&#010;&gt; &lt;/junit&gt;&#010;&gt; &#010;&gt; Regards,&#010;&gt; &#010;&gt; Antoine&#010;&gt; On May 11, 2013, at 2:15 PM, 肖谋 wrote:&#010;&gt; &#010;&gt; &gt; Thanks for your reply. Perhaps I did not express my problem clearly,&#010;&gt; &gt; or may not understand your solution.&#010;&gt; &gt; My problem is : I have junit test class:&#010;&gt; &gt; class TestService {&#010;&gt; &gt;  @Test&#010;&gt; &gt;   void test1() {}&#010;&gt; &gt;  @Test&#010;&gt; &gt;   void test2() {}&#010;&gt; &gt; }&#010;&gt; &gt;&#010;&gt; &gt; now I'd like to only test the "test2" with ant command line like&#010;&gt; this:&#010;&gt; &gt; ant -Dtest=TestService -Dtestcase=test2 test-target Then how to write&#010;&gt; &gt; the build.xml?&#010;&gt; &gt;&#010;&gt; &gt; Thanks&#010;&gt; &gt;&#010;&gt; &gt;&#010;&gt; &gt; XiaoMou&#010;&gt; &gt;&#010;&gt; &gt;&#010;&gt; &gt;&#010;&gt; &gt;&#010;&gt; &gt;&#010;&gt; &gt; On Sat, May 11, 2013 at 4:00 PM, Jan Matèrne (jhm)&#010;&gt; &lt;apache@materne.de&gt;&#010;&gt; &gt; wrote:&#010;&gt; &gt;&#010;&gt; &gt;&gt; Basic idea is&#010;&gt; &gt;&gt; - specify the test to run via command line property (-Dtestcase=...)&#010;&gt; &gt;&gt; - test-targets depends on two targets running a single test or the&#010;&gt; &gt;&gt; whole test suite&#010;&gt; &gt;&gt;   &lt;target name="test" depends="-test.single,-test.all"/&gt;&#010;&gt; &gt;&gt; - that two targets are conditional according to that property&#010;&gt; &gt;&gt;   &lt;target name="-test.single" if="testcase"&gt;&#010;&gt; &gt;&gt;   &lt;target name="-test.all" unless="testcase"&gt;&#010;&gt; &gt;&gt;&#010;&gt; &gt;&gt; Jan&#010;&gt; &gt;&gt;&#010;&gt; &gt;&gt;&gt; -----Ursprüngliche Nachricht-----&#010;&gt; &gt;&gt;&gt; Von: Matt Benson [mailto:gudnabrsam@gmail.com]&#010;&gt; &gt;&gt;&gt; Gesendet: Freitag, 10. Mai 2013 16:55&#010;&gt; &gt;&gt;&gt; An: Ant Users List&#010;&gt; &gt;&gt;&gt; Betreff: Re: How to run a single junit test method with ant&#010;&gt; &gt;&gt;&gt;&#010;&gt; &gt;&gt;&gt; Typically this would be done using separate targets.  Ant's own&#010;&gt; &gt;&gt;&gt; build.xml provides an example.&#010;&gt; &gt;&gt;&gt;&#010;&gt; &gt;&gt;&gt; HTH,&#010;&gt; &gt;&gt;&gt; Matt&#010;&gt; &gt;&gt;&gt;&#010;&gt; &gt;&gt;&gt;&#010;&gt; &gt;&gt;&gt; On Thu, May 9, 2013 at 11:33 PM, 肖谋 &lt;xiaomou@gmail.com&gt; wrote:&#010;&gt; &gt;&gt;&gt;&#010;&gt; &gt;&gt;&gt;&gt; Hi, Users.&#010;&gt; &gt;&gt;&gt;&gt;   I am using ant in Linux. I can use ant junit task to run all&#010;&gt; test&#010;&gt; &gt;&gt;&gt;&gt; methods in a junit4 test class but fail to find the way to  run a&#010;&gt; &gt;&gt;&gt;&gt; single test method.  I googled and found a helpful article at&#010;&gt; &gt;&gt;&gt;&gt; https://today.java.net/pub/a/today/2003/09/12/individual-test-&#010;&gt; &gt;&gt;&gt; cases.html.&#010;&gt; &gt;&gt;&gt;&gt; However, the solution it provides does not help. My ant seems not&#010;&gt; &gt;&gt;&gt;&gt; to recognize the "tests" sysproperty.&#010;&gt; &gt;&gt;&gt;&gt;  My ant version is 1.8.4. and the related content of build.xml is&#010;&gt; &gt;&gt;&gt;&gt; listed as follows:&#010;&gt; &gt;&gt;&gt;&gt;&#010;&gt; &gt;&gt;&gt;&gt;   &lt;target name="ensure-test-name" unless="test"&gt;&#010;&gt; &gt;&gt;&gt;&gt;        &lt;fail message="You must run this target with -&#010;&gt; &gt;&gt;&gt; Dtest=TestName"/&gt;&#010;&gt; &gt;&gt;&gt;&gt;    &lt;/target&gt;&#010;&gt; &gt;&gt;&gt;&gt;&#010;&gt; &gt;&gt;&gt;&gt;    &lt;target name="run-general-test" description="Runs the test you&#010;&gt; &gt;&gt;&gt;&gt; specify on the command&#010;&gt; &gt;&gt;&gt;&gt;        line with -Dtest=" depends="compile, ensure-test-name"&gt;&#010;&gt; &gt;&gt;&gt;&gt;        &lt;junit printsummary="withOutAndErr" fork="true"&gt;&#010;&gt; &gt;&gt;&gt;&gt;            &lt;sysproperty key="tests" value="${tests}"/&gt;&#010;&gt; &gt;&gt;&gt;&gt;            &lt;classpath refid="test.classpath" /&gt;&#010;&gt; &gt;&gt;&gt;&gt;            &lt;formatter type="plain" usefile="false"/&gt;&#010;&gt; &gt;&gt;&gt;&gt;            &lt;batchtest&gt;&#010;&gt; &gt;&gt;&gt;&gt;                &lt;fileset dir="${test.src.dir}"&gt;&#010;&gt; &gt;&gt;&gt;&gt;                    &lt;include name="**/${test}.java"/&gt;&#010;&gt; &gt;&gt;&gt;&gt;                &lt;/fileset&gt;&#010;&gt; &gt;&gt;&gt;&gt;            &lt;/batchtest&gt;&#010;&gt; &gt;&gt;&gt;&gt;        &lt;/junit&gt;&#010;&gt; &gt;&gt;&gt;&gt;    &lt;/target&gt;&#010;&gt; &gt;&gt;&gt;&gt;&#010;&gt; &gt;&gt;&gt;&gt;  Please help! Thanks a lot!&#010;&gt; &gt;&gt;&gt;&gt;&#010;&gt; &gt;&gt;&gt;&gt; Regards&#010;&gt; &gt;&gt;&gt;&gt; xiaomou&#010;&gt; &gt;&gt;&gt;&gt;&#010;&gt; &gt;&gt;&#010;&gt; &gt;&gt;&#010;&gt; &gt;&gt; --------------------------------------------------------------------&#010;&gt; -&#010;&gt; &gt;&gt; To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For&#010;&gt; &gt;&gt; additional commands, e-mail: user-help@ant.apache.org&#010;&gt; &gt;&gt;&#010;&gt; &gt;&gt;&#010;&#010;&#010;&#010;---------------------------------------------------------------------&#010;To unsubscribe, e-mail: user-unsubscribe@ant.apache.org&#010;For additional commands, e-mail: user-help@ant.apache.org&#010;&#010;&#010;
</pre>
</div>
</content>
</entry>
<entry>
<title>Re: How to run a single junit test method with ant</title>
<author><name>Antoine Levy Lambert &lt;antoine@gmx.de&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/ant-user/201305.mbox/%3c0EFE9A05-E16C-41E3-9D76-9099D59A29B3@gmx.de%3e"/>
<id>urn:uuid:%3c0EFE9A05-E16C-41E3-9D76-9099D59A29B3@gmx-de%3e</id>
<updated>2013-05-12T15:33:37Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Hello Xiaomou,&#010;&#010;the documentation of the junit task http://ant.apache.org/manual/Tasks/junit.html &#010;mentions that the test nested element can have a methods attribute to specify the methods&#010;you want to run&#010;&#010;Comma-separated list of names of test case methods to execute. Since 1.8.2&#010;&#010;&lt;junit …&gt;&#010;   &lt;test name="com.something.XyzTest" methods="test1"&gt;&#010;   &lt;/test&gt;&#010;&lt;/junit&gt;&#010;&#010;Regards,&#010;&#010;Antoine&#010;On May 11, 2013, at 2:15 PM, 肖谋 wrote:&#010;&#010;&gt; Thanks for your reply. Perhaps I did not express my problem clearly, or may&#010;&gt; not understand your solution.&#010;&gt; My problem is : I have junit test class:&#010;&gt; class TestService {&#010;&gt;  @Test&#010;&gt;   void test1() {}&#010;&gt;  @Test&#010;&gt;   void test2() {}&#010;&gt; }&#010;&gt; &#010;&gt; now I'd like to only test the "test2" with ant command line like this:&#010;&gt; ant -Dtest=TestService -Dtestcase=test2 test-target&#010;&gt; Then how to write the build.xml?&#010;&gt; &#010;&gt; Thanks&#010;&gt; &#010;&gt; &#010;&gt; XiaoMou&#010;&gt; &#010;&gt; &#010;&gt; &#010;&gt; &#010;&gt; &#010;&gt; On Sat, May 11, 2013 at 4:00 PM, Jan Matèrne (jhm) &lt;apache@materne.de&gt;&#010;&gt; wrote:&#010;&gt; &#010;&gt;&gt; Basic idea is&#010;&gt;&gt; - specify the test to run via command line property (-Dtestcase=...)&#010;&gt;&gt; - test-targets depends on two targets running a single test or the whole&#010;&gt;&gt; test suite&#010;&gt;&gt;   &lt;target name="test" depends="-test.single,-test.all"/&gt;&#010;&gt;&gt; - that two targets are conditional according to that property&#010;&gt;&gt;   &lt;target name="-test.single" if="testcase"&gt;&#010;&gt;&gt;   &lt;target name="-test.all" unless="testcase"&gt;&#010;&gt;&gt; &#010;&gt;&gt; Jan&#010;&gt;&gt; &#010;&gt;&gt;&gt; -----Ursprüngliche Nachricht-----&#010;&gt;&gt;&gt; Von: Matt Benson [mailto:gudnabrsam@gmail.com]&#010;&gt;&gt;&gt; Gesendet: Freitag, 10. Mai 2013 16:55&#010;&gt;&gt;&gt; An: Ant Users List&#010;&gt;&gt;&gt; Betreff: Re: How to run a single junit test method with ant&#010;&gt;&gt;&gt; &#010;&gt;&gt;&gt; Typically this would be done using separate targets.  Ant's own&#010;&gt;&gt;&gt; build.xml provides an example.&#010;&gt;&gt;&gt; &#010;&gt;&gt;&gt; HTH,&#010;&gt;&gt;&gt; Matt&#010;&gt;&gt;&gt; &#010;&gt;&gt;&gt; &#010;&gt;&gt;&gt; On Thu, May 9, 2013 at 11:33 PM, 肖谋 &lt;xiaomou@gmail.com&gt; wrote:&#010;&gt;&gt;&gt; &#010;&gt;&gt;&gt;&gt; Hi, Users.&#010;&gt;&gt;&gt;&gt;   I am using ant in Linux. I can use ant junit task to run all test&#010;&gt;&gt;&gt;&gt; methods in a junit4 test class but fail to find the way to  run a&#010;&gt;&gt;&gt;&gt; single test method.  I googled and found a helpful article at&#010;&gt;&gt;&gt;&gt; https://today.java.net/pub/a/today/2003/09/12/individual-test-&#010;&gt;&gt;&gt; cases.html.&#010;&gt;&gt;&gt;&gt; However, the solution it provides does not help. My ant seems not to&#010;&gt;&gt;&gt;&gt; recognize the "tests" sysproperty.&#010;&gt;&gt;&gt;&gt;  My ant version is 1.8.4. and the related content of build.xml is&#010;&gt;&gt;&gt;&gt; listed as follows:&#010;&gt;&gt;&gt;&gt; &#010;&gt;&gt;&gt;&gt;   &lt;target name="ensure-test-name" unless="test"&gt;&#010;&gt;&gt;&gt;&gt;        &lt;fail message="You must run this target with -&#010;&gt;&gt;&gt; Dtest=TestName"/&gt;&#010;&gt;&gt;&gt;&gt;    &lt;/target&gt;&#010;&gt;&gt;&gt;&gt; &#010;&gt;&gt;&gt;&gt;    &lt;target name="run-general-test" description="Runs the test you&#010;&gt;&gt;&gt;&gt; specify on the command&#010;&gt;&gt;&gt;&gt;        line with -Dtest=" depends="compile, ensure-test-name"&gt;&#010;&gt;&gt;&gt;&gt;        &lt;junit printsummary="withOutAndErr" fork="true"&gt;&#010;&gt;&gt;&gt;&gt;            &lt;sysproperty key="tests" value="${tests}"/&gt;&#010;&gt;&gt;&gt;&gt;            &lt;classpath refid="test.classpath" /&gt;&#010;&gt;&gt;&gt;&gt;            &lt;formatter type="plain" usefile="false"/&gt;&#010;&gt;&gt;&gt;&gt;            &lt;batchtest&gt;&#010;&gt;&gt;&gt;&gt;                &lt;fileset dir="${test.src.dir}"&gt;&#010;&gt;&gt;&gt;&gt;                    &lt;include name="**/${test}.java"/&gt;&#010;&gt;&gt;&gt;&gt;                &lt;/fileset&gt;&#010;&gt;&gt;&gt;&gt;            &lt;/batchtest&gt;&#010;&gt;&gt;&gt;&gt;        &lt;/junit&gt;&#010;&gt;&gt;&gt;&gt;    &lt;/target&gt;&#010;&gt;&gt;&gt;&gt; &#010;&gt;&gt;&gt;&gt;  Please help! Thanks a lot!&#010;&gt;&gt;&gt;&gt; &#010;&gt;&gt;&gt;&gt; Regards&#010;&gt;&gt;&gt;&gt; xiaomou&#010;&gt;&gt;&gt;&gt; &#010;&gt;&gt; &#010;&gt;&gt; &#010;&gt;&gt; ---------------------------------------------------------------------&#010;&gt;&gt; To unsubscribe, e-mail: user-unsubscribe@ant.apache.org&#010;&gt;&gt; For additional commands, e-mail: user-help@ant.apache.org&#010;&gt;&gt; &#010;&gt;&gt; &#010;&#010;&#010;
</pre>
</div>
</content>
</entry>
<entry>
<title>Re: How to run a single junit test method with ant</title>
<author><name>肖谋 &lt;xiaomou@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/ant-user/201305.mbox/%3cCACU_ZbyhsRH_B8RRf+tA6mH0jyMU3SWaHY_URPMQ1q9oaCejhQ@mail.gmail.com%3e"/>
<id>urn:uuid:%3cCACU_ZbyhsRH_B8RRf+tA6mH0jyMU3SWaHY_URPMQ1q9oaCejhQ@mail-gmail-com%3e</id>
<updated>2013-05-11T18:15:53Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Thanks for your reply. Perhaps I did not express my problem clearly, or may&#010;not understand your solution.&#010;My problem is : I have junit test class:&#010;class TestService {&#010;  @Test&#010;   void test1() {}&#010;  @Test&#010;   void test2() {}&#010;}&#010;&#010;now I'd like to only test the "test2" with ant command line like this:&#010;ant -Dtest=TestService -Dtestcase=test2 test-target&#010;Then how to write the build.xml?&#010;&#010;Thanks&#010;&#010;&#010;XiaoMou&#010;&#010;&#010;&#010;&#010;&#010;On Sat, May 11, 2013 at 4:00 PM, Jan Matèrne (jhm) &lt;apache@materne.de&gt;&#010; wrote:&#010;&#010;&gt; Basic idea is&#010;&gt; - specify the test to run via command line property (-Dtestcase=...)&#010;&gt; - test-targets depends on two targets running a single test or the whole&#010;&gt; test suite&#010;&gt;    &lt;target name="test" depends="-test.single,-test.all"/&gt;&#010;&gt; - that two targets are conditional according to that property&#010;&gt;    &lt;target name="-test.single" if="testcase"&gt;&#010;&gt;    &lt;target name="-test.all" unless="testcase"&gt;&#010;&gt;&#010;&gt; Jan&#010;&gt;&#010;&gt; &gt; -----Ursprüngliche Nachricht-----&#010;&gt; &gt; Von: Matt Benson [mailto:gudnabrsam@gmail.com]&#010;&gt; &gt; Gesendet: Freitag, 10. Mai 2013 16:55&#010;&gt; &gt; An: Ant Users List&#010;&gt; &gt; Betreff: Re: How to run a single junit test method with ant&#010;&gt; &gt;&#010;&gt; &gt; Typically this would be done using separate targets.  Ant's own&#010;&gt; &gt; build.xml provides an example.&#010;&gt; &gt;&#010;&gt; &gt; HTH,&#010;&gt; &gt; Matt&#010;&gt; &gt;&#010;&gt; &gt;&#010;&gt; &gt; On Thu, May 9, 2013 at 11:33 PM, 肖谋 &lt;xiaomou@gmail.com&gt; wrote:&#010;&gt; &gt;&#010;&gt; &gt; &gt; Hi, Users.&#010;&gt; &gt; &gt;    I am using ant in Linux. I can use ant junit task to run all test&#010;&gt; &gt; &gt; methods in a junit4 test class but fail to find the way to  run a&#010;&gt; &gt; &gt; single test method.  I googled and found a helpful article at&#010;&gt; &gt; &gt; https://today.java.net/pub/a/today/2003/09/12/individual-test-&#010;&gt; &gt; cases.html.&#010;&gt; &gt; &gt; However, the solution it provides does not help. My ant seems not to&#010;&gt; &gt; &gt; recognize the "tests" sysproperty.&#010;&gt; &gt; &gt;   My ant version is 1.8.4. and the related content of build.xml is&#010;&gt; &gt; &gt; listed as follows:&#010;&gt; &gt; &gt;&#010;&gt; &gt; &gt;    &lt;target name="ensure-test-name" unless="test"&gt;&#010;&gt; &gt; &gt;         &lt;fail message="You must run this target with -&#010;&gt; &gt; Dtest=TestName"/&gt;&#010;&gt; &gt; &gt;     &lt;/target&gt;&#010;&gt; &gt; &gt;&#010;&gt; &gt; &gt;     &lt;target name="run-general-test" description="Runs the test you&#010;&gt; &gt; &gt; specify on the command&#010;&gt; &gt; &gt;         line with -Dtest=" depends="compile, ensure-test-name"&gt;&#010;&gt; &gt; &gt;         &lt;junit printsummary="withOutAndErr" fork="true"&gt;&#010;&gt; &gt; &gt;             &lt;sysproperty key="tests" value="${tests}"/&gt;&#010;&gt; &gt; &gt;             &lt;classpath refid="test.classpath" /&gt;&#010;&gt; &gt; &gt;             &lt;formatter type="plain" usefile="false"/&gt;&#010;&gt; &gt; &gt;             &lt;batchtest&gt;&#010;&gt; &gt; &gt;                 &lt;fileset dir="${test.src.dir}"&gt;&#010;&gt; &gt; &gt;                     &lt;include name="**/${test}.java"/&gt;&#010;&gt; &gt; &gt;                 &lt;/fileset&gt;&#010;&gt; &gt; &gt;             &lt;/batchtest&gt;&#010;&gt; &gt; &gt;         &lt;/junit&gt;&#010;&gt; &gt; &gt;     &lt;/target&gt;&#010;&gt; &gt; &gt;&#010;&gt; &gt; &gt;   Please help! Thanks a lot!&#010;&gt; &gt; &gt;&#010;&gt; &gt; &gt; Regards&#010;&gt; &gt; &gt; xiaomou&#010;&gt; &gt; &gt;&#010;&gt;&#010;&gt;&#010;&gt; ---------------------------------------------------------------------&#010;&gt; To unsubscribe, e-mail: user-unsubscribe@ant.apache.org&#010;&gt; For additional commands, e-mail: user-help@ant.apache.org&#010;&gt;&#010;&gt;&#010;&#010;
</pre>
</div>
</content>
</entry>
<entry>
<title>AW: How to run a single junit test method with ant</title>
<author><name>Jan Matèrne (jhm) &lt;apache@materne.de&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/ant-user/201305.mbox/%3c001201ce4e1d$a0c7a660$e256f320$@de%3e"/>
<id>urn:uuid:%3c001201ce4e1d$a0c7a660$e256f320$@de%3e</id>
<updated>2013-05-11T08:00:39Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Basic idea is&#010;- specify the test to run via command line property (-Dtestcase=...)&#010;- test-targets depends on two targets running a single test or the whole test suite&#010;   &lt;target name="test" depends="-test.single,-test.all"/&gt;&#010;- that two targets are conditional according to that property&#010;   &lt;target name="-test.single" if="testcase"&gt;&#010;   &lt;target name="-test.all" unless="testcase"&gt;&#010;&#010;Jan&#010;&#010;&gt; -----Ursprüngliche Nachricht-----&#010;&gt; Von: Matt Benson [mailto:gudnabrsam@gmail.com]&#010;&gt; Gesendet: Freitag, 10. Mai 2013 16:55&#010;&gt; An: Ant Users List&#010;&gt; Betreff: Re: How to run a single junit test method with ant&#010;&gt; &#010;&gt; Typically this would be done using separate targets.  Ant's own&#010;&gt; build.xml provides an example.&#010;&gt; &#010;&gt; HTH,&#010;&gt; Matt&#010;&gt; &#010;&gt; &#010;&gt; On Thu, May 9, 2013 at 11:33 PM, 肖谋 &lt;xiaomou@gmail.com&gt; wrote:&#010;&gt; &#010;&gt; &gt; Hi, Users.&#010;&gt; &gt;    I am using ant in Linux. I can use ant junit task to run all test&#010;&gt; &gt; methods in a junit4 test class but fail to find the way to  run a&#010;&gt; &gt; single test method.  I googled and found a helpful article at&#010;&gt; &gt; https://today.java.net/pub/a/today/2003/09/12/individual-test-&#010;&gt; cases.html.&#010;&gt; &gt; However, the solution it provides does not help. My ant seems not to&#010;&gt; &gt; recognize the "tests" sysproperty.&#010;&gt; &gt;   My ant version is 1.8.4. and the related content of build.xml is&#010;&gt; &gt; listed as follows:&#010;&gt; &gt;&#010;&gt; &gt;    &lt;target name="ensure-test-name" unless="test"&gt;&#010;&gt; &gt;         &lt;fail message="You must run this target with -&#010;&gt; Dtest=TestName"/&gt;&#010;&gt; &gt;     &lt;/target&gt;&#010;&gt; &gt;&#010;&gt; &gt;     &lt;target name="run-general-test" description="Runs the test you&#010;&gt; &gt; specify on the command&#010;&gt; &gt;         line with -Dtest=" depends="compile, ensure-test-name"&gt;&#010;&gt; &gt;         &lt;junit printsummary="withOutAndErr" fork="true"&gt;&#010;&gt; &gt;             &lt;sysproperty key="tests" value="${tests}"/&gt;&#010;&gt; &gt;             &lt;classpath refid="test.classpath" /&gt;&#010;&gt; &gt;             &lt;formatter type="plain" usefile="false"/&gt;&#010;&gt; &gt;             &lt;batchtest&gt;&#010;&gt; &gt;                 &lt;fileset dir="${test.src.dir}"&gt;&#010;&gt; &gt;                     &lt;include name="**/${test}.java"/&gt;&#010;&gt; &gt;                 &lt;/fileset&gt;&#010;&gt; &gt;             &lt;/batchtest&gt;&#010;&gt; &gt;         &lt;/junit&gt;&#010;&gt; &gt;     &lt;/target&gt;&#010;&gt; &gt;&#010;&gt; &gt;   Please help! Thanks a lot!&#010;&gt; &gt;&#010;&gt; &gt; Regards&#010;&gt; &gt; xiaomou&#010;&gt; &gt;&#010;&#010;&#010;---------------------------------------------------------------------&#010;To unsubscribe, e-mail: user-unsubscribe@ant.apache.org&#010;For additional commands, e-mail: user-help@ant.apache.org&#010;&#010;&#010;
</pre>
</div>
</content>
</entry>
<entry>
<title>Re: How to run a single junit test method with ant</title>
<author><name>Matt Benson &lt;gudnabrsam@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/ant-user/201305.mbox/%3cCAE9L6G29nc+CuLxD+wC64MekuO71W8QWAs+c65FZX2xWOSfazw@mail.gmail.com%3e"/>
<id>urn:uuid:%3cCAE9L6G29nc+CuLxD+wC64MekuO71W8QWAs+c65FZX2xWOSfazw@mail-gmail-com%3e</id>
<updated>2013-05-10T14:54:51Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Typically this would be done using separate targets.  Ant's own build.xml&#010;provides an example.&#010;&#010;HTH,&#010;Matt&#010;&#010;&#010;On Thu, May 9, 2013 at 11:33 PM, 肖谋 &lt;xiaomou@gmail.com&gt; wrote:&#010;&#010;&gt; Hi, Users.&#010;&gt;    I am using ant in Linux. I can use ant junit task to run all test&#010;&gt; methods in a junit4 test class but fail to find the way to  run a single&#010;&gt; test method.  I googled and found a helpful article at&#010;&gt; https://today.java.net/pub/a/today/2003/09/12/individual-test-cases.html.&#010;&gt; However, the solution it provides does not help. My ant seems not to&#010;&gt; recognize the "tests" sysproperty.&#010;&gt;   My ant version is 1.8.4. and the related content of build.xml is listed&#010;&gt; as follows:&#010;&gt;&#010;&gt;    &lt;target name="ensure-test-name" unless="test"&gt;&#010;&gt;         &lt;fail message="You must run this target with -Dtest=TestName"/&gt;&#010;&gt;     &lt;/target&gt;&#010;&gt;&#010;&gt;     &lt;target name="run-general-test" description="Runs the test you specify&#010;&gt; on the command&#010;&gt;         line with -Dtest=" depends="compile, ensure-test-name"&gt;&#010;&gt;         &lt;junit printsummary="withOutAndErr" fork="true"&gt;&#010;&gt;             &lt;sysproperty key="tests" value="${tests}"/&gt;&#010;&gt;             &lt;classpath refid="test.classpath" /&gt;&#010;&gt;             &lt;formatter type="plain" usefile="false"/&gt;&#010;&gt;             &lt;batchtest&gt;&#010;&gt;                 &lt;fileset dir="${test.src.dir}"&gt;&#010;&gt;                     &lt;include name="**/${test}.java"/&gt;&#010;&gt;                 &lt;/fileset&gt;&#010;&gt;             &lt;/batchtest&gt;&#010;&gt;         &lt;/junit&gt;&#010;&gt;     &lt;/target&gt;&#010;&gt;&#010;&gt;   Please help! Thanks a lot!&#010;&gt;&#010;&gt; Regards&#010;&gt; xiaomou&#010;&gt;&#010;&#010;
</pre>
</div>
</content>
</entry>
<entry>
<title>How to run a single junit test method with ant</title>
<author><name>肖谋 &lt;xiaomou@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/ant-user/201305.mbox/%3cCACU_ZbwZL6drP_kzYbsy6r4xsZTxFy3Oha94CcKE3Oe9rySrdQ@mail.gmail.com%3e"/>
<id>urn:uuid:%3cCACU_ZbwZL6drP_kzYbsy6r4xsZTxFy3Oha94CcKE3Oe9rySrdQ@mail-gmail-com%3e</id>
<updated>2013-05-10T04:33:04Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Hi, Users.&#010;   I am using ant in Linux. I can use ant junit task to run all test&#010;methods in a junit4 test class but fail to find the way to  run a single&#010;test method.  I googled and found a helpful article at&#010;https://today.java.net/pub/a/today/2003/09/12/individual-test-cases.html.&#010;However, the solution it provides does not help. My ant seems not to&#010;recognize the "tests" sysproperty.&#010;  My ant version is 1.8.4. and the related content of build.xml is listed&#010;as follows:&#010;&#010;   &lt;target name="ensure-test-name" unless="test"&gt;&#010;        &lt;fail message="You must run this target with -Dtest=TestName"/&gt;&#010;    &lt;/target&gt;&#010;&#010;    &lt;target name="run-general-test" description="Runs the test you specify&#010;on the command&#010;        line with -Dtest=" depends="compile, ensure-test-name"&gt;&#010;        &lt;junit printsummary="withOutAndErr" fork="true"&gt;&#010;            &lt;sysproperty key="tests" value="${tests}"/&gt;&#010;            &lt;classpath refid="test.classpath" /&gt;&#010;            &lt;formatter type="plain" usefile="false"/&gt;&#010;            &lt;batchtest&gt;&#010;                &lt;fileset dir="${test.src.dir}"&gt;&#010;                    &lt;include name="**/${test}.java"/&gt;&#010;                &lt;/fileset&gt;&#010;            &lt;/batchtest&gt;&#010;        &lt;/junit&gt;&#010;    &lt;/target&gt;&#010;&#010;  Please help! Thanks a lot!&#010;&#010;Regards&#010;xiaomou&#010;&#010;
</pre>
</div>
</content>
</entry>
<entry>
<title>Re: How to apply mapper to filelist to get other fileset or filelist?</title>
<author><name>Antoine Levy Lambert &lt;antoine@gmx.de&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/ant-user/201305.mbox/%3c74B5889F-2940-40B8-9CC4-D28E27B0A485@gmx.de%3e"/>
<id>urn:uuid:%3c74B5889F-2940-40B8-9CC4-D28E27B0A485@gmx-de%3e</id>
<updated>2013-05-08T01:52:06Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Hello Lev,&#010;&#010;Ant has a concept of mapped resources.&#010;&#010;Read this : http://ant.apache.org/manual/Types/resources.html#mappedresources&#010;&#010;Best regards,&#010;&#010;Antoine&#010;&#010;On May 6, 2013, at 10:14 AM, Lev Serebryakov wrote:&#010;&#010;&gt; Hello, User.&#010;&gt; &#010;&gt;  Is it possible to apply mapper to &lt;filelist&gt; to get other &lt;filelist&gt;&#010;&gt;  or, even better, &lt;fileset&gt;? For example, if I have list of classes&#010;&gt;  and root source dir,  how could I get &lt;fileset&gt; which contains all&#010;&gt;  source files? Something like this:&#010;&gt; &#010;&gt; &lt;fileset dir="${root}"&gt;&#010;&gt;  &lt;filelist files="${list.of.classes}/&gt;&#010;&gt;  &lt;unpackagemapper from="*" to="*.java /&gt;&#010;&gt; &lt;/fileset&gt;&#010;&gt; &#010;&gt; But it doesn't work :(&#010;&gt; &#010;&gt; -- &#010;&gt; // Black Lion AKA Lev Serebryakov &lt;lev@serebryakov.spb.ru&gt;&#010;&gt; &#010;&gt; &#010;&#010;&#010;
</pre>
</div>
</content>
</entry>
<entry>
<title>How to apply mapper to filelist to get other fileset or filelist?</title>
<author><name>Lev Serebryakov &lt;lev@serebryakov.spb.ru&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/ant-user/201305.mbox/%3c1566281671.20130506181457@serebryakov.spb.ru%3e"/>
<id>urn:uuid:%3c1566281671-20130506181457@serebryakov-spb-ru%3e</id>
<updated>2013-05-06T14:14:57Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Hello, User.&#010;&#010;  Is it possible to apply mapper to &lt;filelist&gt; to get other &lt;filelist&gt;&#010;  or, even better, &lt;fileset&gt;? For example, if I have list of classes&#010;  and root source dir,  how could I get &lt;fileset&gt; which contains all&#010;  source files? Something like this:&#010;&#010;&lt;fileset dir="${root}"&gt;&#010;  &lt;filelist files="${list.of.classes}/&gt;&#010;  &lt;unpackagemapper from="*" to="*.java /&gt;&#010;&lt;/fileset&gt;&#010;&#010; But it doesn't work :(&#010;&#010;-- &#010;// Black Lion AKA Lev Serebryakov &lt;lev@serebryakov.spb.ru&gt;&#010;&#010;&#010;---------------------------------------------------------------------&#010;To unsubscribe, e-mail: user-unsubscribe@ant.apache.org&#010;For additional commands, e-mail: user-help@ant.apache.org&#010;&#010;&#010;
</pre>
</div>
</content>
</entry>
<entry>
<title>Re: How to write &lt;uptodate&gt; for &lt;javah&gt; task (i.e. check several headers files by class files or java files)?</title>
<author><name>Lev Serebryakov &lt;lev@serebryakov.spb.ru&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/ant-user/201305.mbox/%3c1415452280.20130506114422@serebryakov.spb.ru%3e"/>
<id>urn:uuid:%3c1415452280-20130506114422@serebryakov-spb-ru%3e</id>
<updated>2013-05-06T07:44:22Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Hello, Ant.&#010;You wrote 4 мая 2013 г., 12:08:41:&#010;&#010;LS&gt;   (2)&#010;LS&gt;     Then I tried to construct list of headers on-the-fly with &lt;mapper&gt;&#010;LS&gt;   inside &lt;uptodate&gt;. And failed completely, as I could use&#010;LS&gt;   &lt;packagemapper&gt; to convert from path to dotted-delimetered name of&#010;LS&gt;   file, but after that I could not convert dots to underscores, as&#010;LS&gt;   &lt;regexpmapper&gt; require FULL name in "to" attribute, not only&#010;LS&gt;   replacement. And, yes, what should I do if my paths contains dots!?&#010;LS&gt;   It will break everything!&#010; Ok, this construction works:&#010;&#010;&lt;loadresource property="java.sources.with.native"&gt;&#010;  &lt;propertyresource name="classes.native" /&gt;&#010;  &lt;filterchain&gt;&#010;    &lt;tokenfilter&gt;&#010;      &lt;stringtokenizer delims=","/&gt;&#010;      &lt;replacestring from="." to="/"/&gt;&#010;      &lt;replaceregex pattern="$$" replace=".java" /&gt;&#010;    &lt;tokenfilter&gt;&#010;  &lt;filterchain&gt;&#010;&lt;loadresource&gt;&#010;&lt;uptodate property="javah.skip"&gt;&#010;  &lt;srcfiles dir="${path.src}/src" includes="${java.sources.with.native}" /&gt;&#010;  &lt;chainedmapper&gt;&#010;    &lt;packagemapper from="*.java" to="${path.native}/*" /&gt;&#010;    &lt;filtermapper&gt;&#010;      &lt;replacestring from="." to="_" /&gt;&#010;      &lt;suffixlines suffix=".h" /&gt;&#010;    &lt;filtermapper&gt;&#010;  &lt;/chainedmapper&gt;&#010;&lt;/uptodate&gt;&#010;&#010;&#010;&#010;-- &#010;// Black Lion AKA Lev Serebryakov &lt;lev@serebryakov.spb.ru&gt;&#010;&#010;&#010;---------------------------------------------------------------------&#010;To unsubscribe, e-mail: user-unsubscribe@ant.apache.org&#010;For additional commands, e-mail: user-help@ant.apache.org&#010;&#010;&#010;
</pre>
</div>
</content>
</entry>
<entry>
<title>How to write &lt;uptodate&gt; for &lt;javah&gt; task (i.e. check several headers files by class files or java files)?</title>
<author><name>Lev Serebryakov &lt;lev@serebryakov.spb.ru&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/ant-user/201305.mbox/%3c273059400.20130504120841@serebryakov.spb.ru%3e"/>
<id>urn:uuid:%3c273059400-20130504120841@serebryakov-spb-ru%3e</id>
<updated>2013-05-04T08:08:41Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Hello, User.&#010;&#010; I  want  to check do I need to run &lt;javah&gt; task or not to re-generate&#010;header files for classes, which contains native methods. I want to use&#010;pure Ant 1.8.x, cross-platform.&#010;&#010; What I have as input:&#010;&#010;  (1) Property with path to Java source tree, "path.src"&#010;  (2) Property with path where &lt;javac&gt; task creates classes,&#010;  "path.classes"&#010;  (3) Property with path where header files live "path.native"&#010;  (4) List of classes with native methods, as comma-separated list in&#010;  one property "classes.native", like "my.package.impl.Class1,&#010;  my.packahe.impl.Class2".&#010;&#010; What I want as output:&#010;&#010;   Property "native.skip" set to "true" if every header file with name&#010; like "${path.native}/my_package_impl_Class1.h" is newer than java&#010; file "${path.src}/my/package/impl/Class1.java" or, alternatively, it&#010; is newer than "${path.classes}/my/package/impl/Class1.class".&#010;&#010;  Please note: I have SEVERAL classes in my list! With single class&#010; task is relativetely easy!&#010;&#010; What have I tried so far:&#010;&#010;  (1)&#010;    First transform class list to two file lists (as strings,&#010;  comma-separated, not &lt;filelist&gt;/&lt;fileset&gt;!), one with paths to&#010;  java sources, one with paths to headers. It works with some&#010;  &lt;loadresource&gt;/&lt;propertysource&gt;/&lt;filterchain&gt; magic (very, very&#010;  ugly, but it works).&#010;&#010;   Then I pass  such "list" of sources to &lt;srcfile includes=""&gt; for&#010;  &lt;uptodate&gt; and it seems to work, but such "list" as&#010;  &lt;uptodate targetfile&gt; doesn't for for sure: Verbose/debug output&#010;  says:&#010;&#010;[uptodate] The targetfile "&lt;full-path&gt;/&lt;name-1&gt;.h,&lt;relative-path&gt;/&lt;name-2&gt;.h"&#010;does not exist.&#010;&#010;  (2)&#010;    Then I tried to construct list of headers on-the-fly with &lt;mapper&gt;&#010;  inside &lt;uptodate&gt;. And failed completely, as I could use&#010;  &lt;packagemapper&gt; to convert from path to dotted-delimetered name of&#010;  file, but after that I could not convert dots to underscores, as&#010;  &lt;regexpmapper&gt; require FULL name in "to" attribute, not only&#010;  replacement. And, yes, what should I do if my paths contains dots!?&#010;  It will break everything!&#010;&#010;  What should I do?&#010;&#010;  And other question: is here any way to get list of needed classes&#010; automagically? Search all files with "native" word is not a solution,&#010; as this word could present in comments and JavaDocs of other classes,&#010; without native methods!&#010;&#010;-- &#010;// Black Lion AKA Lev Serebryakov &lt;lev@serebryakov.spb.ru&gt;&#010;&#010;&#010;---------------------------------------------------------------------&#010;To unsubscribe, e-mail: user-unsubscribe@ant.apache.org&#010;For additional commands, e-mail: user-help@ant.apache.org&#010;&#010;&#010;
</pre>
</div>
</content>
</entry>
<entry>
<title>Re: How to start tomcat with ant in linux OS</title>
<author><name>wolfgang häfelinger &lt;whaefelinger@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/ant-user/201304.mbox/%3cCAFSqz9Nbd+eWMh_M1UT1-PneUhnKxOaU06ZxgPuaeY2xifK7kg@mail.gmail.com%3e"/>
<id>urn:uuid:%3cCAFSqz9Nbd+eWMh_M1UT1-PneUhnKxOaU06ZxgPuaeY2xifK7kg@mail-gmail-com%3e</id>
<updated>2013-04-29T11:27:16Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Try this variant:&#010;&#010;3 .&#010;&#010;&lt;?xml version="1.0" encoding="GBK"?&gt;&#010;&lt;project name="how_should_ant_know_which_target_to_run?"&gt;&#010;&lt;property name="tomcat.home" value="/usr/local/Ehr_linux_2.7.2/bin"/&gt;&#010;&lt;target name="startup"&gt;&#010;&lt;exec dir="${tomcat.home}" executable="startup.sh"&gt;&#010;&lt;arg line="-c start ${tomcat.home}/startup.sh"&gt;&#010;&lt;/arg&gt;&#010;&lt;/exec&gt;&#010;&lt;/target&gt;&#010;&lt;/project&gt;&#010;&#010;&#010;On Sat, Apr 27, 2013 at 9:12 AM, xiaomin &lt;xingchenyu2009@126.com&gt; wrote:&#010;&#010;&gt;   Hi,dear friends,I hve a problem now and need your warm help.&#010;&gt;   I try to start Tomcat use ant in Linux OS,but I failed.Then I attempt to&#010;&gt; find solvent on the Internet,but got nothing.&#010;&gt; follow is two methods(build.xml files) that I have used,but none of them&#010;&gt; are&#010;&gt; successful.&#010;&gt; 1. &lt;?xml version="1.0" encoding="GBK"?&gt;&#010;&gt; &lt;project name="startup_tomcat"&gt;&#010;&gt; &lt;property name="tomcat.home" value="/usr/local/Ehr_linux_2.7.2"/&gt;&#010;&gt; &lt;target name="start-tomcat" description="tomcat starting....."&gt;&#010;&gt;         &lt;exec executable="${tomcat.home}/bin/startup.sh" spawn="true"&#010;&gt; vmlauncher="false"&gt;&#010;&gt;         &lt;env key="CATALINA_HOME" value="${tomcat.home}"/&gt;&#010;&gt;         &lt;arg line="-c start ${tomcat.home}/bin/startup.sh"/&gt;&#010;&gt;       &lt;/exec&gt;&#010;&gt;    &lt;/target&gt;&#010;&gt; &lt;/project&gt;&#010;&gt;&#010;&gt; 2.&lt;?xml version="1.0" encoding="GBK"?&gt;&#010;&gt; &lt;project name="startup_tomcat"&gt;&#010;&gt; &lt;property name="tomcat.home" value="/usr/local/Ehr_linux_2.7.2/bin"/&gt;&#010;&gt; &lt;target name="startup"&gt;&#010;&gt; &lt;exec dir="${tomcat.home}" executable="startup.sh"&gt;&#010;&gt; &lt;arg line="-c start ${tomcat.home}/startup.sh"&gt;&#010;&gt; &lt;/arg&gt;&#010;&gt; &lt;/exec&gt;&#010;&gt; &lt;/target&gt;&#010;&gt; &lt;/project&gt;&#010;&gt;&#010;&gt; When I run above build.xml files,it prompt :&#010;&gt; "Buildfile: /usr/local/rhio/apache-ant-1.9.0/case/build.xml&#010;&gt; BUILD SUCCESSFUL&#010;&gt; Total time: 0 seconds"&#010;&gt; but Tomcat haven't been started,I don't know how to do it,can you help me.&#010;&gt; Thank you very much!&#010;&gt;&#010;&gt;&#010;&gt;&#010;&gt;&#010;&gt; --&#010;&gt; View this message in context:&#010;&gt; http://ant.1045680.n5.nabble.com/How-to-start-tomcat-with-ant-in-linux-OS-tp5714092.html&#010;&gt; Sent from the Ant - Users mailing list archive at Nabble.com.&#010;&gt;&#010;&gt; ---------------------------------------------------------------------&#010;&gt; To unsubscribe, e-mail: user-unsubscribe@ant.apache.org&#010;&gt; For additional commands, e-mail: user-help@ant.apache.org&#010;&gt;&#010;&gt;&#010;&#010;&#010;-- &#010;Wolfgang Häfelinger&#010;&#010;
</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Anomalous package-info.java</title>
<author><name>Antoine Levy Lambert &lt;antoine@gmx.de&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/ant-user/201304.mbox/%3c111DF437-AC94-41AF-B189-9C53DAA48795@gmx.de%3e"/>
<id>urn:uuid:%3c111DF437-AC94-41AF-B189-9C53DAA48795@gmx-de%3e</id>
<updated>2013-04-28T01:20:40Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Hello Morten,&#010;&#010;I am not aware of this problem.&#010;&#010;How do you think that the behavior of  ant's javac task should be changed ?&#010;&#010;Should it have an option to exclude the package-info.java files ? or exclude them by default&#010;?&#010;&#010;Regards,&#010;&#010;Antoine&#010;&#010;On Apr 22, 2013, at 2:05 PM, Morten Sabroe Mortensen wrote:&#010;&#010;&gt; I am very sorry to see all my "package-info.java" files being stamped with&#010;&gt; the "anomalous package-info.java" statement from Ant and have javac&#010;&gt; generate a lot of "Creating empty .../package-info.class".&#010;&gt; &#010;&gt; While not being in a OSGi environment and not having annotations on&#010;&gt; packages, I do not at all find it "anomalous" to have my JavaDoc&#010;&gt; documentation written carefully in package-info.java files.&#010;&gt; &#010;&gt; I have read the Ant manual under javac, last section. What is the rationale&#010;&gt; behind forcing the generation of "empty" package-info.class files?&#010;&gt; &#010;&gt; When my javac task generates pages of output about&#010;&gt; package-info.class-creation and for no apparent reason, I get really&#010;&gt; scared. Contrary to most programmers, I actually care to write JavaDoc and&#010;&gt; at the vary least state the intended purpose and responsibility of packages.&#010;&gt; &#010;&gt; To me, the current state of package-info.java-handling does not appear to&#010;&gt; be sound at all. Is it sound?&#010;&gt; &#010;&gt; Someone care to comment upon the subject?&#010;&#010;&#010;---------------------------------------------------------------------&#010;To unsubscribe, e-mail: user-unsubscribe@ant.apache.org&#010;For additional commands, e-mail: user-help@ant.apache.org&#010;&#010;&#010;
</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Need your help</title>
<author><name>Antoine Levy Lambert &lt;antoine@gmx.de&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/ant-user/201304.mbox/%3c05B3C8B5-3D9C-4C9E-9B4C-642F104FAB83@gmx.de%3e"/>
<id>urn:uuid:%3c05B3C8B5-3D9C-4C9E-9B4C-642F104FAB83@gmx-de%3e</id>
<updated>2013-04-28T01:15:21Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Hello Xiaomin,&#010;&#010;try this&#010;&#010;when starting shell scripts from Ant, consider the shell interpreter (sh, bash, ksh) as the&#010;executable. The path to the script file is an argument for the shell used to run the script.&#010;&#010;so this snippet tells you what to change. Depending on your environment you might need to&#010;change it. &#010;&#010;&gt;    &lt;exec executable="sh" spawn="true"&#010;&gt; vmlauncher="false"&gt;   &#010;&gt;        &lt;env key="CATALINA_HOME" value="${tomcat.home}"/&gt;   &#010;&gt;        &lt;arg line="${tomcat.home}/bin/startup.sh"/&gt;   &#010;&gt;      &lt;/exec&gt;&#010;&#010;Regards,&#010;&#010;Antoine&#010;&#010;On Apr 27, 2013, at 2:02 AM, xiaomin wrote:&#010;&#010;&gt;  First,I express my sincere gratitude for your help,as you said,I remove the&#010;&gt; braces {},and decompress ant again,then it is OK.But I have another problem&#010;&gt; and remain powerless,I hope that you can help me again.&#010;&gt;  I try to start Tomcat use ant in Linux OS,but I failed.Then I attempt to&#010;&gt; find solvent on the Internet,but got nothing.&#010;&gt; follow is two methods(build.xml files) that I have used,but none of them are&#010;&gt; successful.&#010;&gt; 1. &lt;?xml version="1.0" encoding="GBK"?&gt;&#010;&gt; &lt;project name="startup_tomcat"&gt;&#010;&gt; &lt;property name="tomcat.home" value="/usr/local/Ehr_linux_2.7.2"/&gt;&#010;&gt; &lt;target name="start-tomcat" description="tomcat starting....."&gt;   &#010;&gt;        &lt;exec executable="${tomcat.home}/bin/startup.sh" spawn="true"&#010;&gt; vmlauncher="false"&gt;   &#010;&gt;        &lt;env key="CATALINA_HOME" value="${tomcat.home}"/&gt;   &#010;&gt;        &lt;arg line="-c start ${tomcat.home}/bin/startup.sh"/&gt;   &#010;&gt;      &lt;/exec&gt;&#010;&gt;   &lt;/target&gt; &#010;&gt; &lt;/project&gt;&#010;&gt; &#010;&gt; 2.&lt;?xml version="1.0" encoding="GBK"?&gt;&#010;&gt; &lt;project name="startup_tomcat"&gt;&#010;&gt; &lt;property name="tomcat.home" value="/usr/local/Ehr_linux_2.7.2/bin"/&gt;&#010;&gt; &lt;target name="startup"&gt;&#010;&gt; &lt;exec dir="${tomcat.home}" executable="startup.sh"&gt;&#010;&gt; &lt;arg line="-c start ${tomcat.home}/startup.sh"&gt;&#010;&gt; &lt;/arg&gt;&#010;&gt; &lt;/exec&gt;&#010;&gt; &lt;/target&gt;&#010;&gt; &lt;/project&gt;&#010;&gt; &#010;&gt; When I run above build.xml files,it prompt :&#010;&gt; "Buildfile: /usr/local/rhio/apache-ant-1.9.0/case/build.xml&#010;&gt; BUILD SUCCESSFUL&#010;&gt; Total time: 0 seconds" &#010;&gt; but Tomcat haven't been started,I don't know how to do it,can you help me.&#010;&gt; Thank you very much!&#010;&gt; &#010;&gt; &#010;&gt; &#010;&gt; &#010;&gt; --&#010;&gt; View this message in context: http://ant.1045680.n5.nabble.com/Need-your-help-tp5714084p5714091.html&#010;&gt; Sent from the Ant - Users mailing list archive at Nabble.com.&#010;&gt; &#010;&gt; ---------------------------------------------------------------------&#010;&gt; To unsubscribe, e-mail: user-unsubscribe@ant.apache.org&#010;&gt; For additional commands, e-mail: user-help@ant.apache.org&#010;&gt; &#010;&#010;&#010;---------------------------------------------------------------------&#010;To unsubscribe, e-mail: user-unsubscribe@ant.apache.org&#010;For additional commands, e-mail: user-help@ant.apache.org&#010;&#010;&#010;
</pre>
</div>
</content>
</entry>
<entry>
<title>How to start tomcat with ant in linux OS</title>
<author><name>xiaomin &lt;xingchenyu2009@126.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/ant-user/201304.mbox/%3c1367046744061-5714092.post@n5.nabble.com%3e"/>
<id>urn:uuid:%3c1367046744061-5714092-post@n5-nabble-com%3e</id>
<updated>2013-04-27T07:12:24Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
  Hi,dear friends,I hve a problem now and need your warm help.&#010;  I try to start Tomcat use ant in Linux OS,but I failed.Then I attempt to&#010;find solvent on the Internet,but got nothing. &#010;follow is two methods(build.xml files) that I have used,but none of them are&#010;successful. &#010;1. &lt;?xml version="1.0" encoding="GBK"?&gt; &#010;&lt;project name="startup_tomcat"&gt;&#010;&lt;property name="tomcat.home" value="/usr/local/Ehr_linux_2.7.2"/&gt;&#010;&lt;target name="start-tomcat" description="tomcat starting....."&gt;    &#010;        &lt;exec executable="${tomcat.home}/bin/startup.sh" spawn="true"&#010;vmlauncher="false"&gt;    &#010;        &lt;env key="CATALINA_HOME" value="${tomcat.home}"/&gt;    &#010;        &lt;arg line="-c start ${tomcat.home}/bin/startup.sh"/&gt;    &#010;      &lt;/exec&gt;&#010;   &lt;/target&gt;  &#010;&lt;/project&gt;&#010;&#010;2.&lt;?xml version="1.0" encoding="GBK"?&gt; &#010;&lt;project name="startup_tomcat"&gt;&#010;&lt;property name="tomcat.home" value="/usr/local/Ehr_linux_2.7.2/bin"/&gt;&#010;&lt;target name="startup"&gt;&#010;&lt;exec dir="${tomcat.home}" executable="startup.sh"&gt;&#010;&lt;arg line="-c start ${tomcat.home}/startup.sh"&gt;&#010;&lt;/arg&gt;&#010;&lt;/exec&gt;&#010;&lt;/target&gt;&#010;&lt;/project&gt;&#010;&#010;When I run above build.xml files,it prompt : &#010;"Buildfile: /usr/local/rhio/apache-ant-1.9.0/case/build.xml &#010;BUILD SUCCESSFUL &#010;Total time: 0 seconds" &#010;but Tomcat haven't been started,I don't know how to do it,can you help me.&#010;Thank you very much! &#010; &#010;&#010;&#010;&#010;--&#010;View this message in context: http://ant.1045680.n5.nabble.com/How-to-start-tomcat-with-ant-in-linux-OS-tp5714092.html&#010;Sent from the Ant - Users mailing list archive at Nabble.com.&#010;&#010;---------------------------------------------------------------------&#010;To unsubscribe, e-mail: user-unsubscribe@ant.apache.org&#010;For additional commands, e-mail: user-help@ant.apache.org&#010;&#010;&#010;
</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Need your help</title>
<author><name>xiaomin &lt;xingchenyu2009@126.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/ant-user/201304.mbox/%3c1367042534947-5714091.post@n5.nabble.com%3e"/>
<id>urn:uuid:%3c1367042534947-5714091-post@n5-nabble-com%3e</id>
<updated>2013-04-27T06:02:14Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
  First,I express my sincere gratitude for your help,as you said,I remove the&#010;braces {},and decompress ant again,then it is OK.But I have another problem&#010;and remain powerless,I hope that you can help me again.&#010;  I try to start Tomcat use ant in Linux OS,but I failed.Then I attempt to&#010;find solvent on the Internet,but got nothing.&#010;follow is two methods(build.xml files) that I have used,but none of them are&#010;successful.&#010;1. &lt;?xml version="1.0" encoding="GBK"?&gt;&#010;&lt;project name="startup_tomcat"&gt;&#010;&lt;property name="tomcat.home" value="/usr/local/Ehr_linux_2.7.2"/&gt;&#010;&lt;target name="start-tomcat" description="tomcat starting....."&gt;   &#010;        &lt;exec executable="${tomcat.home}/bin/startup.sh" spawn="true"&#010;vmlauncher="false"&gt;   &#010;        &lt;env key="CATALINA_HOME" value="${tomcat.home}"/&gt;   &#010;        &lt;arg line="-c start ${tomcat.home}/bin/startup.sh"/&gt;   &#010;      &lt;/exec&gt;&#010;   &lt;/target&gt; &#010;&lt;/project&gt;&#010;&#010;2.&lt;?xml version="1.0" encoding="GBK"?&gt;&#010;&lt;project name="startup_tomcat"&gt;&#010;&lt;property name="tomcat.home" value="/usr/local/Ehr_linux_2.7.2/bin"/&gt;&#010;&lt;target name="startup"&gt;&#010;&lt;exec dir="${tomcat.home}" executable="startup.sh"&gt;&#010;&lt;arg line="-c start ${tomcat.home}/startup.sh"&gt;&#010;&lt;/arg&gt;&#010;&lt;/exec&gt;&#010;&lt;/target&gt;&#010;&lt;/project&gt;&#010;&#010;When I run above build.xml files,it prompt :&#010;"Buildfile: /usr/local/rhio/apache-ant-1.9.0/case/build.xml&#010;BUILD SUCCESSFUL&#010;Total time: 0 seconds" &#010;but Tomcat haven't been started,I don't know how to do it,can you help me.&#010;Thank you very much!&#010;&#010;&#010;&#010;&#010;--&#010;View this message in context: http://ant.1045680.n5.nabble.com/Need-your-help-tp5714084p5714091.html&#010;Sent from the Ant - Users mailing list archive at Nabble.com.&#010;&#010;---------------------------------------------------------------------&#010;To unsubscribe, e-mail: user-unsubscribe@ant.apache.org&#010;For additional commands, e-mail: user-help@ant.apache.org&#010;&#010;&#010;
</pre>
</div>
</content>
</entry>
<entry>
<title>Ant xslt task seems to ignore xmlcatalog for mapping dtds</title>
<author><name>WULMS Alex &lt;Alex.WULMS@swift.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/ant-user/201304.mbox/%3c1759DECB91276E4083D703A908840BE701AAA00151C2@BE-EXCHANGE-10.swift.corp%3e"/>
<id>urn:uuid:%3c1759DECB91276E4083D703A908840BE701AAA00151C2@BE-EXCHANGE-10-swift-corp%3e</id>
<updated>2013-04-25T13:05:08Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Hi,&#010;&#010;I'm trying to use the xslt task in Ant to validate some xhtml files. The xhtml files start&#010;with a &lt;!DOCTYPE ...&gt; line to indicate the xhtml version. The doctype refers a DTD,&#010;like in following example:&#010;&#010;&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;&#010;&lt;html  xmlns:h="http://java.sun.com/jsf/html"&gt;&#010;&lt;h:head&gt;&#010;&lt;/h:head&gt;&#010;&lt;h:body&gt;&#010;&lt;/h:body&gt;&#010;&lt;/html&gt;&#010;&#010;The xslt task tries to connect to www.w3.org to fetch the dtd. But I'm behind a firewall so&#010;that fails. When I run ant with -v, I get amongst others following message in the stack trace:&#010;&#010;java.net.UnknownHostException: www.w3.org&#010;&#009;at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:177)&#010;&#009;at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)&#010;&#009;at java.net.Socket.connect(Socket.java:529)&#010;&#009;at java.net.Socket.connect(Socket.java:478)&#010;... some stuff about HttpClient and HttpURLConnection&#010;&#009;at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(XMLEntityManager.java:677)&#010;&#009;at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startEntity(XMLEntityManager.java:1315)&#010;&#009;at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startDTDEntity(XMLEntityManager.java:1282)&#010;...&#010;&#010;I have read about the xmlcatalog element that can be used to map the dtd-id to a local file.&#010;I have tried to set it up as follows:&#010;&#010;  &lt;xmlcatalog id="xhtmlDTDs"&gt;&#010;&#009;  &lt;dtd publicId="-//W3C//DTD XHTML 1.0 Transitional//EN" location="${product.home}/dtd/xhtml1-transitional.dtd"/&gt;&#010;  &lt;/xmlcatalog&gt;&#010;&#009;&#010;  &lt;target name="validate-xhtml"&gt;&#010;  &#009;&lt;mkdir dir="${module.home}/validate-xhtml-rslt}"/&gt;&#010;  &#009;&lt;xslt &#010;  &#009;&#009;basedir="${module.home}/src/webroot" &#010;  &#009;&#009;destdir="${module.home}/validate-xhtml-rslt" &#010;  &#009;&#009;style="${module.home}/validate-xhtml.xslt"&#010;  &#009;&#009;includes="**/alex.xhtml"&#010;  &#009;&gt;&#010;  &#009;&#009;&lt;xmlcatalog refid="xhtmlDTDs" /&gt;&#010;  &#009;&#009;&lt;mapper type="glob" from="*.xhtml" to="*.html"/&gt;&#010;  &#009;&lt;/xslt&gt;&#010;  &lt;/target&gt;&#010;&#010;But despite the xmlcatalog being defined, I still get the very same exception.&#010;&#010;Note that I'm using ant 1.7.1 which is bundled with eclipse and I'm running it with a JRE&#010;1.6.0.22. I have also added resolver.jar from apache xml-commons to the classpath but it does&#010;not help neither.&#010;&#010;Note that this is the output from ant with -v option:&#010;validate-xhtml:&#010;    [mkdir] Skipping P:\srcSDC\idm\modules\identitypublicweb\validate-xhtml-rslt} because&#010;it already exists.&#010;     [xslt] Using class org.apache.tools.ant.taskdefs.optional.TraXLiaison&#010;     [xslt] Transforming into P:\srcSDC\idm\modules\identitypublicweb\validate-xhtml-rslt&#010;     [xslt] Processing P:\srcSDC\idm\modules\identitypublicweb\src\webroot\alex.xhtml to P:\srcSDC\idm\modules\identitypublicweb\validate-xhtml-rslt\alex.html&#010;     [xslt] Loading stylesheet P:\srcSDC\idm\modules\identitypublicweb\validate-xhtml.xslt&#010;Apache resolver library found, xml-commons resolver will be used&#010;     [xslt] : Error! www.w3.org&#010;     [xslt] : Error! com.sun.org.apache.xml.internal.utils.WrappedRuntimeException: www.w3.org&#010;     [xslt] Failed to process null&#010;&#010;After that comes the stacktrace with the host not found exception&#010;&#010;&#010;Any help or hints in fixing this are appreciated.&#010;&#010;Thanks and kind regards,&#010;Alex&#010;&#010;&#010;&#010;&#010;Alex Wulms&#010;SWIFT | Lead Developer / E-channel &#010;Tel: +32 2 6553931&#010;www.swift.com&#010;&#010;This e-mail and any attachments thereto may contain information which is confidential and/or&#010;proprietary and intended for the sole use of the recipient(s) named above. If you have received&#010;this e-mail in error, please immediately notify the sender and delete the mail.  Thank you&#010;for your co-operation.  SWIFT reserves the right to retain e-mail messages on its systems&#010;and, under circumstances permitted by applicable law, to monitor and intercept e-mail messages&#010;to and from its systems.&#010;&#010;&#010;&#010;---------------------------------------------------------------------&#010;To unsubscribe, e-mail: user-unsubscribe@ant.apache.org&#010;For additional commands, e-mail: user-help@ant.apache.org&#010;&#010;&#010;
</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Need your help</title>
<author><name>Roberto Rivera &lt;roberto.rivera@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/ant-user/201304.mbox/%3cCABoXaaNDj7Un5UaUh3ND1hXvepihZcuh3x8ZZ8LLKcXVbbgG2w@mail.gmail.com%3e"/>
<id>urn:uuid:%3cCABoXaaNDj7Un5UaUh3ND1hXvepihZcuh3x8ZZ8LLKcXVbbgG2w@mail-gmail-com%3e</id>
<updated>2013-04-24T15:16:03Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Hi,&#010;&#010;Try removing the brackets {  } . Look at my ANT_HOME and PATH config. You&#010;can see that variables ($ANT_HOME, $PATH) don't have brackets in my config&#010;but do have the $ character.&#010;&#010;export ANT_HOME=/app/tools/ant&#010;export PATH=$ANT_HOME/bin:$PATH&#010;&#010;Maybe your shell is different than mine, but I'd give it a shot. Also, log&#010;off and then log back in to check if the changes are applied.&#010;&#010;Regards,&#010;Roberto&#010;&#010;&#010;&#010;On Wed, Apr 24, 2013 at 2:07 AM, xiaomin &lt;xingchenyu2009@126.com&gt; wrote:&#010;&#010;&gt; Hello,I am a new comer,a new learner to ant.I have some problems in study&#010;&gt; process,I hope that you can help me when you have time.&#010;&gt;   When I have configurated the enviroment of ant (ANT_HOME),I input "ant&#010;&gt; -version" to check whether the ant envrioment is OK,but it will prompt&#010;&gt; "-bash: ant: command not found". Below are my input steps:&#010;&gt; First,I land linux OS by SSH,and then input "vi /etc/profile"&#010;&gt;&#010;&gt; [root@localhost ~]# vi /etc/profile       (Enter,After the return is as&#010;&gt; follows)&#010;&gt;&#010;&gt; # /etc/profile&#010;&gt;&#010;&gt; # System wide environment and startup programs, for login setup&#010;&gt; # Functions and aliases go in /etc/bashrc&#010;&gt;&#010;&gt;&#010;&gt; export ANT_HOME=/usr/local/rhio/apache-ant-1.9.0&#010;&gt; export JAVA_HOME=/usr/java/jdk1.6.0_14&#010;&gt; export PATH=${PATH}:${ANT_HOME}/bin:${JAVA_HOME}/bin&#010;&gt;&#010;&gt;&#010;&gt; *(The above three lines is my ant enviroment configuration, I do not know&#010;&gt; where the error lies. )*&#010;&gt;&#010;&gt;&#010;&gt;&#010;&gt; pathmunge () {&#010;&gt;         if ! echo $PATH | /bin/egrep -q "(^|:)$1($|:)" ; then&#010;&gt;            if [ "$2" = "after" ] ; then&#010;&gt;               PATH=$PATH:$1&#010;&gt;            else&#010;&gt;               PATH=$1:$PATH&#010;&gt;            fi&#010;&gt;         fi&#010;&gt; }&#010;&gt;&#010;&gt; # ksh workaround&#010;&gt; if [ -z "$EUID" -a -x /usr/bin/id ]; then&#010;&gt;         EUID=`id -u`&#010;&gt;         UID=`id -ru`&#010;&gt; fi&#010;&gt;&#010;&gt; # Path manipulation&#010;&gt; if [ "$EUID" = "0" ]; then&#010;&gt;         pathmunge /sbin&#010;&gt;&#010;&gt;&#010;&gt;&#010;&gt; At last, I shall consider it a great favour if you will help me. Thank you!&#010;&gt;&#010;&gt;&#010;&gt;&#010;&gt;&#010;&gt;&#010;&gt; --&#010;&gt; View this message in context:&#010;&gt; http://ant.1045680.n5.nabble.com/Need-your-help-tp5714084.html&#010;&gt; Sent from the Ant - Users mailing list archive at Nabble.com.&#010;&gt;&#010;&gt; ---------------------------------------------------------------------&#010;&gt; To unsubscribe, e-mail: user-unsubscribe@ant.apache.org&#010;&gt; For additional commands, e-mail: user-help@ant.apache.org&#010;&gt;&#010;&gt;&#010;&#010;
</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Java 5 fails to run jar files created with Ant 1.9.0</title>
<author><name>Stefan Bodewig &lt;bodewig@apache.org&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/ant-user/201304.mbox/%3c87vc7ckw5n.fsf@v35516.1blu.de%3e"/>
<id>urn:uuid:%3c87vc7ckw5n-fsf@v35516-1blu-de%3e</id>
<updated>2013-04-24T11:25:40Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
On 2013-04-24, Sentinel.czech wrote:&#010;&#010;&gt; As I have read in discussion thred something changed in zip algorithm.&#010;&#010;Yes, that's right.&#010;&#010;&lt;https://issues.apache.org/bugzilla/show_bug.cgi?id=54762&gt;&#010;&#010;&gt; Question is, if there is a way to create "old style" compressed jar.&#010;&#010;One option is to the compress' antlib's zip task which already has the&#010;zip64Mode attribute that you can set to "never".  Other than that the&#010;only idea I'd have was running Java's own "jar" via &lt;exec&gt; or &lt;apply&gt;.&#010;&#010;Stefan&#010;&#010;---------------------------------------------------------------------&#010;To unsubscribe, e-mail: user-unsubscribe@ant.apache.org&#010;For additional commands, e-mail: user-help@ant.apache.org&#010;&#010;&#010;
</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Java 5 fails to run jar files created with Ant 1.9.0</title>
<author><name>&quot;Sentinel.czech&quot; &lt;sentinel.czech@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/ant-user/201304.mbox/%3c1366797823876-5714085.post@n5.nabble.com%3e"/>
<id>urn:uuid:%3c1366797823876-5714085-post@n5-nabble-com%3e</id>
<updated>2013-04-24T10:03:43Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
I came accross with the same problem:&#010;- ubuntu, java 1.5.0_22, ant 1.8.2&#010;- suse, java 1.5.0_08, ant 1.9.0&#010;(yes not the identical environments but.. in 1.8.x it was working..)&#010;&#010;Manifest is genereated in jar taks.&#010;&#010;there were following differences:&#010;- Manifest: only content of Ant-Version: , and Created-By:  (that could not&#010;make problem)&#010;- differences of jar files length,  jar from 1.8  has 6.2kB, jar from 1.9&#010;has 6.3kB,  --&gt; i thing this shows to different compressing.&#010;and if I compare displayed content with kdiff3, it is different in some&#010;parts.&#010;&#010;As I have read in discussion thred something changed in zip algorithm. &#010;Question is, if there is a way to create "old style" compressed jar.&#010;&#010;Regards&#010;Vaclav&#010;&#010;&#010;&#010;&#010;&#010;--&#010;View this message in context: http://ant.1045680.n5.nabble.com/Java-5-fails-to-run-jar-files-created-with-Ant-1-9-0-tp5713992p5714085.html&#010;Sent from the Ant - Users mailing list archive at Nabble.com.&#010;&#010;---------------------------------------------------------------------&#010;To unsubscribe, e-mail: user-unsubscribe@ant.apache.org&#010;For additional commands, e-mail: user-help@ant.apache.org&#010;&#010;&#010;
</pre>
</div>
</content>
</entry>
<entry>
<title>Need your help</title>
<author><name>xiaomin &lt;xingchenyu2009@126.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/ant-user/201304.mbox/%3c1366783666654-5714084.post@n5.nabble.com%3e"/>
<id>urn:uuid:%3c1366783666654-5714084-post@n5-nabble-com%3e</id>
<updated>2013-04-24T06:07:47Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Hello,I am a new comer,a new learner to ant.I have some problems in study&#010;process,I hope that you can help me when you have time.&#010;  When I have configurated the enviroment of ant (ANT_HOME),I input "ant&#010;-version" to check whether the ant envrioment is OK,but it will prompt&#010;"-bash: ant: command not found". Below are my input steps:&#010;First,I land linux OS by SSH,and then input "vi /etc/profile"&#010;&#010;[root@localhost ~]# vi /etc/profile       (Enter,After the return is as&#010;follows)&#010;&#010;# /etc/profile&#010;&#010;# System wide environment and startup programs, for login setup&#010;# Functions and aliases go in /etc/bashrc&#010;&#010;&#010;export ANT_HOME=/usr/local/rhio/apache-ant-1.9.0&#010;export JAVA_HOME=/usr/java/jdk1.6.0_14&#010;export PATH=${PATH}:${ANT_HOME}/bin:${JAVA_HOME}/bin     &#010;&#010;&#010;*(The above three lines is my ant enviroment configuration, I do not know&#010;where the error lies. )*&#010;&#010;&#010;&#010;pathmunge () {&#010;        if ! echo $PATH | /bin/egrep -q "(^|:)$1($|:)" ; then&#010;           if [ "$2" = "after" ] ; then&#010;              PATH=$PATH:$1&#010;           else&#010;              PATH=$1:$PATH&#010;           fi&#010;        fi&#010;}&#010;&#010;# ksh workaround&#010;if [ -z "$EUID" -a -x /usr/bin/id ]; then&#010;        EUID=`id -u`&#010;        UID=`id -ru`&#010;fi&#010;&#010;# Path manipulation&#010;if [ "$EUID" = "0" ]; then&#010;        pathmunge /sbin&#010;&#010;&#010;&#010;At last, I shall consider it a great favour if you will help me. Thank you!&#010;&#010;&#010;&#010;&#010;&#010;--&#010;View this message in context: http://ant.1045680.n5.nabble.com/Need-your-help-tp5714084.html&#010;Sent from the Ant - Users mailing list archive at Nabble.com.&#010;&#010;---------------------------------------------------------------------&#010;To unsubscribe, e-mail: user-unsubscribe@ant.apache.org&#010;For additional commands, e-mail: user-help@ant.apache.org&#010;&#010;&#010;
</pre>
</div>
</content>
</entry>
<entry>
<title>Anomalous package-info.java</title>
<author><name>Morten Sabroe Mortensen &lt;morten.sabroe.mortensen@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/ant-user/201304.mbox/%3cCAK9kVeN7=GPQvdNWi-t5WKnLb-m4om3ibTVhT_GU=XkFz3Grgg@mail.gmail.com%3e"/>
<id>urn:uuid:%3cCAK9kVeN7=GPQvdNWi-t5WKnLb-m4om3ibTVhT_GU=XkFz3Grgg@mail-gmail-com%3e</id>
<updated>2013-04-22T18:05:29Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
I am very sorry to see all my "package-info.java" files being stamped with&#010;the "anomalous package-info.java" statement from Ant and have javac&#010;generate a lot of "Creating empty .../package-info.class".&#010;&#010;While not being in a OSGi environment and not having annotations on&#010;packages, I do not at all find it "anomalous" to have my JavaDoc&#010;documentation written carefully in package-info.java files.&#010;&#010;I have read the Ant manual under javac, last section. What is the rationale&#010;behind forcing the generation of "empty" package-info.class files?&#010;&#010;When my javac task generates pages of output about&#010;package-info.class-creation and for no apparent reason, I get really&#010;scared. Contrary to most programmers, I actually care to write JavaDoc and&#010;at the vary least state the intended purpose and responsibility of packages.&#010;&#010;To me, the current state of package-info.java-handling does not appear to&#010;be sound at all. Is it sound?&#010;&#010;Someone care to comment upon the subject?&#010;&#010;
</pre>
</div>
</content>
</entry>
<entry>
<title>Re: How to Escape White Spaces in a Config File</title>
<author><name>&quot;Scot P. Floess&quot; &lt;sfloess@nc.rr.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/ant-user/201304.mbox/%3calpine.DEB.2.00.1304181235170.6039@adminserver%3e"/>
<id>urn:uuid:%3calpine-DEB-2-00-1304181235170-6039@adminserver%3e</id>
<updated>2013-04-18T16:35:49Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
&#010;Any chance we can see a snippet of what you are attempting?  What type of &#010;config file?&#010;&#010;On Wed, 17 Apr 2013, patomica wrote:&#010;&#010;&gt; How do i escape white spaces in a config file and not replace them. Like for&#010;&gt; example:&#010;&gt;&#010;&gt; &lt;outfile&gt;C:\Users\Donald\Desktop\Donald&#010;&gt; Files\wowchat\proj-sna-vnet-us\liveagent/target/build//starter.exe&lt;/outfile&gt;&#010;&gt;&#010;&gt; There's a space between "Donald" and "Files". What method do i need to put&#010;&gt; on my build script to just skip the whitespace?&#010;&gt;&#010;&gt;&#010;&gt;&#010;&gt; --&#010;&gt; View this message in context: http://ant.1045680.n5.nabble.com/How-to-Escape-White-Spaces-in-a-Config-File-tp5714063.html&#010;&gt; Sent from the Ant - Users mailing list archive at Nabble.com.&#010;&gt;&#010;&gt; ---------------------------------------------------------------------&#010;&gt; To unsubscribe, e-mail: user-unsubscribe@ant.apache.org&#010;&gt; For additional commands, e-mail: user-help@ant.apache.org&#010;&gt;&#010;&gt;&#010;&#010;Scot P. Floess             RHCT  (Certificate Number 605010084735240)&#010;Chief Architect FlossWare  http://sourceforge.net/projects/flossware&#010;                            http://flossware.sourceforge.net&#010;                            https://github.com/organizations/FlossWare&#010;&#010;---------------------------------------------------------------------&#010;To unsubscribe, e-mail: user-unsubscribe@ant.apache.org&#010;For additional commands, e-mail: user-help@ant.apache.org&#010;&#010;&#010;
</pre>
</div>
</content>
</entry>
<entry>
<title>Re: basedir setting not working?</title>
<author><name>Michael Niemand &lt;michael.niemand@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/ant-user/201304.mbox/%3cCADVwfObq57CF_JfE2wigrhMaVV0EqnZZZJgz0e2bJGowSVfFPA@mail.gmail.com%3e"/>
<id>urn:uuid:%3cCADVwfObq57CF_JfE2wigrhMaVV0EqnZZZJgz0e2bJGowSVfFPA@mail-gmail-com%3e</id>
<updated>2013-04-18T11:30:15Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Ok, nevermind, I've found the problem.&#010;&#010;In the ant script I call the other ant script, I set the "dir" property to&#010;location A, so the basedir is taken from there ...&#010;&#010;&#010;&#010;&#010;On Thu, Apr 18, 2013 at 1:07 PM, Michael Niemand&#010;&lt;michael.niemand@gmail.com&gt;wrote:&#010;&#010;&gt; Thanks Jan,&#010;&gt;&#010;&gt; I check out the project to 2 different locations. Hence the build file&#010;&gt; resides in 2 different locations. yet, the basedir is the same in both&#010;&gt; locations. This results in a failed build in one location.&#010;&gt;&#010;&gt;&#010;&gt;&#010;&gt; On Thu, Apr 18, 2013 at 8:15 AM, Jan Matèrne (jhm) &lt;apache@materne.de&gt;wrote:&#010;&gt;&#010;&gt;&gt; The "." in the basedir attribute is relative to the buildfile itself, not&#010;&gt;&gt; the current directory.&#010;&gt;&gt; You could access that via ${user.dir} :&#010;&gt;&gt;&#010;&gt;&gt; &lt;project basedir="."&gt;&#010;&gt;&gt;     &lt;echo&gt;BaseDir: ${basedir}&lt;/echo&gt;&#010;&gt;&gt;     &lt;echo&gt;UserDir: ${user.dir}&lt;/echo&gt;&#010;&gt;&gt; &lt;/project&gt;&#010;&gt;&gt;&#010;&gt;&gt; You can't set that value as basedir because at the time when basedir is&#010;&gt;&gt; set,&#010;&gt;&gt; the system properties aren't populates as Ant properties.&#010;&gt;&gt; (Also I would not do that because can't be sure from where a user is&#010;&gt;&gt; calling&#010;&gt;&gt; the buildfile with strange site effects ... think of a "ant clean" in your&#010;&gt;&gt; home dir?)&#010;&gt;&gt;&#010;&gt;&gt;&#010;&gt;&gt; Jan&#010;&gt;&gt;&#010;&gt;&gt; &gt; -----Ursprüngliche Nachricht-----&#010;&gt;&gt; &gt; Von: Michael Niemand [mailto:michael.niemand@gmail.com]&#010;&gt;&gt; &gt; Gesendet: Mittwoch, 17. April 2013 16:12&#010;&gt;&gt; &gt; An: user@ant.apache.org&#010;&gt;&gt; &gt; Betreff: basedir setting not working?&#010;&gt;&gt; &gt;&#010;&gt;&gt; &gt; Hi folks,&#010;&gt;&gt; &gt;&#010;&gt;&gt; &gt; my basedir setting doesnt seem to work.&#010;&gt;&gt; &gt;&#010;&gt;&gt; &gt; I have the same project I check out to two different locations.&#010;&gt;&gt; &gt;&#010;&gt;&gt; &gt; in the second project the basedir setting doesnt seem to work.&#010;&gt;&gt; &gt;&#010;&gt;&gt; &gt; Here's what I do:&#010;&gt;&gt; &gt;&#010;&gt;&gt; &gt; &lt;!-- &lt;project name="ClientKapselTest" default="targets" basedir="./"&gt;&#010;&gt;&gt; &gt; also tried that --&gt; &lt;project name="ClientKapselTest" default="targets"&#010;&gt;&gt; &gt; &gt;&#010;&gt;&gt; &gt;&#010;&gt;&gt; &gt; &lt;!-- ==================== Initialization properties&#010;&gt;&gt; &gt; =====================&#010;&gt;&gt; &gt; --&gt;&#010;&gt;&gt; &gt; &lt;echo message="*** what's considered basedir before setting it:&#010;&gt;&gt; &gt; ${basedir}"&#010;&gt;&gt; &gt; /&gt;&#010;&gt;&gt; &gt; &lt;property name="basedir" value="."/&gt;&#010;&gt;&gt; &gt; &lt;echo message="*** what's considered basedir after setting it:&#010;&gt;&gt; &gt; ${basedir}"&#010;&gt;&gt; &gt; /&gt;&#010;&gt;&gt; &gt;&#010;&gt;&gt; &gt; &lt;/project&gt;&#010;&gt;&gt; &gt;&#010;&gt;&gt; &gt; The result is always:&#010;&gt;&gt; &gt;&#010;&gt;&gt; &gt;      [echo] *** what's considered basedir before setting it:&#010;&gt;&gt; &gt; M:\path\to\A&#010;&gt;&gt; &gt;      [echo] *** what's considered basedir after setting it:&#010;&gt;&gt; &gt; M:\path\to\A&#010;&gt;&gt; &gt;&#010;&gt;&gt; &gt;&#010;&gt;&gt; &gt; even though I execute the ant-skript in M:\path\to\B&#010;&gt;&gt; &gt;&#010;&gt;&gt; &gt;&#010;&gt;&gt; &gt; I thought basedir is always the path where the build.xml itself&#010;&gt;&gt; &gt; resides?&#010;&gt;&gt;&#010;&gt;&gt;&#010;&gt;&gt; ---------------------------------------------------------------------&#010;&gt;&gt; To unsubscribe, e-mail: user-unsubscribe@ant.apache.org&#010;&gt;&gt; For additional commands, e-mail: user-help@ant.apache.org&#010;&gt;&gt;&#010;&gt;&gt;&#010;&gt;&#010;&gt;&#010;&gt; --&#010;&gt; Dipl.-Ing. (FH) *Michael Niemand**&#010;&gt; *&#010;&gt; Albusstr. 17&#010;&gt; 60313 Frankfurt/M&#010;&gt; Germany&#010;&gt;&#010;&gt; Tel.: +49 (0) 69 200 130 60&#010;&gt; Mobile: +49 (0) 171 645 29 07&#010;&gt;&#010;&gt; eMail: michael.niemand@gmail.com&#010;&gt; sip:1406283@sipgate.de&#010;&gt;&#010;&#010;&#010;&#010;-- &#010;Dipl.-Ing. (FH) *Michael Niemand**&#010;*&#010;Albusstr. 17&#010;60313 Frankfurt/M&#010;Germany&#010;&#010;Tel.: +49 (0) 69 200 130 60&#010;Mobile: +49 (0) 171 645 29 07&#010;&#010;eMail: michael.niemand@gmail.com&#010;sip:1406283@sipgate.de&#010;&#010;
</pre>
</div>
</content>
</entry>
<entry>
<title>AW: basedir setting not working?</title>
<author><name>Jan Matèrne (jhm) &lt;apache@materne.de&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/ant-user/201304.mbox/%3c00e301ce3c27$a198a650$e4c9f2f0$@de%3e"/>
<id>urn:uuid:%3c00e301ce3c27$a198a650$e4c9f2f0$@de%3e</id>
<updated>2013-04-18T11:26:54Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Usually you should have the basedir="." - or leave it empty (&lt;project&gt;...).&#010;All paths "inside the project" should be relative.&#010;Paths "outside the project" should be defined via properties.&#010;&#010;So you could port the project to other locations (just define the "external&#010;paths" as new properties).&#010;&#010;&#010;If this doesnt answer your question I didnt get your point ...&#010;&#010;&#010;Jan&#010;&#010;&gt; -----Ursprüngliche Nachricht-----&#010;&gt; Von: Michael Niemand [mailto:michael.niemand@gmail.com]&#010;&gt; Gesendet: Donnerstag, 18. April 2013 13:07&#010;&gt; An: Ant Users List&#010;&gt; Betreff: Re: basedir setting not working?&#010;&gt; &#010;&gt; Thanks Jan,&#010;&gt; &#010;&gt; I check out the project to 2 different locations. Hence the build file&#010;&gt; resides in 2 different locations. yet, the basedir is the same in both&#010;&gt; locations. This results in a failed build in one location.&#010;&gt; &#010;&gt; &#010;&gt; &#010;&gt; On Thu, Apr 18, 2013 at 8:15 AM, Jan Matèrne (jhm)&#010;&gt; &lt;apache@materne.de&gt;wrote:&#010;&gt; &#010;&gt; &gt; The "." in the basedir attribute is relative to the buildfile itself,&#010;&gt; &gt; not the current directory.&#010;&gt; &gt; You could access that via ${user.dir} :&#010;&gt; &gt;&#010;&gt; &gt; &lt;project basedir="."&gt;&#010;&gt; &gt;     &lt;echo&gt;BaseDir: ${basedir}&lt;/echo&gt;&#010;&gt; &gt;     &lt;echo&gt;UserDir: ${user.dir}&lt;/echo&gt;&#010;&gt; &gt; &lt;/project&gt;&#010;&gt; &gt;&#010;&gt; &gt; You can't set that value as basedir because at the time when basedir&#010;&gt; &gt; is set, the system properties aren't populates as Ant properties.&#010;&gt; &gt; (Also I would not do that because can't be sure from where a user is&#010;&gt; &gt; calling the buildfile with strange site effects ... think of a "ant&#010;&gt; &gt; clean" in your home dir?)&#010;&gt; &gt;&#010;&gt; &gt;&#010;&gt; &gt; Jan&#010;&gt; &gt;&#010;&gt; &gt; &gt; -----Ursprüngliche Nachricht-----&#010;&gt; &gt; &gt; Von: Michael Niemand [mailto:michael.niemand@gmail.com]&#010;&gt; &gt; &gt; Gesendet: Mittwoch, 17. April 2013 16:12&#010;&gt; &gt; &gt; An: user@ant.apache.org&#010;&gt; &gt; &gt; Betreff: basedir setting not working?&#010;&gt; &gt; &gt;&#010;&gt; &gt; &gt; Hi folks,&#010;&gt; &gt; &gt;&#010;&gt; &gt; &gt; my basedir setting doesnt seem to work.&#010;&gt; &gt; &gt;&#010;&gt; &gt; &gt; I have the same project I check out to two different locations.&#010;&gt; &gt; &gt;&#010;&gt; &gt; &gt; in the second project the basedir setting doesnt seem to work.&#010;&gt; &gt; &gt;&#010;&gt; &gt; &gt; Here's what I do:&#010;&gt; &gt; &gt;&#010;&gt; &gt; &gt; &lt;!-- &lt;project name="ClientKapselTest" default="targets"&#010;&gt; &gt; &gt; basedir="./"&gt; also tried that --&gt; &lt;project name="ClientKapselTest"&#010;&gt; default="targets"&#010;&gt; &gt; &gt; &gt;&#010;&gt; &gt; &gt;&#010;&gt; &gt; &gt; &lt;!-- ==================== Initialization properties&#010;&gt; &gt; &gt; =====================&#010;&gt; &gt; &gt; --&gt;&#010;&gt; &gt; &gt; &lt;echo message="*** what's considered basedir before setting it:&#010;&gt; &gt; &gt; ${basedir}"&#010;&gt; &gt; &gt; /&gt;&#010;&gt; &gt; &gt; &lt;property name="basedir" value="."/&gt; &lt;echo message="*** what's&#010;&gt; &gt; &gt; considered basedir after setting it:&#010;&gt; &gt; &gt; ${basedir}"&#010;&gt; &gt; &gt; /&gt;&#010;&gt; &gt; &gt;&#010;&gt; &gt; &gt; &lt;/project&gt;&#010;&gt; &gt; &gt;&#010;&gt; &gt; &gt; The result is always:&#010;&gt; &gt; &gt;&#010;&gt; &gt; &gt;      [echo] *** what's considered basedir before setting it:&#010;&gt; &gt; &gt; M:\path\to\A&#010;&gt; &gt; &gt;      [echo] *** what's considered basedir after setting it:&#010;&gt; &gt; &gt; M:\path\to\A&#010;&gt; &gt; &gt;&#010;&gt; &gt; &gt;&#010;&gt; &gt; &gt; even though I execute the ant-skript in M:\path\to\B&#010;&gt; &gt; &gt;&#010;&gt; &gt; &gt;&#010;&gt; &gt; &gt; I thought basedir is always the path where the build.xml itself&#010;&gt; &gt; &gt; resides?&#010;&gt; &gt;&#010;&gt; &gt;&#010;&gt; &gt; ---------------------------------------------------------------------&#010;&gt; &gt; To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For&#010;&gt; additional&#010;&gt; &gt; commands, e-mail: user-help@ant.apache.org&#010;&gt; &gt;&#010;&gt; &gt;&#010;&gt; &#010;&gt; &#010;&gt; --&#010;&gt; Dipl.-Ing. (FH) *Michael Niemand**&#010;&gt; *&#010;&gt; Albusstr. 17&#010;&gt; 60313 Frankfurt/M&#010;&gt; Germany&#010;&gt; &#010;&gt; Tel.: +49 (0) 69 200 130 60&#010;&gt; Mobile: +49 (0) 171 645 29 07&#010;&gt; &#010;&gt; eMail: michael.niemand@gmail.com&#010;&gt; sip:1406283@sipgate.de&#010;&#010;&#010;---------------------------------------------------------------------&#010;To unsubscribe, e-mail: user-unsubscribe@ant.apache.org&#010;For additional commands, e-mail: user-help@ant.apache.org&#010;&#010;&#010;
</pre>
</div>
</content>
</entry>
<entry>
<title>Re: basedir setting not working?</title>
<author><name>Michael Niemand &lt;michael.niemand@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/ant-user/201304.mbox/%3cCADVwfOawz0JK-tsAwjj5utVhjitrOF_AHqAyOL7GjxbuMqZAZA@mail.gmail.com%3e"/>
<id>urn:uuid:%3cCADVwfOawz0JK-tsAwjj5utVhjitrOF_AHqAyOL7GjxbuMqZAZA@mail-gmail-com%3e</id>
<updated>2013-04-18T11:07:09Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Thanks Jan,&#010;&#010;I check out the project to 2 different locations. Hence the build file&#010;resides in 2 different locations. yet, the basedir is the same in both&#010;locations. This results in a failed build in one location.&#010;&#010;&#010;&#010;On Thu, Apr 18, 2013 at 8:15 AM, Jan Matèrne (jhm) &lt;apache@materne.de&gt;wrote:&#010;&#010;&gt; The "." in the basedir attribute is relative to the buildfile itself, not&#010;&gt; the current directory.&#010;&gt; You could access that via ${user.dir} :&#010;&gt;&#010;&gt; &lt;project basedir="."&gt;&#010;&gt;     &lt;echo&gt;BaseDir: ${basedir}&lt;/echo&gt;&#010;&gt;     &lt;echo&gt;UserDir: ${user.dir}&lt;/echo&gt;&#010;&gt; &lt;/project&gt;&#010;&gt;&#010;&gt; You can't set that value as basedir because at the time when basedir is&#010;&gt; set,&#010;&gt; the system properties aren't populates as Ant properties.&#010;&gt; (Also I would not do that because can't be sure from where a user is&#010;&gt; calling&#010;&gt; the buildfile with strange site effects ... think of a "ant clean" in your&#010;&gt; home dir?)&#010;&gt;&#010;&gt;&#010;&gt; Jan&#010;&gt;&#010;&gt; &gt; -----Ursprüngliche Nachricht-----&#010;&gt; &gt; Von: Michael Niemand [mailto:michael.niemand@gmail.com]&#010;&gt; &gt; Gesendet: Mittwoch, 17. April 2013 16:12&#010;&gt; &gt; An: user@ant.apache.org&#010;&gt; &gt; Betreff: basedir setting not working?&#010;&gt; &gt;&#010;&gt; &gt; Hi folks,&#010;&gt; &gt;&#010;&gt; &gt; my basedir setting doesnt seem to work.&#010;&gt; &gt;&#010;&gt; &gt; I have the same project I check out to two different locations.&#010;&gt; &gt;&#010;&gt; &gt; in the second project the basedir setting doesnt seem to work.&#010;&gt; &gt;&#010;&gt; &gt; Here's what I do:&#010;&gt; &gt;&#010;&gt; &gt; &lt;!-- &lt;project name="ClientKapselTest" default="targets" basedir="./"&gt;&#010;&gt; &gt; also tried that --&gt; &lt;project name="ClientKapselTest" default="targets"&#010;&gt; &gt; &gt;&#010;&gt; &gt;&#010;&gt; &gt; &lt;!-- ==================== Initialization properties&#010;&gt; &gt; =====================&#010;&gt; &gt; --&gt;&#010;&gt; &gt; &lt;echo message="*** what's considered basedir before setting it:&#010;&gt; &gt; ${basedir}"&#010;&gt; &gt; /&gt;&#010;&gt; &gt; &lt;property name="basedir" value="."/&gt;&#010;&gt; &gt; &lt;echo message="*** what's considered basedir after setting it:&#010;&gt; &gt; ${basedir}"&#010;&gt; &gt; /&gt;&#010;&gt; &gt;&#010;&gt; &gt; &lt;/project&gt;&#010;&gt; &gt;&#010;&gt; &gt; The result is always:&#010;&gt; &gt;&#010;&gt; &gt;      [echo] *** what's considered basedir before setting it:&#010;&gt; &gt; M:\path\to\A&#010;&gt; &gt;      [echo] *** what's considered basedir after setting it:&#010;&gt; &gt; M:\path\to\A&#010;&gt; &gt;&#010;&gt; &gt;&#010;&gt; &gt; even though I execute the ant-skript in M:\path\to\B&#010;&gt; &gt;&#010;&gt; &gt;&#010;&gt; &gt; I thought basedir is always the path where the build.xml itself&#010;&gt; &gt; resides?&#010;&gt;&#010;&gt;&#010;&gt; ---------------------------------------------------------------------&#010;&gt; To unsubscribe, e-mail: user-unsubscribe@ant.apache.org&#010;&gt; For additional commands, e-mail: user-help@ant.apache.org&#010;&gt;&#010;&gt;&#010;&#010;&#010;-- &#010;Dipl.-Ing. (FH) *Michael Niemand**&#010;*&#010;Albusstr. 17&#010;60313 Frankfurt/M&#010;Germany&#010;&#010;Tel.: +49 (0) 69 200 130 60&#010;Mobile: +49 (0) 171 645 29 07&#010;&#010;eMail: michael.niemand@gmail.com&#010;sip:1406283@sipgate.de&#010;&#010;
</pre>
</div>
</content>
</entry>
<entry>
<title>AW: basedir setting not working?</title>
<author><name>Jan Matèrne (jhm) &lt;apache@materne.de&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/ant-user/201304.mbox/%3c003701ce3bfc$3117e510$9347af30$@de%3e"/>
<id>urn:uuid:%3c003701ce3bfc$3117e510$9347af30$@de%3e</id>
<updated>2013-04-18T06:15:57Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
The "." in the basedir attribute is relative to the buildfile itself, not&#010;the current directory.&#010;You could access that via ${user.dir} :&#010;&#010;&lt;project basedir="."&gt;&#010;    &lt;echo&gt;BaseDir: ${basedir}&lt;/echo&gt;&#010;    &lt;echo&gt;UserDir: ${user.dir}&lt;/echo&gt;&#010;&lt;/project&gt;&#010;&#010;You can't set that value as basedir because at the time when basedir is set,&#010;the system properties aren't populates as Ant properties.&#010;(Also I would not do that because can't be sure from where a user is calling&#010;the buildfile with strange site effects ... think of a "ant clean" in your&#010;home dir?)&#010;&#010;&#010;Jan&#010;&#010;&gt; -----Ursprüngliche Nachricht-----&#010;&gt; Von: Michael Niemand [mailto:michael.niemand@gmail.com]&#010;&gt; Gesendet: Mittwoch, 17. April 2013 16:12&#010;&gt; An: user@ant.apache.org&#010;&gt; Betreff: basedir setting not working?&#010;&gt; &#010;&gt; Hi folks,&#010;&gt; &#010;&gt; my basedir setting doesnt seem to work.&#010;&gt; &#010;&gt; I have the same project I check out to two different locations.&#010;&gt; &#010;&gt; in the second project the basedir setting doesnt seem to work.&#010;&gt; &#010;&gt; Here's what I do:&#010;&gt; &#010;&gt; &lt;!-- &lt;project name="ClientKapselTest" default="targets" basedir="./"&gt;&#010;&gt; also tried that --&gt; &lt;project name="ClientKapselTest" default="targets"&#010;&gt; &gt;&#010;&gt; &#010;&gt; &lt;!-- ==================== Initialization properties&#010;&gt; =====================&#010;&gt; --&gt;&#010;&gt; &lt;echo message="*** what's considered basedir before setting it:&#010;&gt; ${basedir}"&#010;&gt; /&gt;&#010;&gt; &lt;property name="basedir" value="."/&gt;&#010;&gt; &lt;echo message="*** what's considered basedir after setting it:&#010;&gt; ${basedir}"&#010;&gt; /&gt;&#010;&gt; &#010;&gt; &lt;/project&gt;&#010;&gt; &#010;&gt; The result is always:&#010;&gt; &#010;&gt;      [echo] *** what's considered basedir before setting it:&#010;&gt; M:\path\to\A&#010;&gt;      [echo] *** what's considered basedir after setting it:&#010;&gt; M:\path\to\A&#010;&gt; &#010;&gt; &#010;&gt; even though I execute the ant-skript in M:\path\to\B&#010;&gt; &#010;&gt; &#010;&gt; I thought basedir is always the path where the build.xml itself&#010;&gt; resides?&#010;&#010;&#010;---------------------------------------------------------------------&#010;To unsubscribe, e-mail: user-unsubscribe@ant.apache.org&#010;For additional commands, e-mail: user-help@ant.apache.org&#010;&#010;&#010;
</pre>
</div>
</content>
</entry>
</feed>
