jmporterog / maven-replacer-plugin

Automatically exported from code.google.com/p/maven-replacer-plugin
MIT License
0 stars 0 forks source link

Change to be able to use the path to the replaced file directly to the pom.xml (which is not always the same as execution path) #20

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create simple pom.xml with the plugin execution.
2. run the build process beeing in a different directory than the pom.xml
is placed (i.e. app server deployment scripts)
3. Plugin does nothing as it executes on a 'file' which is specified
directly to execution path and not the pom.xml path.

Would be good to have specific run option to set.

Original issue reported on code.google.com by pmasl...@gmail.com on 30 Nov 2009 at 1:00

GoogleCodeExporter commented 9 years ago
Hi pmaslany,

Have you tried using the maven project property: ${basedir}?
This property points to the directory of the pom.xml.
For example:
<configuration>
    <file>${basedir}/somefile.txt</file>
    ...
</configuration>

See: http://docs.codehaus.org/display/MAVENUSER/MavenPropertiesGuide

You can also substitute a separate property for the file and set it when you 
run your 
build. e.g. mvn package -DfileToReplace=/absolute/path/to/file

I hope this helps, if not, please comment back.

Thanks,
Steven

Original comment by baker.st...@gmail.com on 30 Nov 2009 at 10:01

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I will keep this Issue open for another couple days to wait for a response.
If I don't get a response, I will close it.

Original comment by baker.st...@gmail.com on 1 Dec 2009 at 11:06

GoogleCodeExporter commented 9 years ago
Removing issue.

Original comment by baker.st...@gmail.com on 3 Dec 2009 at 9:43