Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
doc:catkin_migration [2014/09/05 13:13] – [Adapting OWL and Prolog files to the new libraries] admindoc:catkin_migration [2014/09/05 13:13] – [Run dependencies when calling Java from Prolog] admin
Line 60: Line 60:
  
 This is not easy with the existing tools (since the exporting packages are not by themselves catkin packages), so we had to find another solution: During compilation, gradle creates a file 'classpath.txt' with the dependencies of the respective package. At runtime, rosprolog and json_prolog collect these files and assemble the overall classpath from them. You need to add the following statement to the build.gradle of the respective (exporting) subproject: This is not easy with the existing tools (since the exporting packages are not by themselves catkin packages), so we had to find another solution: During compilation, gradle creates a file 'classpath.txt' with the dependencies of the respective package. At runtime, rosprolog and json_prolog collect these files and assemble the overall classpath from them. You need to add the following statement to the build.gradle of the respective (exporting) subproject:
 +<code java>
     task writeClasspath << {     task writeClasspath << {
         buildDir.mkdirs()         buildDir.mkdirs()
Line 68: Line 68:
                                                   project.version + ".jar" + "\n"                                                   project.version + ".jar" + "\n"
     }     }
 +</code>
 ... and add the writeClasspath task to the CMakeLists.txt: ... and add the writeClasspath task to the CMakeLists.txt:
     catkin_rosjava_setup(installApp publishMavenJavaPublicationToMavenRepository writeClasspath)     catkin_rosjava_setup(installApp publishMavenJavaPublicationToMavenRepository writeClasspath)