Closed xiongdu closed 7 years ago
This is coming from the filename generated by the package object created with catkin_pkg.packages.find_package
, e.g.
when you call:
path = /mnt/mervin/workspaces/dude/src/py_trees_msgs
unused_package_path, package in find_packages(path).items()
print("%s" % package.filename)
you get
/mnt/mervin/workspaces/dude/src/py_trees_msgs/./package.xml
Ideally should have catkin_pkg
fix this, but adding the abspath here will make it more robust anyway.
@adamantivm I've bugfixed, version bumped (0.3.2) and tagged this. Could you re-release it for kinetic? Thanks!
sure think, thanks for the fix @stonier ! To make things a bit easier to track for me, may I ask next time:
Aye, apologies....definitely a PR.
I was actually going to push this release for you, but got to the blooming stage and discovered you must be using a different release repo somewhere. Anyway, thanks for following up :)
I don't mind taking care of this. Something is odd with bloom today, I wasn't particularly trying to use a different release repo or anything, but I'll figure it out. I'll report when it's out.
Ok, I had to manually send the PR for bloom, let's hope it's all OK.
1. reproduce steps
1.1 create a test message catkin package
mkdir -p ~/test/src/my_msgs/msg
1.2 build test package using catkin_make_isolated
cd ~/test && catkin_make_isolated
1.3 check generated java source for message
$ ls build_isolated/my_msgs/java/my_msgs/src/main/java/my_msgs
ls: cannot access build_isolated/my_msgs/java/my_msgs/src/main/java/my_msgs: No such file or directory
2. the cause
By comparing to the build.gradle generated by catkin_make, I find that there is trailing "/." in "--package-path" path:
$ grep package-path build_isolated/my_msgs/java/my_msgs/build.gradle
args = new ArrayList<String>([generated_sources_directory, '--package-path=/home/xxx/test/src/my_msgs/.', 'my_msgs'])
After removing the trailing "/." in "--package-path" path in build.gradle, it could successfully generate the java source:
$ ls build_isolated/my_msgs/java/my_msgs/src/main/java/my_msgs
Test.java
3. how to fix
Here is the change I made on genjava/src/genjava/gradle_project.py (just for your reference).