我试图在 war 中操纵一些文件,如下所示

war{
    rootSpec.filesMatching('**/WEB-INF/spring/root-context*.xml'){ detail ->
            // change the name of detail file
        }

}

由于某种原因,模式匹配无法正常工作。只有完全比对的运作方式如下
 war{
        rootSpec.filesMatching('**/WEB-INF/spring/root-context.xml'){ detail ->
                // change the name of detail file
            }

    }

我在此文件夹中以'root-context'开头的文件中有不同的文件,我只想在 war 中只包含其中一个文件。

我在filesMatching通话中做错什么了吗?

最佳答案

只有下面的检查工程。

相应地改变了我的逻辑。

war{
    rootSpec.filesMatching('**/WEB-INF/spring/*.xml'){ detail ->
            // change the name of detail file
        }

}

07-24 09:47
查看更多