• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

Class files generated in web-inf directory as well as in base directory

 
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I dont know where I am going wrong.
I have created one ant build script to generate war file.The war file successfully created.But the classes file get created in web-inf directory as well as in base directory.
Kindly correct me where I am going wrong.
 
drifter
Posts: 1364
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Looks like this fileset would put the classes in base dir in war : <fileset dir="${classes.dir}"></fileset>

 
sri ramvaithiyanathan
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
what change I have to do over there?
Sorry for asking this because if I comment the line <fileset dir="${classes.dir}"></fileset>
classes is not bundled in the web-inf directory as well as base dir also.
 
Carol Enderlin
drifter
Posts: 1364
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can use a classes element instead of that fileset, or you could use basedir attribute. For "classes" usage, see the example at the bottom of war task documenation.
 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Lines 52 and 53 cause the class files to be copied to WEB-INF/classes in the WAR because earlier, lines 40 to 43 the java source files were compiled into the ${web.dir}/WEB-INF/classes directory.

Line 54 causes the class files to be copied to the base directory of the WAR. Remove that line.
 
sri ramvaithiyanathan
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Peter and Carol thanks for your hard effort.
Its working fine.
Really you guys rocking .

Regards,
Sriram.V
 
Try 100 things. 2 will work out, but you will never know in advance which 2. This tiny ad might be one:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic