rosjava maven dependencies
I'm following the steps listed here http://rosjava.github.io/rosjava_core/hydro/installing.html
What I really want to do, is add some maven dependencies to my existing maven (eclipse) project and start writing and testing rosjava.
Issues I found:
- The eclipse target doesn't exist in the gradle build.
- The build creates some maven artifacts, but is quite there are quite a few missing.
- Gradle was not able to find dependencies that were not already in my maven repo.
I checked out rosjava_core from git, gradle was not able to find dependencies that were not already in my maven repo. I've manually added them to my maven repo.
Once rosjava_core was built, I worked out that it added the below artifact to my maven repo, so I added this dependency to my maven project...
<dependency>
<groupId>org.ros.rosjava_core</groupId>
<artifactId>rosjava</artifactId>
<version>0.1.6</version>
</dependency>
My maven project build then failed with:
No versions are present in the repository for the artifact with a range [1.9,1.10)
org.ros.rosjava_messages:rosgraph_msgs:jar:null
So I proceeded to checkout rosjava_messages and build it, which produced lots of messages like this:
Couldn't find gateway_msgs on the ROS_PACKAGE_PATH
I have a full install for ros and my ROSPACKAGEPATH seems to be correct : /opt/ros/hydro/share:/opt/ros/hydro/stacks
and finally the build failed with this message:
FAILURE: Build failed with an exception.
* What went wrong:
Could not copy MANIFEST.MF to '/home/rsutton/git/rosjava_messages/rosjava_test_msgs/build/tmp/jar/MANIFEST.MF'.
At this point I returned to try to build my project which failed with this message:
No versions are present in the repository for the artifact with a range [0.1,0.2)
org.ros.rosjava_bootstrap:message_generation:jar:null
So I proceeded to checkout and build rosjava_bootstrap, which built without any issues. :)
returning to my project it now fails with this message:
No versions are present in the repository for the artifact with a range [0.4,0.5)
org.ros.rosjava_messages:tf2_msgs:jar:null
I expect this last error is because of the failures building rosjava_messages.
In summary
- There are a couple of issues with following the instructions.
- It would be really useful if there maven dependencies for ros java in an accessible maven repo somewhere.
Finally can someone point me in the right direction.
Thanks
Asked by rlsutton1 on 2013-12-31 13:53:06 UTC
Answers
Answering my own question for the benefit of others, and the possiblity that someone might point out any issues with what I have done.
I have given up trying to build ros_java and have found a maven repo which contains it...
After some digging around, I've added the following repo to my pom.xml
<repository>
<id>ros</id>
<name>ros</name>
<url>https://github.com/stonier/rosjava_mvn_repo/raw/master</url>
</repository>
along with this dependency (which I had before)
<dependency>
<groupId>org.ros.rosjava_core</groupId>
<artifactId>rosjava</artifactId>
<version>0.1.6</version>
</dependency>
I am now able to build my maven project and have sucessfully started a pair of nodes which talk to each other.
Asked by rlsutton1 on 2014-01-01 12:36:57 UTC
Comments
The maven repo seems to be outdated as of now.
Asked by peci1 on 2014-11-13 08:51:34 UTC
Hi, I'm trying the same with maven but get some compilation errors which I honestly don't understand why they appear. Could you provide a small demo project where you compiled a ros-Project with maven.
Thanks in advance
d.
Asked by doc d. on 2014-07-30 15:19:07 UTC
Comments