1

I am using maven replacer plugin version 1.5.3 to create output file from tokenValueMap as my replacement pattern file. My Input file is a .txt file. Here is how my pom.xml looks like. On running mvn groupId:artifactId:replace, it builds success But get Warning "No input file/s defined". Replacement run on 0 files. Please suggest! Thank you

 <plugin>
            <groupId>com.google.code.maven-replacer-plugin</groupId>
            <artifactId>replacer</artifactId>
            <version>1.5.3</version>
            <executions>
                <execution>
                    <id>osb-ext-pci-config</id>
                    <phase>generate-sources</phase> 
                    <goals>
                        <goal>replace</goal>
                    </goals> 
                     <configuration>
                        <file>src/main/customization/LocalImpl.txt</file>
                        <outputFile>target/local_out.xml</outputFile>
                    <tokenValueMap>src/main/customization/ReplacementPatterns.txt</tokenValueMap>
                </configuration>
             </execution>
            </executions>
     </plugin>
monal86
  • 433
  • 2
  • 11
  • 26
  • If I read _"Note: There is no longer a default for basedir and this must be an absolute path if not using a basedir. "_ for the `includes:include` parameter in the [Usage Guide](https://code.google.com/p/maven-replacer-plugin/wiki/UsageGuide) I wonder whether this applies to the `file` parameter, as well. And they just forgot to mention it there, too, or at a more prominent place. – Gerold Broser Mar 21 '15 at 19:48
  • @GeroldBroser Tried that too.. But still gives me same message. – monal86 Mar 23 '15 at 02:43

1 Answers1

0

Please try using File tag to mention the input file.

Eg : <file>${scac.input.dir}/WSDLs/ProjectB.wsdl</file>

Please find the below plugin as sample.

<plugin>
    <groupId>com.google.code.maven-replacer-plugin</groupId>
    <artifactId>replacer</artifactId>
    <version>1.5.3</version>
    <executions>
        <execution>
            <phase>prepare-package</phase>
            <goals>
                <goal>replace</goal>
            </goals>
        </execution>
    </executions>
    <configuration>
        <file>${scac.input.dir}/WSDLs/ProjectB.wsdl</file>
        <replacements>
            <replacement>
                <token>%SERVER_NAME%</token>
                <value>${env.soa.lbhost}</value>
            </replacement>
        </replacements>
    </configuration>
</plugin>`
Kurt Van den Branden
  • 11,995
  • 10
  • 76
  • 85