Q:

renaming classes.jar to .jar while building a library project in android ant

I have an android application project A which depends on an Android Library project B. when i import both the projects in Eclipse,I've notice the Eclipse Builder (probably due to the ADT plugin), that the library project gets compiled and built as b.jar and stored inside the bin\ folder of project B. It is referenced as b.jar in the classpath of A.
But, while building it with ant,the command ant debug,the library project B is compiled as classes.jar. 
Is there a way to rename this file as .jar? I tried renaming it in the SDK build.xml,but then project A does not seem to resolve the classes defined in B. Also,the test project for B fails, since the Android dex compiler tries to search for the file classes.jar inside the bin\ folder of the library project.
Thanks,

A:

Create a custom_rules.xml file in your project director.
<?xml version="1.0" encoding="UTF-8"?>
<project name="custom_rules">
    <target name="-post-compile">
    <echo level="info">Renaming jar filename</echo>
    <move file="${out.library.jar.file}"tofile="${out.absolute.dir}/${ant.project.name}.jar"/>
    </target>
</project>

