When you have finished development on your custom QueryFunction class, you build it, then add the resulting .jar file to the .ear file.
To build and deploy a QueryFunction:
The Component SDK builds the QueryFunction, and places the resulting .jar file in the output directory you specified.