smengcl commented on PR #8037:
URL: https://github.com/apache/ozone/pull/8037#issuecomment-2744723182
> Nice catch @smengcl.
>
> This is intentional, but sometimes surprising. We use
`maven-resources-plugin` to replace properties (`filtering=true`) while copying
these files. Unfortunately `file` is also a built-in property, so `${file}`
needs to be used as `$file`, or renamed to something else, like `${f}` or
`${arg}`.
>
>
https://github.com/apache/ozone/blob/e805c15c744471506a21656792b43c3bf70369ce/hadoop-ozone/dist/pom.xml#L154-L172
>
> BTW, some of these files look like are copied from Ranger as is. In the
long run we should get them from Ranger, instead of duplicating them in Ozone.
That would also avoid this problem.
Thanks @adoroszlai for confirming my suspicion. `${file}` and `${basedir}`
fell into the built-in properties that are unintentionally replaced.
ref:
https://maven.apache.org/plugins/maven-resources-plugin/examples/filter.html
Another possible workaround would be to specifically exclude this file from
`filtering`, like this (diff attached below):
```diff
diff --git i/hadoop-ozone/dist/pom.xml w/hadoop-ozone/dist/pom.xml
index d02d5f8d48..0b37794d18 100644
--- i/hadoop-ozone/dist/pom.xml
+++ w/hadoop-ozone/dist/pom.xml
@@ -165,8 +165,15 @@
<resources>
<resource>
<directory>src/main/compose</directory>
+ <excludes>
+
<exclude>src/main/compose/ozone/ranger-plugin/enable-ozone-plugin.sh</exclude>
+ </excludes>
<filtering>true</filtering>
</resource>
+ <resource>
+
<directory>src/main/compose/ozone/ranger-plugin/enable-ozone-plugin.sh</directory>
+ <filtering>false</filtering>
+ </resource>
</resources>
</configuration>
</execution>
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]