ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

rosjava external sources

asked 2012-02-01 18:57:30 -0500

chcorbato gravatar image

Hi,

I'm developing a rosjava package in eclipse, and I need to use some java classes that I am developing in another non-ros java eclipse project. Does anybody knows how I could configure these dependencies properly in my rosjava project? I've tried with the rosjava-src tag in the manifest and giving an absolute path for the location of my external java sources dependencies, but that path doesn't seem to be correctly resolved. I do prefer not to add these classes to a jar file because they're still under development.

Thank you for any idea

edit retag flag offensive close merge delete

3 Answers

Sort by » oldest newest most voted
0

answered 2012-02-21 02:38:34 -0500

chcorbato gravatar image

Thank you Juan Antonio and Damon for your ideas. I've finally committed to maintain these dependencies for other Java sources in the .project eclipse file, it is easier since I develop only from within eclipse, and the debugging works really nicely.

edit flag offensive delete link more
0

answered 2012-02-02 02:28:44 -0500

damonkohler gravatar image

One possibility would be to expose them as a Maven dependency. Then you could depend on them from your manifest.xml.

edit flag offensive delete link more
0

answered 2012-02-12 12:13:18 -0500

Hi,

I use other java projects in my development, but In my case the unique way that I know is using the file manifest.xml

One example:

<package>
  <description brief="lcp_proxy">

     lcp_proxy

  </description>
  <author>Juan Antonio Breña Moral & Lawrie Griffiths</author>
  <license>BSD</license>
  <review status="unreviewed" notes=""/>
  <url>http://ros.org/wiki/nxt_lejos_ros</url>
  <depend package="rosjava"/>
  <depend package="rosjava" />
  <depend package="std_msgs" />
  <depend package="sensor_msgs" />
  <depend package="geometry_msgs" />
  <depend package="nav_msgs" />
  <depend package="nxt_msgs" />
  <depend package="nxt_lejos_ros_msgs" />
  <depend package="turtlesim" />
  <depend package="tf" />

  <export>
        <rosjava-src location="src" /> 
        <rosjava-pathelement location="target/" groupId="org.lejos.ros" artifactId="org.lejos.ros.nodes.LCPProxy" version="0.0.1" built="true" />
        <rosjava-pathelement location="build/" built="true" />
            <rosjava-pathelement location="/usr/local/lejos/lib/pc/pccomm.jar" />
            <rosjava-pathelement location="/usr/local/lejos/lib/pc/3rdparty/bluecove-gpl.jar" />
            <rosjava-pathelement location="/usr/local/lejos/lib/pc/3rdparty/bluecove.jar" />
            <rosjava-pathelement location="/home/jabrena/ros3/workspace/nxt_lejos_ros/NXTLoader/lib/yamlbeans-1.06.jar" />
  </export>
</package>

An example to create a jar file using Ant:

<project name="project2" basedir="." default="jar">

    <property name="build" value="bin"/>    <property name="misc" value="misc"/>        <target name="jar">         <jar destfile="./ardroneDemo.jar">
            <fileset dir="${build}"/>
            <fileset dir="${misc}"/>            <manifest>
                <attribute name="Main-Class"
                    value="com.javadrone.test.KeyEventDemo"/>
                <attribute name="Class-Path" 
                    value="lib/JavaDrone-1.1.jar lib/log4j-1.2.16.jar"/>            </manifest>         </jar>  </target>    </project>
edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2012-02-01 18:57:30 -0500

Seen: 574 times

Last updated: Feb 21 '12