Maven resource filtering not executed

I have a Dockerfile containing the following line:

ENTRYPOINT ["java", "-Dconversion.rules.folder=/var/rules", "-jar", "/var/gateway-service-${project.version}.jar"]

I am configuring the maven-resources-plugin as following:


As you can see I am expecting the project.version to be replaced. For some reason this is not true. I have then ran the build using debug mode and it outputs the following:

[INFO] Copying 1 resource
[DEBUG] Copying file Dockerfile
[DEBUG] file Dockerfile has a filtered file extension
[DEBUG] filtering ...srcmaindockerDockerfile to ...targetdockerDockerfile
[DEBUG] no use filter components

It seems to me that the filtering should be working, however the file in target still contains ${project.version}. What am I missing here?

Source: StackOverflow