Question about maven filtering resources

Does someone know why maven filtering resources doesn’t work in this project? Maybe I’m doing something wrong, but I created a sample project to test if I was doing something wrong and the solution worked in the sample project but not in GroupDocs.Total-for-Java-Spring.

I created a property file on src/main/resources folder, product.properties. And I filled it as follows:

version=${project.version}

In pom.xml file I added inside the principle build tag, not inside any profile:

<build>
  <resources>
    <resource>
      <directory>src/main/resources</directory>
      <filtering>true</filtering>
    </resource>
  </resources>
  ...
</build>

But when I check the file in target folder, it wasn’t filtered. Does someone have any idea?

Project URL: GitHub - groupdocs-total/GroupDocs.Total-for-Java: GroupDocs.Total Java Examples
Branch: main

I found the answer, it is a Spring Boot related issue, java - Maven resource filtering not working - because of spring boot dependency - Stack Overflow, instead of using ${property} we should use @property@.

1 Like

@john.mcqueide

Glad to know that your issue is resolved.

1 Like