Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Projects and Jar Creation

 
Dave Edds
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have a system which consists of various projects in WSAD. The projects are all "Java Projects" and they make up a single application. Just to clarify there is no J2EE involved in this.

I want to create a JAR file, to distribute to my users, which is the project. The JAR must contain MOST of the classes from my projects, but not all classes and files. I can create a JAR file with the export option, but then I have to manually specify which files I want to include. Since there are numerous projects, which are quite large, this becomes a timely process.

Is there any alternative to doing this manual select? I want to start doing daily builds and this slow manual process is not at all productive. Surely there must be some way to state that my application consists of files X, Y and Z, but not file FOO. Do I need to create some other thing (a project?) which states which files should be included in the jar? Am I approaching this all wrong?

If anyone can shed any light on this issue, it would really be appreciated.

Thanks,
Dave
 
Dave Edds
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hmmm...

Okay I think I've found a solution myself. I can create a JAR description when I create the Jar and store this description in a WSAD project. Then when I want to create the Jar file again, I click on the description and select "Create Jar"

This seems to work, but I guess my question now becomes, where should I store my Jar Description file? It has to be in WSAD (so I can click on it), but should it be a seperate project just for the build process? For example, suppose I have the following projects:

com.dave.util
com.dave.gui
com.dave.core
com.dave.publisher
etc...

None of my WSAD projects are a good fit for storing the description. Should I just create a new Project (what type of Project???) which only contains the jar description???

Again, any help is greatly appreciated.
Thanks,
Dave
 
Ibnul Haque
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you consider using ANT. This is free and comes bundled with WSAD as well. See some tutorials and you would be amazed to see the accuracy and output. Most of the project out here is build with ANT.
Thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic