ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ant-...@apache.org
Subject [Ant Wiki] Updated: AntNewbies
Date Mon, 12 Jul 2004 12:50:40 GMT
   Date: 2004-07-12T05:50:39
   Editor: 212.34.160.66 <>
   Wiki: Ant Wiki
   Page: AntNewbies
   URL: http://wiki.apache.org/ant/AntNewbies

   no comment

Change Log:

------------------------------------------------------------------------------
@@ -36,6 +36,7 @@
        	</exec>
   </target>
 }}}
+----
  ```Question#2``` How do i use a different JAVA Compiler than javac.
 
 I tried to use the JDT to compile my Source but i don't know the right Syntax to start it
correct in ANT.
@@ -66,7 +67,7 @@
 be used to set a default value for this attribute for all javac tasks.
 
 This is exactly what Answer #1 uses, you just don't need to write the compiler adapter since
somebody else has already done so for you.
-
+----
 ```Question#2,5``` It doesnt work... I don't find the Bug in my Script... :(
 
 No i tried as told with the Help from the Eclipse Page. I copied the directory $ECLIPSE_JDT_HOME/plugins/org.eclipse.jdt.core_2.1.3
to
@@ -112,4 +113,54 @@
         at org.apache.tools.ant.taskdefs.compilers.CompilerAdapterFactory.resolveClassName(CompilerAdapterFactory.java:163)
         ... 13 more
 
+}}}
+
+'''Answer #2,5'''
+
+I answer myself :-) I've found it. The JDT 2.1.3 could not be used as Standalone because
of a Bug in it. Only Release 3.0 or higher could 
+be used. See also ([https://bugs.eclipse.org/bugs/show_bug.cgi?id=37779])
+----
+```Question#3``` Simple Beginner Question about If-Usage.
+
+I have a new Problem. I sitt here and try to realise a Backuppart in my Tomcat-Application-Ant-Script
(What a Word). I have the Book from Bernd Matzke from Addison-Wesly here and tried the Following
Script:
+
+{{{
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="iftest" default="main" basedir=".">
+	<property name="dir.tomcat.webapps" value="/usr/share/tomcat4/webapps"/>
+	<property name="tomcat.projectname" value="myApplication"/>
+	<target name="main" depends="doif">
+		<echo message="The first Statement would be the last Statement... ;-)"/>
+	</target>
+	<target name="doif" depends="checkFileExists, if_target"/>
+	<target name="checkFileExists">
+		<condition property="p">
+			<available file="web.xml" filepath="${dir.tomcat.webapps}/${tomcat.projectname}/WEB-INF"/>
+		</condition>
+		<echo message="The Property &apos;p&apos; is ${p}"/>
+	</target>
+	<target name="if_target" if="${p}">
+		<echo message="Hello i'm here in the if_target"/>
+	</target>
+</project>
+}}}
+
+If i run it the Answer is:
+
+{{{
+[root@vmaelv04t ant-enteich]# ant -f build_test.xml
+Buildfile: build_test.xml
+
+checkFileExists:
+     [echo] The Property 'p' is true
+
+if_target:
+
+doif:
+
+main:
+     [echo] The first Statement would be the last Statement... ;-)
+
+BUILD SUCCESSFUL
+Total time: 1 second
 }}}

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message