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

String index out of range when paramter is malformed #919

Open
py023 opened this issue Feb 21, 2024 · 0 comments
Open

String index out of range when paramter is malformed #919

py023 opened this issue Feb 21, 2024 · 0 comments

Comments

@py023
Copy link

py023 commented Feb 21, 2024

When passing module list with leading , mvnd will crash with java.lang.StringIndexOutOfBoundsException: String index out of range: 0, but maven works fine.

To reproduce:

# mvnd crashes
$ mvnd package -pl ,a,b                                                                                                                                                                                                                                                   
Unable to find the root directory. Create a .mvn directory in the root directory or add the root="true" attribute on the root project's model to identify it.
java.lang.StringIndexOutOfBoundsException: String index out of range: 0

# mvn doesn't crash
$ mvn package -pl ,a,b                                                                                                                                                                                                                                  
[INFO] Scanning for projects...
...

Version:

mvnd: Apache Maven 4.0.0-alpha-8 (a2cbf4873a99c1aca7e3908086fe53b17865f07a)

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

No branches or pull requests

1 participant