rosjava building package error (OSX, Hydro)
I installed rosjava following these instructions. I had an error building zeroconfjmdnssuite/build.gradle while installation, but I believe it should not effect the described building package problem. I am following the tutorial .
At this point when I'm executing catkin_create_rosjava_pkg rosjava_catkin_package_a
I am getting the following error
Created repo file: /Users/artemlenskiy/ros/rosjava_ws/src/rosjava_catkin_package_a/settings.gradle
Created repo file: /Users/artemlenskiy/ros/rosjava_ws/src/rosjava_catkin_package_a/build.gradle
Created repo file: /Users/artemlenskiy/ros/rosjava_ws/src/rosjava_catkin_package_a/CMakeLists.txt
Created repo file: /Users/artemlenskiy/ros/rosjava_ws/src/rosjava_catkin_package_a/package.xml
Creating gradle wrapper: /Users/artemlenskiy/ros/rosjava/src/rosjava_build_tools/src/rosjava_build_tools/gradle/gradlew -p /Users/artemlenskiy/ros/rosjava_ws/src/rosjava_catkin_package_a wrapper
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'rosjava_catkin_package_a'.
> Could not resolve all dependencies for configuration ':classpath'.
> Could not find org.codehaus.groovy:groovy-all:2.2.0.
Required by:
:rosjava_catkin_package_a:unspecified > org.ros.rosjava_bootstrap:gradle_plugins:0.2.0
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 8.062 secs
[error] __init__() takes at least 3 arguments (2 given) : <type 'exceptions.TypeError'>
I wonder why is it looking for groovy if I have hydro installed. There is also https://github.com/rosjava/rosjava_mvn_repo/raw/master/org/codehaus/groovy/groovy-all/2.2.0/groovy-all-2.2.0.jar missing.
EDIT: I did add groovy-all-2.2.0.jar
to classpath, still cannot find it.
EDIT2: As Louise suggested adding groovy-all-2.2.0.jar to
./devel/share/maven/org/codehaus/groovy/groovy-all/2.2.0/
solves the above problem and creates the project.
Now running catkin_make
I get
Scanning dependencies of target gradle-rosjava_catkin_package_a
Loading /Users/artemlenskiy/ros/rosjava_ws/src/rosjava_catkin_package_a/package.xml
FAILURE: Could not determine which tasks to execute.
* What went wrong:
Task 'uploadArchives' not found in root project 'rosjava_catkin_package_a'.
* Try:
Run gradlew tasks to get a list of available tasks.
BUILD FAILED
Total time: 2.407 secs
make[2]: *** [rosjava_catkin_package_a/CMakeFiles/gradle-rosjava_catkin_package_a] Error 1
make[1]: *** [rosjava_catkin_package_a/CMakeFiles/gradle-rosjava_catkin_package_a.dir/all] Error 2
make: *** [all] Error 2
Invoking "make" failed
EDIT 3:
Entering the project folder and running ./gradlew setupBuild
and then ./gradlew
produces no errors.
Is this the right way to build projects with ROS JAVA ?
I don't have any experience with rosjava and gradle, any help is appreciated.
Asked by Artem on 2014-04-18 20:47:31 UTC
Comments
I haven't used rosjava, so I can't offer much help, but it seems the groovy the messages are talking about is not ROS groovy, but Groovy the JVM language: http://groovy.codehaus.org/
Asked by demmeln on 2014-04-19 12:02:33 UTC
Thanks, I suspected that this groovy is different, but never bothered to check. I am curious if someone successfully used rosjava on Mac.
Asked by Artem on 2014-04-20 02:35:58 UTC
I managed to get this working successfully this morning on OSX Mavericks. I had to manually download groovy-all-2.2.0.jar from http://mvnrepository.com/artifact/org.codehaus.groovy/groovy-all/2.2.0 and put it in /devel/share/maven/org/codehaus/groovy/groovy-all/2.2.0/groovy-all-2.2.0.jar.
Asked by Louise on 2014-04-25 02:37:56 UTC
I suspect there is a more elegant solution which involves editing ROS_MAVEN_REPOSITORY or the dependencies in ivy's build.gradle file but I'm not familiar enough with either maven or gradle to be sure.
Asked by Louise on 2014-04-25 02:38:18 UTC
This is curious since I am also using groovy v1.8.6 on ubuntu and the
find_gradle
code is actually just simple cmake code.Asked by Daniel Stonier on 2014-05-15 15:41:21 UTC
I noticed you were using
gradle
in the command above. You should actually be usinggradlew
that should have been created in the root directory of your repo. Perhaps this is really missing? In this case it's thecatkin_create_xxx
script that is not creating the gradlew correctly.Asked by Daniel Stonier on 2014-05-15 15:45:53 UTC
I've installed rosjava extremely smoothly on Ubuntu systems. I have got it successfully running on MacOS Mavericks, but it involved some pretty inelegant steps - catkin_make isn't happy (had to use catkin_make_isolated) and I think it is something to do with the defaults from catkin_init_workspace
Asked by Louise on 2014-05-15 23:50:36 UTC
Looks like this may not be creating gradle wrapper correctly on macosx. I've created a ticket to follow up on this at https://github.com/rosjava/rosjava_build_tools/issues/20
Asked by Daniel Stonier on 2014-05-18 14:27:06 UTC
I tried to do everything from sketch and there was this error http://answers.ros.org/question/166666/rosjava-installation-on-macosx-results-in-an-error/ Nevertheless catkin_make was successful. However I am still getting the error. @Louise did you have that error above?
Asked by Artem on 2014-05-19 02:50:24 UTC