← Back to issue list

ant plugin only looks for jar files in directory named "target"

View original Launchpad issue

Metadata

Project
snapcraft
Number
#1597075
Type
issue
State
open
Author
~jenny-murphy
Labels
bitesize plugin
Created
2016-06-28 20:26:47.874804+00:00
Updated
2017-03-04 19:28:38.477861+00:00
Closed

Current evaluation

No evaluation has been recorded for this issue yet.

Issue body

I have the following build.xml for use with the ant plugin in snapcraft : <project name="HelloWorld" basedir="." default="main"> <property name="src.dir" value="src"/> <property name="build.dir" value="build"/> <property name="classes.dir" value="${build.dir}/classes"/> <property name="jar.dir" value="lib"/> <property name="main-class" value="oata.HelloWorld"/> <target name="clean"> <delete dir="${build.dir}"/> </target> <target name="compile"> <mkdir dir="${classes.dir}"/> <javac srcdir="${src.dir}" destdir="${classes.dir}"/> </target> <target name="jar" depends="compile"> <mkdir dir="${jar.dir}"/> <jar destfile="${jar.dir}/${ant.project.name}.jar" basedir="${classes.dir}"> <manifest> <attribute name="Main-Class" value="${main-class}"/> </manifest> </jar> </target> <target name="run" depends="jar"> <java jar="${jar.dir}/${ant.project.name}.jar" fork="true"/> </target> <target name="clean-build" depends="clean,jar"/> <target name="main" depends="clean,run"/> </project> After building the part which uses the ant plugin I get the error : "Failed doing build for hello: could not find any built jar files for part". If I change the line : <property name="jar.dir" value="lib"/> to <property name="jar.dir" value="target"/> the error goes away. It would be useful to have a way to configure the location the ant plugin looks in for jar files.

Evaluation history

No evaluation history available.