How extract the .rar files through ANT script - ant

How to Extract the .rar files through ANT script and multiple files?

I don't think there's anything native in ant or Java to handle RAR files. Maybe you can <exec> the unrar command from here?

Related

Bazel: hermetic use of jar command?

We have a custom Skylark rule that invokes jar after using the Thrift compiler to generate .java files, modeled after genproto.bzl.
What is the recommended way to invoke an external jar command in a hermetic way? Should we use new_http_archive to pull in the JDK archive (and how would this work with the DMG Oracle provides for OSX) with something like jdk.BUILD?
You have #local_jdk//:jar that expose the jar binary coming from the jdk used by Bazel.

Apache Ant Build, jar with external librarys

i have a Apache Ant build.xml to create a simple executeable jar file, but this file is very big.
Now i have the idea to build a executeable jar file with my code and have a directory named "lib" with all external jar files.
I think this will reduce the size of my application to 3%.
Thanks for your help.

How to build exploded jars using Ant task?

Kindly suggest how to build exploded jars using Ant task?
Thanks.
An exploded jar is simply a directory which has the same structure as a jar file. Just use copy, for example, to put all the files you want in this directory.

How to get all dependency jars from build.xml

I have several very big ant build.xml files.
Someone know tool or program for get all dependency jar files from build.xml ?
Please check How To Check Dependencies Between Jar Files?.
http://www.jboss.org/tattletale or jdepend could help in getting dependencies between jars.
If you want to extract dependencies from a given build.xml , one option is to write XML parser and process ant file. Not an easy task. Another option will be write a listener for each build task. If the task is javac then query its classpath.

give input to a runnable jar file through a file

I have created a jar file using ant. I want the jar file to take input from a external file.
How can we achieve this?
The java task has an input attribute that specifies the file that should be used as stdin.

Resources