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

Fix lombok configuration on Windows #55

Merged
merged 2 commits into from
Nov 9, 2023
Merged

Conversation

olperr1
Copy link
Member

@olperr1 olperr1 commented Oct 31, 2023

Please check if the PR fulfills these requirements

  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

Does this PR already have an issue describing the problem?

No

What kind of change does this PR introduce?

Bug fix

What is the current behavior?

When a project uses the lombok common configuration introduced by #44, the compilation fails on Windows because of the \ which are contained in the project path.

What is the new behavior (if this is a feature change)?
The compilation must not fail and the common configuration must be taken into account.

Does this PR introduce a breaking change or deprecate an API?

  • The Breaking Change or Deprecated label has been added
  • The migration guide has been updated in the github wiki (What changes might users need to make in their application due to this PR?)

Other information:

For instance, when compiling powsybl-networkstore on Windows, if the project is located in C:\Path_to\powsybl-network-store, the error message (before this fix) is:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin:3.4.0:enforce (lombok-verify-main-file) on project powsybl-network-store-model: 
[ERROR] Rule 1: org.apache.maven.enforcer.rules.EvaluateBeanshell failed with message:
[ERROR] Couldn't evaluate condition: org.codehaus.plexus.util.FileUtils.fileRead(new File("C:\Path_to\powsybl-network-store".replace('\\', '/') + "/lombok.config"), "UTF-8").startsWith("import target/configs/powsybl-build-tools.jar!powsybl-build-tools/lombok.config"): Sourced file: inline evaluation of: ``org.codehaus.plexus.util.FileUtils.fileRead(new File("C:\Path_to\powsybl-network-st . . . '' Token Parsing Error: Lexical error at line 1, column 58.  Encountered: "P" (87), after : "\"C:\\"

Signed-off-by: Olivier Perrin <olivier.perrin@rte-france.com>
Copy link
Member

@Tristan-WorkGH Tristan-WorkGH left a comment

Choose a reason for hiding this comment

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

Thank for the feedback, is it working in pure beanshell?

powsybl-parent/pom.xml Outdated Show resolved Hide resolved
powsybl-parent/pom.xml Outdated Show resolved Hide resolved
powsybl-parent/pom.xml Outdated Show resolved Hide resolved
@obrix
Copy link
Member

obrix commented Nov 9, 2023

@olperr1 Tested on windows, it fixes the build issue.

…ugin task

Signed-off-by: Olivier Perrin <olivier.perrin@rte-france.com>
Copy link
Member

@Tristan-WorkGH Tristan-WorkGH left a comment

Choose a reason for hiding this comment

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

All good for me! 👍🏻

@olperr1 olperr1 merged commit 771530b into main Nov 9, 2023
2 checks passed
@olperr1 olperr1 deleted the fix_lombok_config_for_windows branch November 9, 2023 14:02
@olperr1
Copy link
Member Author

olperr1 commented Nov 9, 2023

Thank you for your returns, @Tristan-WorkGH, @obrix, @jonenst

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants