Just use the ant builder with custom build.xml file
command to use ant is.
go to the location of build.xml file through terminal after that hit the command.
$ant yourTargetName
Where your target name is declared in you build.xml file.
<?xml version="1.0"?>
<project name="Project Name" default="default" basedir=".">
<taskdef name="bundleapp"
classname="com.oracle.appbundler.AppBundlerTask"
classpath="lib/appbundler-1.0.jar" />
<target name="bundle-Target Name">
<bundleapp outputdirectory="."
name="Your Project Name"
displayname="yourProjectDisplayName"
identifier="yourMainClassName"
shortversion="1.0"
applicationCategory="public.app-category.developer-tools"
mainclassname="yourMainClassName">
<classpath file="/yourJarFileLocation"/>
<option value="-Dapple.laf.useScreenMenuBar=true"/>
</bundleapp>
</target>
</project>
To wrap in package this .app file.
Hit the command on terminal.
$productbuild --component filename.pkg /your app file location