Skip to content

Fixes sources jar path #58

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: galactic-devel
Choose a base branch
from

Conversation

gonzodepedro
Copy link
Collaborator

@gonzodepedro gonzodepedro commented Mar 31, 2021

If you look at the compiled jar their internal paths have the form: org.ros2.rcljava.*. While the sources jar has an internal path that starts in ${CMAKE_CURRENT_SOURCE_DIR}.
This is an attempt to fix that

Signed-off-by: Gonzalo de Pedro [email protected]

Signed-off-by: Gonzalo de Pedro <[email protected]>
Copy link

@jacobperron jacobperron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there something that isn't working, prompting this change?

@@ -180,7 +180,7 @@ function(add_source_jar _TARGET_NAME)

cmake_parse_arguments(_add_source_jar
""
"OUTPUT_NAME"
"OUTPUT_NAME;JAR_ROOT_PATH"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On one hand, it seems like it should be the responsibility of the caller to remove any prefix paths, but on the other hand it's convenient to let the function take care of it. The downside of letting this function remove the prefix is that it is assuming that all source files have the same prefix.

I think it would safer to instead let the caller deal with the prefix and they can inform this function by passing a WORKING_DIRECTORY argument used when calling the jar command below.

Please add documentation for the new argument to the docblock above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants