I have downloaded the source code of Apache Lucene using Subversion.
Now I want to create a JAR file for a particular Java file in the contrib portion of the code.
The problem is that when I do javac x.java to get a class file and package it into a JAR file using jar cf jarfile.jar x.class the package hierarchy is not preserved in the JAR file.
What is the correct way of packaging class files into the JAR file maintaining the package hierarchy?
Particularly with Subversion checked out code is there a better way of packaging selected Java files.
Lucene have ant‘s
build.xml, you can make jar by usingant packageat lucene source directory. For contribs there are alsocontrib/contrib-build.xml