You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Tamas Cservenak (Jira)" <ji...@apache.org> on 2025/04/07 12:05:00 UTC
[jira] [Comment Edited] (MNG-2478) add "resources-filtered" filtered resource directories to super POM
[ https://issues.apache.org/jira/browse/MNG-2478?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17941557#comment-17941557 ]
Tamas Cservenak edited comment on MNG-2478 at 4/7/25 12:04 PM:
---------------------------------------------------------------
This change now introduces slight differences when _same project using model 4.0.0 is built interchangeably with maven3 and maven4_ (as we were wondering why it fails on two CI: Jenkins and GH). Finding the reason with having this change in superpom of Maven4 (and not in superpom of Maven3) is quite challenging.
Hence created MNG-8679 and I think model 4.0.0 superpom should be fully aligned with Maven3, and this change is left in model 4.1.0 superpom. In short, if mvn3 fails to build a project, mvn4 should fail as well (and this is not what happens here).
was (Author: cstamas):
This change now introduces slight differences when _same project using model 4.0.0 is built interchangeably with maven3 and maven4_ (as we were wondering why it fails on two CI: Jenkins and GH). Finding the reason with having this change in superpom of Maven4 (and not in superpom of Maven3) is quite challenging.
Hence created MNG-8679 and I think model 4.0.0 superpom should be fully aligned with Maven3, and this change is left in model 4.1.0 superpom.
> add "resources-filtered" filtered resource directories to super POM
> -------------------------------------------------------------------
>
> Key: MNG-2478
> URL: https://issues.apache.org/jira/browse/MNG-2478
> Project: Maven
> Issue Type: New Feature
> Components: POM
> Affects Versions: 2.0.4
> Environment: any
> Reporter: Jörg Hohwiller
> Assignee: Michael Osipov
> Priority: Major
> Fix For: 4.0.0-alpha-2, 4.0.0
>
>
> The super POM contains default folders for resources that are NOT filtered (src/main/resources and src/test/resources). If one (additionally) needs a filtered resources folder, it needs to override the default and therefore has to add all default folders if he does NOT want to "loose" the defaults.
> To make this easier my suggestion is to add filtered resource folders to the super POM. This should also fit to the philosophy of maven that aims to have defaults and only declare as little custom configuration as needed.
> My personal favorite for the foldernames would be "templates" but to make things more obvious to the user maybe "resources-filtered" would be better. Actually I do not care to much about the name...
> So the resources in the super POM should look like this:
> {code:xml} <resources>
> <resource>
> <directory>src/main/resources</directory>
> </resource>
> <!-- BEGIN: addition -->
> <resource>
> <directory>src/main/resources-filtered</directory>
> <filtering>true</filtering>
> </resource>
> <!-- END: addition -->
> </resources>
> <testResources>
> <testResource>
> <directory>src/test/resources</directory>
> </testResource>
> <!-- BEGIN: addition -->
> <testResource>
> <directory>src/test/resources-filtered</directory>
> <filtering>true</filtering>
> </testResource>
> <!-- END: addition -->
> </testResources>{code}
> Update: The folder name has been changed to "resources-filtered".
--
This message was sent by Atlassian Jira
(v8.20.10#820010)