Skip to content
Discussion options

You must be logged in to vote

I appreciate you taking a look! I just stumbled upon a fix and while It's not the best it's definitely something!

I originally thought I should mark the annotated @SourceURI variable with @Field as well to add it to the class that Picocli was creating. This works great with the other variables in the script.

@Field
@SourceURI
URI scriptSourceUri

When I did this it didn't work. I can't remember if the variable was null or if there was an exception but I abandoned it. I just reversed the order of the annotations and it worked!

@SourceURI
@Field
URI scriptSourceUri

I'm not thrilled that the order matters here but I'm just glad it works!

I will definitely reach out to the groovy folks to find…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@mattbertolini
Comment options

Answer selected by mattbertolini
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants