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
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 22 additions & 1 deletion powsybl-parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,27 @@
</properties>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>${maven.buildhelper.version}</version>
<executions>
<execution>
<id>regex-property</id>
olperr1 marked this conversation as resolved.
Show resolved Hide resolved
<goals>
<goal>regex-property</goal>
</goals>
<configuration>
<!-- Change '\' by '/' in ${project.basedir} to allow lombok configuration on Windows -->
<name>escaped.project.basedir</name>
olperr1 marked this conversation as resolved.
Show resolved Hide resolved
<value>${project.basedir}</value>
<regex>\\</regex>
<replacement>/</replacement>
<failIfNoMatch>false</failIfNoMatch>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
Expand All @@ -429,7 +450,7 @@
<message>Missing file "lombok.config" in project. Please create it starting with the following content "${powsybl.internal.lombok-import-line}".</message>
</requireFilesExist>
<evaluateBeanshell>
<condition>org.codehaus.plexus.util.FileUtils.fileRead(new File("${project.basedir}/lombok.config"), "UTF-8").startsWith("${powsybl.internal.lombok-import-line}")</condition>
<condition>org.codehaus.plexus.util.FileUtils.fileRead(new File("${escaped.project.basedir}/lombok.config"), "UTF-8").startsWith("${powsybl.internal.lombok-import-line}")</condition>
olperr1 marked this conversation as resolved.
Show resolved Hide resolved
<message>The lombok.config file must start with the line "${powsybl.internal.lombok-import-line}"</message>
</evaluateBeanshell>
</rules>
Expand Down