wood burning stoves 2.0*
The moose likes Ant, Maven and Other Build Tools and the fly likes build.xml: jar tag Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "build.xml: jar tag" Watch "build.xml: jar tag" New topic
Author

build.xml: jar tag

Mariam A. Shamsi
Greenhorn

Joined: Dec 15, 2008
Posts: 16
Hello there,

I need to create a jar for some java package, and I need to have the following:

Include all the classes and resources


How to do this? And how to use jar options using jar tag in build.xml?

Please, I don't know why when I create jar file using eclipse it works fine,
but doing so using build.xml is not working.

Not working mean: when selfsigning the jar (created by build.xml)
the Certificate doesn't appear, but using eclipse it does.

Any help?

Mariam
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30356
    
150

Mariam,
Have you seen the Jar doc page with examples? Please post your build.xml snippet that "doesn't work" so you can get more concrete advice.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5823
    
    7

If you will be doing a lot of work (or even a little work) with Ant, I recommend that you get a copy of Ant in Action. I have a copy of the earlier edition of this book and it is worth it's weight in gold.


JBoss In Action
Mariam A. Shamsi
Greenhorn

Joined: Dec 15, 2008
Posts: 16
Jeanne Boyarsky wrote:Mariam,
Have you seen the Jar doc page with examples? Please post your build.xml snippet that "doesn't work" so you can get more concrete advice.


Hello there,
Thanks a lot for your response. I did follow what is written in ant documentation, but
still suffering:



I have some classes with warning, how to enforce jarring them? I need to jar
all resources with warning or errors. How?
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5823
    
    7

Looks like you are working within a WAR file structure. Based on that, I would say that the com.jar file should be built using something like this:



If that gets you the correct JAR file contents, do the other two JARs in a similar fashion.
Mariam A. Shamsi
Greenhorn

Joined: Dec 15, 2008
Posts: 16
Peter Johnson wrote:Looks like you are working within a WAR file structure. Based on that, I would say that the com.jar file should be built using something like this:



If that gets you the correct JAR file contents, do the other two JARs in a similar fashion.


I am really happy! It works now! Thanks very very much.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: build.xml: jar tag