• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

newbie Ant question

 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone,

I have a question regarding a build for an application distribution.

In my application, I depend on certain files being there (xml schemas, properties files, etc). I want to be able to pick these things up from the same place every time, regardless of how people choose to install the application and set up their dependencies.

The java package that uses these files is current turned into a jar for distribution. Should I add these essential files to the same jar? If I do this, can I refer to a relative directory within the jar?

Or should I be controlling the install and expanding my jars into full directory structures using ant when people deploy my app?

Many thanks



Marc
 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Based on the way the user deploys your application, you should be able to expect those files to be in a set location relative to your application's "root" location. That "root" location is probably dependent on what server you are running on, but might be something along the lines of webapps\ or webapps\myApplication or the likes.

So, you should be able to place those files where you want them (under the "root" location), and instruct the user - through the installation instructions - on where to deploy the application for it to work. Then, you are not controlling the entire path, just a relative path.

Hope that helps.
 
It's never done THAT before. Explain it to me tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic