ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
To get this working, you have to use a better skelaton build.xml file than provided on the ROSJAVA wiki. The one I used is below. It basically adds the jar information to the build settings.
You must build the jar file from the ANT window in eclipse in order to create a new jar file each time you want to recompile. I haven't found a way to automate that part yet.
<?xml version="1.0" encoding="UTF-8"?>
<project name="my_second_package" default="default">
<property file="ros.properties" />
<property name="build" location="build" />
<property name="dist" location="dist" />
<property name="build" location="build" />
<property name="src" location="src" />
<property name="jar" location="${ros.artifact.built}" />
<path id="classpath">
<pathelement path="${ros.compile.classpath}" />
</path>
<echo message="${toString:classpath}" />
<target name="default" depends="init, compile, jar" />
<target name="init">
<fail unless="ros.compile.classpath" message="ros.properties is missing. Please type 'rosmake' first "/>
<mkdir dir="${build}" />
<mkdir dir="${dist}" />
</target>
<target name="compile" depends="init">
<javac destdir="${build}">
<classpath refid="classpath" />
<src path="${src}" />
</javac>
</target>
<target name="jar" depends="compile">
<jar destfile="${jar}">
<fileset dir="${build}" />
</jar>
</target>
<target name="clean">
<delete dir="${build}" />
<delete dir="${dist}" />
</target>
<!-- required entry point -->
<target name="test" />
</project>