Closed florianli closed 5 years ago
That was my first implementation, then I found out that some maven plugins from apache acts this way. However I can revert this change an put it the target folder again.
I can remember that it worked that way in a previous version. #29 looks good to me.
implemented in version v4.0.3
@florianli I've just recognised that the official maven flatten plugin put its .flattened-pom.xml
next to the original pom.xml
as-well.
We may should follow the standard? What do you think? actually it's quite easy to exclude all artificial pom.xml
files git ignore patten would look like this .*-pom.xml
I don't have any opinion on this, except it should be inside the target-folder. I can have a look at the maven documentation tomorrow, if you want. Mayby I find something about this topic.
that would be great
I just found kinda explanation why they choose to place the modified pom file next to the original https://github.com/mojohaus/flatten-maven-plugin/issues/50 I also found out that that the flatten plugin has a clean goal that is registered to the clean phase. So I think I will revert the location back to next to the original pom file and a this clean task. What do you think?
I think I made my point quite clear with this issue. But in the end it is your desicion. When it is next to the original pom I will add a pattern to. gitignore to avoid that someone will commit the file to git
@florianli I think the problem mentioned in mojohaus/flatten-maven-plugin#50
is fixed so I will leave the pom in the target directory.
It seems that starting with 6.0.0 the .git-versioned-pom.xml is generated next to the pom.xml again, not in the target directory. Was this an intentional change? If so, it would be great to add it to the changelog.
It was intentional. I changed the location due to problems for some plugins with relative paths (relative to pom location). I'll add a changelog entry. I'm sorry for the inconvenience.
Don't worry, no big deal. Thanks for the response!
I suggest it would be worth adding a setting for this. I agree with @yankydoo it would be nice to have it in target
instead of the root. One reason is that when I'm doing find/replace operations, Intellij knows to exclude items in the target
folder, but the git versioned pom shows up in those search results.
There are related issues in the flatten pom plugin, see:
The
.git-versioned.pom.xml
is always generated when maven build is executed. Therefore it should not be stored in git. In your current plugin-configuration the default folder of.git-versioned.pom.xml
iscurrentProject.getBasedir()
. I think, it is common for a maven-project, that generated files are stored inside the target-folder..gitignore