Skip to content

Conversation

jmini
Copy link

@jmini jmini commented Mar 26, 2025

I lost a lot of time because I had a typo in the jar listed as --classpath value when running the command:

java -jar java-function-invoker-<version>.jar \
  --classpath build/my-function-1.0.0-SNAPSHOT-runner.jar \
  --target io.quarkus.gcp.functions.QuarkusHttpFunction

I think it would make sense to add a warning to help users (like me) realizing they added an invalid entry on the list provided with --classpath.

@jmini jmini closed this Mar 26, 2025
@jmini jmini reopened this Mar 26, 2025
Copy link
Contributor

@akerekes akerekes left a comment

Choose a reason for hiding this comment

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

Thank you, @jmini for the PR.

Can you adjust the test at

to cover this case?

urls.addAll(jarsIn(component.substring(0, component.length() - 2)));
} else {
Path path = Paths.get(component);
if(!Files.isRegularFile(path)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

This will emit the warning on existing directories.

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