GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — <filtering>true</filtering>Failure in 3.4.0 · Issue #444 · apache/maven-resources-plugin

<filtering>true</filtering>Failure in 3.4.0 #444

New issue
Copy link
New issue
Copy link
Closed
#446
Closed
<filtering>true</filtering>Failure in 3.4.0#444
#446
Copy link
Assignees
slawekjaranowski
Labels
bugSomething isn't working

Description

@yuedaxia76
yuedaxia76
opened on Dec 1, 2025
Issue body actions

Affected version

3.4.0

Bug description

    <resources>
        <resource>
            <directory>src/main/java</directory>
            <filtering>true</filtering>
            <includes>
                <include>**/*.properties</include>
            </includes>
        </resource>
        <resource>
            <directory>src/main/java</directory>
            <includes>
                <include>**/*.xml</include>
                <include>**/*.js</include>
                <include>META-INF/**</include>
            </includes>
        </resource>
    </resources>

The first resource filtering not run ,but version 3.3.1 or Previous is ok.

Activity

  1. yuedaxia76
    added
    bugSomething isn't working
    on Dec 1, 2025
  2. slawekjaranowski
    self-assigned this
    on Dec 1, 2025
  3. slawekjaranowski
    added 2 commits that reference this issue on Dec 1, 2025

    Add IT for apache#444 issue

    b9eb52a

    Add IT for apache#444 issue

    793a03f
  4. slawekjaranowski
    linked a pull request that will close this issueAdd IT for #444 issue #446on Dec 1, 2025
  5. slawekjaranowski commented on Dec 1, 2025

    @slawekjaranowski
    slawekjaranowski
    on Dec 1, 2025
    Member
    More actions

    @yuedaxia76 can you provide steps, simple project which can reproduce your issue?

    I have added and IT - please look at

    • Add IT for #444 issue #446

    and I can not reproduce it

  6. yuedaxia76 commented on Dec 2, 2025

    @yuedaxia76
    yuedaxia76
    on Dec 2, 2025
    Author
    More actions

    testreas.zip

    this is netbeans project

  7. pzygielo commented on Dec 2, 2025

    @pzygielo
    pzygielo
    on Dec 2, 2025
    Contributor
    More actions

    testreas.zip

    So, it's about

    loginSession.refNoCl_cache=@cacheName@
    

    with 3.4.0 not being filtered, while with 3.3.1 being to:

    loginSession.refNoCl_cache=com.gentlesoft.framework.ds.MulDsCacheImpli
    

    Right?

  8. pzygielo commented on Dec 2, 2025

    @pzygielo
    pzygielo
    on Dec 2, 2025 · Hidden as outdated
    show commentMore actions
  9. pzygielo commented on Dec 2, 2025

    @pzygielo
    pzygielo
    on Dec 2, 2025 · Hidden as outdated
    show commentMore actions
  10. yuedaxia76 commented on Dec 2, 2025

    @yuedaxia76
    yuedaxia76
    on Dec 2, 2025
    Author
    More actions

    @pzygielo YES

  11. slawekjaranowski commented on Dec 2, 2025

    @slawekjaranowski
    slawekjaranowski
    on Dec 2, 2025
    Member
    More actions

    I see you define two set of resources:

        <resources>
            <resource>
                <directory>src/main/java</directory>
                <filtering>true</filtering>
                <includes>
                    <include>**/*.properties</include>
                </includes>
            </resource>
            <resource>
                <directory>src/main/java</directory>
                <includes>
                    <include>**/*.xml</include>
                    <include>**/*.js</include>
                    <include>META-INF/**</include>
                </includes>
            </resource>
        </resources>
    

    both set match file which you want to filter - META-INF/commons.properties

    so META-INF/commons.properties is processed twice - second simply copy without filtering

    In old implementation of maven-filtering only timestamp of files was checked, now content is analized so next copy override file

    Reacted by Piotrek Żygieło and Mirko Friedenhagen
  12. yuedaxia76 commented on Dec 2, 2025

    @yuedaxia76
    yuedaxia76
    on Dec 2, 2025
    Author
    More actions

    like this


    src/main/java
    true

    /*.properties



    src/main/java

    /.xml
    **/
    .js



    The configuration result is correct.

  13. yuedaxia76
    closed this as completedon Dec 2, 2025
  14. yuedaxia76 commented on Dec 2, 2025

    @yuedaxia76
    yuedaxia76
    on Dec 2, 2025
    Author
    More actions
        <resources>
            <resource>
                <directory>src/main/java</directory>
                <filtering>true</filtering>
                <includes>
                    <include>**/*.properties</include>
                </includes>
            </resource>
            <resource>
                <directory>src/main/java</directory>
                <includes>
                    <include>**/*.xml</include>
                    <include>**/*.js</include>
                </includes>
            </resource>
        </resources>
    
  15. slawekjaranowski
    added a commit that references this issue on Dec 2, 2025

    Add IT for apache#444 issue

    3064f6c
  16. slawekjaranowski
    added a commit that references this issue on Dec 12, 2025

    Add IT for #444 issue

    ad31b55
  17. MichaelKatt commented on Jan 21, 2026

    @MichaelKatt
    MichaelKatt
    on Jan 21, 2026
    More actions

    We had the same issue, but found a workaround.

    Originally, we also configured filtering first and then copying of the files, whereby maven-resources-plugin:3.4.0 overrode the file(s) from the filtering with the unchanged status.

    			<resource>
    				<directory>config</directory>
    				<filtering>true</filtering>
    				<includes>
    					<include>**/iaf-version.properties</include>
    				</includes>
    			</resource>
    			<resource>
    				<directory>config</directory>
    			</resource>
    

    By reversing the order of filtering and copying, the changes from the filtering are only applied after copying, thus preserving the modified file(s).

    			<resource>
    				<directory>config</directory>
    			</resource>
    			<resource>
    				<directory>config</directory>
    				<filtering>true</filtering>
    				<includes>
    					<include>**/iaf-version.properties</include>
    				</includes>
    			</resource>
    

    Therefore try this one:

         <resources>
            <resource>
                <directory>src/main/java</directory>
                <includes>
                    <include>**/*.xml</include>
                    <include>**/*.js</include>
                </includes>
            </resource>
            <resource>
                <directory>src/main/java</directory>
                <filtering>true</filtering>
                <includes>
                    <include>**/*.properties</include>
                </includes>
            </resource>
        </resources>
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @slawekjaranowski
    slawekjaranowski

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.