DhanaGitHub / maven-replacer-plugin

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

Plugin doesn't work with absolute paths in includes/excludes #69

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
As far as I know, it's best practice not to specify paths containing "target/" 
because it's possible to change your build directory to something else 
(http://stackoverflow.com/questions/3908013/maven-how-to-change-path-to-target-d
irectory-from-command-line). Generally, this means you use the project 
variables, e.g. ${project.build.directory} instead of target/.

However, the plugin doesn't seem to work unless the value passed for 
includes/excludes/filesToInclude/filesToExclude/file are relative to the 
project's basedir.

For example, this works (relative path):
<filesToInclude>target/generated-sources/jsp/**/*.java</filesToInclude>

This does not work (resolves to absolute path):
<filesToInclude>${project.build.directory}/generated-sources/jsp/**/*.java</file
sToInclude>

This also does not work (absolute path):
<filesToInclude>C:/workspace/myProject/target/generated-sources/jsp/**/*.java</f
ilesToInclude>

Original issue reported on code.google.com by justinga...@gmail.com on 17 Jul 2012 at 3:11

GoogleCodeExporter commented 9 years ago
Please fix this! Not supporting properties in the paths is a major deficiency 
IMHO. Have a look at how this is done in other plugins; there's a library for 
this.

Original comment by anders.g...@gmail.com on 19 Sep 2012 at 11:33

GoogleCodeExporter commented 9 years ago
Have you tried the basedir property for this plugin?

Original comment by baker.st...@gmail.com on 19 Sep 2012 at 11:42

GoogleCodeExporter commented 9 years ago
Also, what is a library that does this so I can have a look?

Original comment by baker.st...@gmail.com on 19 Sep 2012 at 11:46

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I've tried ${basedir} without success. It would be useful to have this resolved 
since I can't run a parent build with a child needing replacements due to this.

Original comment by lark...@gmail.com on 4 Feb 2013 at 6:17

GoogleCodeExporter commented 9 years ago
I can agree that issue, it's not possible to build from parent pom.
Our workaround, we have to change the settings in jenkins, so we build the 
childs separatly

Original comment by dieter.b...@gmail.com on 5 Feb 2013 at 7:09

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I have the same problem =(

Original comment by gug...@gmail.com on 12 Aug 2013 at 7:04

GoogleCodeExporter commented 9 years ago
I have the same issue

Original comment by dvilave...@gmail.com on 10 Oct 2013 at 7:13

GoogleCodeExporter commented 9 years ago
Is this project dead? This issue has been unresolved for more than a year.

Original comment by tanel.ti...@gmail.com on 8 Nov 2013 at 10:02

GoogleCodeExporter commented 9 years ago
Please fix

Original comment by nava.i...@gmail.com on 15 Feb 2014 at 8:56

GoogleCodeExporter commented 9 years ago
Looking into this. Do not have an ETA on it though.

Original comment by baker.st...@gmail.com on 19 Feb 2014 at 12:03

GoogleCodeExporter commented 9 years ago
I think this is sorted. Can you build from HEAD (fixed in r773) and let me 
know? I had to compromise and drop the default value (".") on basedir though 
this can be added by users manually if they have issues.

I have also reluctantly added a special case for a basedir value of 
"USE_ABSOLUTE_PATH" which should have the same effect. I did this because of 
the large turn around getting feedback on bugs and the slow releases to maven 
central. So I would like a backup scenario in place. I will keep this flag 
depending on if the special value ends up being needed and/or people require 
the default value back.

Original comment by baker.st...@gmail.com on 19 Feb 2014 at 1:07

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
1.5.3 has been released with this fix. It should be in maven central shortly. 
Please test and let me know.

Original comment by baker.st...@gmail.com on 16 Apr 2014 at 9:26