File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Ant, Maven and Other Build Tools and the fly likes Multiple class paths jvms in the same ant file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Multiple class paths jvms in the same ant file" Watch "Multiple class paths jvms in the same ant file" New topic
Author

Multiple class paths jvms in the same ant file

James Carroll
Greenhorn

Joined: Apr 01, 2009
Posts: 7
I have a set of classes that I have to build against some third party libraries (Siteminder if you must know). There are 3 versions that I must compile against (6, 12, and 12.5) and each has 32 and 64 bit versions. Is it possible to compile all 6 versions in 1 ant file? Would it be better (if you can) to maybe have 1 ant file for each and then a master ant that could call them all? Any suggestions around managing this would be greatly appreciated.

PS: I use Eclipse if that matters.

Thanks,
James

Love the people that hate you
It really ticks them off
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5845
    
    7

This is all Java, right? If so, the bitness doesn't matter - you can compile Java code using a 64-bit JDK and run the resulting code on either 32 or 64-bit systems, and vice-versa. So now you are down to 3 compiles instead of 6.

Do you compile the same code or different code against the different versions of the Siteminder libraries? If it is always the same code, you need to compile against only one version. That one version of compiled code will run with all three versions of the Siteminder libraries.

Now you are down to one compile. The only issue you have at this point is packaging - you you package your code with the Stieminder JARs? If so, you need three packages. If not, you need only one package.


JBoss In Action
James Carroll
Greenhorn

Joined: Apr 01, 2009
Posts: 7
Thanks. I was able to get to where I wanted using a few properties and then switching them out. I know technically there shouldn't be a reason to build against the bitness and the different Siteminder versions, but its really to satisfy the folks that I send them to; they want it so I have to build it that way. As for shipping the SM libs I'm not allowed to do that.

But hey, since I have your "ear" and you seem to be familiar with the SM libs...... I have an custom auth scheme that takes in a path that I write debug messages to. When I set it in SM the first variable passed in is the name of the class that implements the AuthScheme and the second is the path to the file that it should write to. There's some kind of wierd escaping that's going on such that on Windows it has be put in as "C:\/temp\/myfile.txt" but when running on Linux no matter what I try I can't get it to write to the file. No biggie though.

Thanks agian
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5845
    
    7

Sorry, I have never use Siteminder and and didn't even know it existed until I saw your post.
James Carroll
Greenhorn

Joined: Apr 01, 2009
Posts: 7
Peter Johnson wrote:Sorry, I have never use Siteminder and and didn't even know it existed until I saw your post.


Rats. Thanks anyways.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Multiple class paths jvms in the same ant file