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

Maven builds using regex options are not portable #5081

Closed
gdupontf opened this issue Mar 15, 2022 · 5 comments
Closed

Maven builds using regex options are not portable #5081

gdupontf opened this issue Mar 15, 2022 · 5 comments
Assignees

Comments

@gdupontf
Copy link

gdupontf commented Mar 15, 2022

On Windows systems arguments' backslashes get (erroneously) translated to forward slashes without discrimination.

Stepping through the (forked) jvm during compilation indeed reveals this :

Capture 2022-03-15 000743

Thus the simple direct question :

What is the recommended way to run a Maven build using these kinds of arguments on Windows systems?

Here is a bare minimum repository (that assumes JDK 8 in the current home environment variable).

Commands

git clone git@github.com:gabarise/checker-reprod.git

git checkout ed9f9379

.\mvnw clean compile

Build should normally fail.

Passes on my Windows machine.

Inputs

N/A

Outputs

N/A

Expectation

Builds using recommended Maven configuration should be portable.

@markro49
Copy link
Contributor

I found that -AonlyDefs=foo.bar.Test worked fine on both Windows and Linux. Please verify it works for you and I will close the issue.

@mernst
Copy link
Member

mernst commented Aug 23, 2022

@gdupontf Could you please verify whether this works for you? If not, we will investigate further.

@gdupontf
Copy link
Author

The issue is that there are path translation shenanigans going on. The backslashes being converted here prevent the use of escape sequences.

@markro49
Copy link
Contributor

markro49 commented Aug 25, 2022

I don't understand what you mean. For the example you say the backlashes cause problems but I have found they are not needed and the option works as expected without them.

@markro49
Copy link
Contributor

markro49 commented Sep 5, 2022

Closing issue; we can reopen if get more info.

@markro49 markro49 closed this as completed Sep 5, 2022
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

3 participants