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

Exclude *.bat Files from Maven Filtering #973

Open
alfeilex opened this issue Jan 21, 2025 · 0 comments
Open

Exclude *.bat Files from Maven Filtering #973

alfeilex opened this issue Jan 21, 2025 · 0 comments
Labels
bug Something isn't working good first issue Good for newcomers mvn related to apache maven build tool

Comments

@alfeilex
Copy link
Member

When using Maven filtering, *.bat files variables are being incorrectly processed, causing variables to not be replaced as expected. So variables with $var vs ${var} syntax (see default delimiters) are replaced differntly by the filtering. In our case, the variable ${file} is used by Maven Filtering as well. So when maven filtering does not have the variable ${«variable-name»} defined, it will not resolve that variable syntax in the filtered file.

The proper fix would be to exclude *.bat from filtering and include to non-filtered copying here:

IDEasy/cli/pom.xml

Lines 160 to 175 in 58fd72a

<resource>
<directory>src/main/package</directory>
<filtering>true</filtering>
<excludes>
<exclude>**/*.bak</exclude>
<exclude>system/**/*</exclude>
</excludes>
</resource>
<!-- However, we then exclude system folder entirely so we need to added it here without filtering -->
<resource>
<directory>src/main/package</directory>
<filtering>false</filtering>
<includes>
<include>system/**/*</include>
</includes>
</resource>

@alfeilex alfeilex added the bug Something isn't working label Jan 21, 2025
@github-project-automation github-project-automation bot moved this to 🆕 New in IDEasy board Jan 21, 2025
@alfeilex alfeilex added mvn related to apache maven build tool good first issue Good for newcomers labels Jan 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers mvn related to apache maven build tool
Projects
Status: 🆕 New
Development

No branches or pull requests

1 participant