Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>With the helpful advice from people who have answered here I started digging into One-Jar. After some dead-ends (and some results that were exactly like my previous results I managed to get it working. For other peoples reference I'm listing the build.xml that worked for me.</p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8" standalone="no"?&gt; &lt;project basedir="." default="build" name="&lt;INSERT_PROJECT_NAME_HERE&gt;"&gt; &lt;property environment="env"/&gt; &lt;property name="debuglevel" value="source,lines,vars"/&gt; &lt;property name="target" value="1.6"/&gt; &lt;property name="source" value="1.6"/&gt; &lt;property name="one-jar.dist.dir" value="../onejar"/&gt; &lt;import file="${one-jar.dist.dir}/one-jar-ant-task.xml" optional="true" /&gt; &lt;property name="src.dir" value="src"/&gt; &lt;property name="bin.dir" value="bin"/&gt; &lt;property name="build.dir" value="build"/&gt; &lt;property name="classes.dir" value="${build.dir}/classes"/&gt; &lt;property name="jar.target.dir" value="${build.dir}/jars"/&gt; &lt;property name="external.lib.dir" value="../jars"/&gt; &lt;property name="final.jar" value="${bin.dir}/&lt;INSERT_NAME_OF_FINAL_JAR_HERE&gt;"/&gt; &lt;property name="main.class" value="&lt;INSERT_MAIN_CLASS_HERE&gt;"/&gt; &lt;path id="project.classpath"&gt; &lt;fileset dir="${external.lib.dir}"&gt; &lt;include name="*.jar"/&gt; &lt;/fileset&gt; &lt;/path&gt; &lt;target name="init"&gt; &lt;mkdir dir="${bin.dir}"/&gt; &lt;mkdir dir="${build.dir}"/&gt; &lt;mkdir dir="${classes.dir}"/&gt; &lt;mkdir dir="${jar.target.dir}"/&gt; &lt;copy includeemptydirs="false" todir="${classes.dir}"&gt; &lt;fileset dir="${src.dir}"&gt; &lt;exclude name="**/*.launch"/&gt; &lt;exclude name="**/*.java"/&gt; &lt;/fileset&gt; &lt;/copy&gt; &lt;/target&gt; &lt;target name="clean"&gt; &lt;delete dir="${build.dir}"/&gt; &lt;delete dir="${bin.dir}"/&gt; &lt;/target&gt; &lt;target name="cleanall" depends="clean"/&gt; &lt;target name="build" depends="init"&gt; &lt;echo message="${ant.project.name}: ${ant.file}"/&gt; &lt;javac debug="true" debuglevel="${debuglevel}" destdir="${classes.dir}" source="${source}" target="${target}"&gt; &lt;src path="${src.dir}"/&gt; &lt;classpath refid="project.classpath"/&gt; &lt;/javac&gt; &lt;/target&gt; &lt;target name="build-jar" depends="build"&gt; &lt;delete file="${final.jar}" /&gt; &lt;one-jar destfile="${final.jar}" onejarmainclass="${main.class}"&gt; &lt;main&gt; &lt;fileset dir="${classes.dir}"/&gt; &lt;/main&gt; &lt;lib&gt; &lt;fileset dir="${external.lib.dir}" /&gt; &lt;/lib&gt; &lt;/one-jar&gt; &lt;/target&gt; &lt;/project&gt; </code></pre> <p>I hope someone else can benefit from this.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload