Anyone know how to filter text outside of quotes in a java file via the resource plugin?
I have a resource filter set with a delimiter of @ but I only see the version.designator replaced. This makes me think there's a trick to filtering text outside of quotes in a java file.
Thanks for the help
Peter
Pom
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<id>update Version file from pom</id>
<phase>generate-resources</phase>
<goals><goal>copy-resources</goal></goals>
<configuration>
<overwrite>true</overwrite>
<delimiters>
<delimiter>@</delimiter>
</delimiters>
<outputDirectory>${project.build.sourceDirectory}/</outputDirectory>
<resources>
<resource>
<directory>${project.basedir}/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
Source
public final class Version {
public static final int MAJOR_VERSION = @version.major@;
public static final String DESIGNATOR_VERSION = "@version.designator@";
Result
public final class Version {
public static final int MAJOR_VERSION = @version.major@;
public static final String DESIGNATOR_VERSION = "BETA";