maven-replacer-plugin could not replace content for multiple files

57 Views Asked by At

Two submodules generated a JSON.java in each of them after maven compiling. maven-replacer-plugin in root pom file intends to replace the content of these JSON.java. However, JSON.java actually does not get changes after completion. I can use to replace a file content one at a time so the file paths are correct. The Includes and Include tags do not work?

        <plugin>
            <groupId>com.google.code.maven-replacer-plugin</groupId>
            <artifactId>replacer</artifactId>
            <version>1.5.3</version>
            <executions>
                <execution>
                    <phase>generate-sources</phase>
                    <goals>
                        <goal>replace</goal>
                    </goals>
                </execution>
            </executions>
            <configuration>
                <includes>
                    <include>jag-digitalforms-client/target/generated-sources/openapi/src/main/java/ca/bc/gov/open/pssg/rsbc/digitalforms/ordsclient/api/handler/JSON.java</include>
                    <include>jag-vips-client/src/jag-vips-client/target/generated-sources/openapi/src/main/java/ca/bc/gov/open/jag/ordsvipsclient/api/handler/JSON.java</include>
                </includes>
                <replacements>
                    <replacement>
                        <token>DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, true</token>
                        <value>DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false</value>
                    </replacement>
                </replacements>
            </configuration>
        </plugin>
0

There are 0 best solutions below