Skip to content
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

Add a syntax for excluding dependencies #5

Open
ctrueden opened this issue Mar 14, 2017 · 1 comment
Open

Add a syntax for excluding dependencies #5

ctrueden opened this issue Mar 14, 2017 · 1 comment

Comments

@ctrueden
Copy link
Member

Endpoints can consist of multiple concatenated artifacts on the classpath; e.g.: org.codehaus.groovy:groovy-groovysh:org.codehaus.groovy.tools.shell.Main+commons-cli:commons-cli:1.3.1. But currently there is no way to specify dependency exclusions—i.e., to subtract elements from the classpath. Maven supports this via <exclusions> blocks under a <dependency>, so we simply need to think of a good syntax for excluding artifacts. Unfortunately, the nicest operator, -, will not work because the dash is heavily used in GAVs.

One option would be, instead of considering these concatenations and exclusions as elements of the endpoint itself, to make them separate CLI arguments. I almost did that initially, but it makes for "dirty" endpoints: supposing you want to run the same GAV+main with multiple different classpath modifications, the environment caching needs to take those modifications into account anyway, so they may as well be considered part of the endpoint proper.

So, assuming we want to keep these modifications as part of the endpoint itself, we should just choose a different character which never appears in GAVs or Java class names. Maybe ! since it rather universally means "not".

@hanslovsky
Copy link
Member

! seems reasonable to me. Another semantically nice character would be \ but that becomse annoying because you'd have to write \\ in most cases.

Also, I assume that endpoint+A!B+C would only exclude B, not B and C.

@ctrueden ctrueden added this to the unscheduled milestone Nov 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants