• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

ECLIPSE, ANT and generating WAR files...

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all.

I'm trying to configure my Eclipse Ant Builder, so that I can have the WAR of my web-app generated in a single task.

The "build.xml" that Eclipse generates as a result of the "Export" task does good (obviously!), but I'd like to add a "generate-war" task, which (depending on the "build" task) should also create the WAR, adding all the needed resources into it.

The problem I'm facing is about the external libraries that I want to be included in the "WEB-INF/lib" directory of the WAR.

Infact, I'd like them to be "loaded" directly from the classpath, that is directly from the "path" element created by eclipse during the Export task.

So, in "build.xml" I have:



where, for example:



And in "build-user.xml" I want to make a target capable of copying all the jars referenced by "MyWebApp.classpath", discovering them automatically.

The problem is that the "copy" tasks need a fileset or a dir, whereas what I have is a path reference...

Has anyone been involved in the same?
Thanks in advance for your help!!
 
author and iconoclast
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Welcome to JavaRanch!

A bit of business: you may not have read our naming policy on the way in. It requires that you use a full, real (sounding) first and last name for your display name. A single name isn't enough. You can change your display name here. Thanks!
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic