Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Ant Wiki" for change 
notification.

The following page has been changed by tabuchid:
http://wiki.apache.org/ant/AntNewbies

The comment on the change is:
Just a formating change.

------------------------------------------------------------------------------
  
  Remember that the [http://marc.theaimsgroup.com/?l=ant-user user mailing 
list] is still the primary place for fellow Ant users to solve problems.
  
-  ```Question#1``` How do you escape a '''"''' in an argument to an Exec 
command. This is what I have.
+  '''Question#1''' How do you escape a '''"''' in an argument to an Exec 
command. This is what I have.
  
  {{{
   <target name="RSM" depends="init">
@@ -41, +41 @@

    </target>
  }}}
  ----
-  ```Question#2``` How do i use a different JAVA Compiler than javac.
+  '''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.
  The Commandline is:
@@ -75, +75 @@

  
  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... :(
+ '''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
  $BUILD_PATH/compiler. I also tried to copy the jdtCompilerAdapter.jar to 
local Directory, to $ANT_HOME/lib, and so on and it doesn't work.
@@ -127, +127 @@

  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.
+ '''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:
  
@@ -184, +184 @@

  
  With your definition you referenced the value of p, not p itself. The 
if-statement just looks, if the given property exists anyway, not if the value 
is true.
  ----
-  ```Question#4``` How do i pass src and destfile to bzip2 from the command 
line?
+  '''Question#4''' How do i pass src and destfile to bzip2 from the command 
line?
  This is what i tried:
  
  {{{
@@ -226, +226 @@

  The error message and the manual should have pointed you in the right 
direction here.
  
  ----
-  ```Question#5``` How do I handle EAR or War files?
+  '''Question#5''' How do I handle EAR or War files?
  
  Just got an App Server (mandated company standard) which needs EAR or War 
files . I have a Servlet app running on another servlet engine and want to 
bundle it up as an EAR. How can that easily be done in Ant. I currently 
delivery the servlet application in two jars, one is third party so I dont have 
source for it, the other is all my code. There are config files involved as 
well.
  
  '''Answer #5''' - You should use the <war> and/or <ear> tasks. Probably the 
best thing is to create a war and use the <lib> element to include yor third 
party jar.
  
  ----
-  ```Question#6``` How to Sort FileSets?
+  '''Question#6''' How to Sort FileSets?
  I'm JUST starting out with Ant, so please forgive me.
  
  I know the documentation says you can't count on the FileSets task sorting 
your files.  But this is exactly why I'm looking to something like Ant to 
handle my code compiles; I need them sorted.
@@ -257, +257 @@

  
--------------------------------------------------------------------------------
  
  ----
-  ```Question#7``` How to have new .java files override existing .class files?
+  '''Question#7''' How to have new .java files override existing .class files?
  
  This seems like it should just work, but it doesn't quite. When I have a tree 
of packages which are already compiled, then I have my updated versions of 
.java files which will override the existing .class files, there are cases 
where some of the sources will depend on other sources.
  
@@ -278, +278 @@

  ----
  
  
- ```Question#8``` How can I perform an if-then-else construct for building 
multiple JARs/WARs within a single build.xml
+ '''Question#8''' How can I perform an if-then-else construct for building 
multiple JARs/WARs within a single build.xml
  
  I am attempting to merge two disparate code bases, but keep them logically 
separate at run-time. The used to live in two different app servers. I have 
refactored them, but am running into problems getting them to assign to each 
jar. I presume that I want to have a condition such as...
  {{{
@@ -300, +300 @@

  
  ----
  
- ```Question#9``` Why am I getting: The <exec> type doesn't support the nested 
"echo" element.
+ '''Question#9''' Why am I getting: The <exec> type doesn't support the nested 
"echo" element.
  
  An offshore developer is getting this strange message:
  {{{
@@ -359, +359 @@

  
  ----
  
- ```Question#10``` 
+ '''Question#10''' 
  I have downloaded ant, and now I am trying to install it using the directions 
on the apache page. I am typing 'build install' in the command prompt (I am on 
windows XP) but I get this error :::  'build' is not recognized as an internal 
or external command,
  operable program or batch file.
  
@@ -368, +368 @@

  
  ----
  
- ```Question#11```
+ '''Question#11'''
  Can I use the JUnitReport Task with Unit Tests that are not part of the JUnit 
framework? 
  
  '''Answer #12''' The reporting task applies XSL transforms to XML files of 
test results. Anything that generates
@@ -378, +378 @@

  
  ----
  
- ```Question#12```
+ '''Question#12'''
  Sorry I am having all sorts of problems...I have installed ant, and when I 
try to run it I get this error
  
  Exception in thread "main" java.lang.NoClassDefFoundError: 
org/apache/tools/ant/launch/Launcher
@@ -387, +387 @@

  
  ----
  
- ```Question#13```
+ '''Question#13'''
  I am having problems using the junit task. Ant is not recognizing the junit 
as a task. I have read the FAQ corresponding to this problem, but it does not 
make sense. I am using ant version 1.6.2 I have removed the classpath 
environment variable completely. I also copied the junit.jar file to my lib 
directory. I verified that the ant-junit.jar file is in the lib directory as 
well. In my build.xml file I declare the following path
  
  <path id="library.junit.classpath">
@@ -401, +401 @@

  
  does anyone know what is going on? The FAQ confused me because I thought it 
was hinting at removing my ant-junit.jar file from the lib directory, and 
including in in a taskdef...was I misunderstanding the solution?
  
- ```Answer#13```
+ '''Answer#13'''
  
  It's not enough to have junit.jar on the classpath for the tests, it has to 
be loaded in the same classloader as Ant's junit task. Either add junit.jar to 
ANT_HOME/lib ${user.home}/.ant/.lib. The alternate solution (a new declaration 
of the Ant junit tasks after removing ant-junit.jar from ANT_HOME/lib) is not 
recommended for beginners. 
  
@@ -409, +409 @@

  
  ----
  
- ```Question#14```
+ '''Question#14'''
  Is it possible to change the working directory of a JUNIT task under ANT? My 
task looks like this:
  
      <junit printsummary="no" showoutput="no" haltonerror="yes" 
haltonfailure="no"
@@ -426, +426 @@

  
  ----
  
- ```Question#15```
+ '''Question#15'''
  How do I perform a task only if Ant is going to perform a task?
  
  I want to create a file only if and only if at least one of my java source 
files needs to be compiled. I do not want the file created otherwise. Here is 
what I have:
@@ -451, +451 @@

  
  This will create the file every time which is not desirable.
  
- ```Answer#15```
+ '''Answer#15'''
  
  Use the uptodate task and a "timestamp file" (this could even be the 
ServiceVersion.java file itself) to determine whether any of the generated 
.class files (excluding ServiceVersion.class) are newer than this "timestamp 
file" and if so set a property that can be used as a condition on executing a 
target to re-create the ServiceVersion.java file (updating the "timestamp file" 
too if a separate file is used).
  
  ----
  
- ```Question#16```
+ '''Question#16'''
  I'm having trouble getting a merged inline and external manifest using the 
'jar' task in ant 1.6.5. Here's a code snippet:
  
  {{{

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to