简体   繁体   中英

Is there a way to enforce one of many files in Apache Maven Enforcer rule "Require Files Exist"?

I am using the rule requireFilesExists of the Maven Enforcer Plugin. I need to enforce a README-file. This can be for example a file called README.adoc or README.md. The documentation only says that a list of files can be provided which are all enforced. But I see no way to enforce a list where only one file would be sufficient.

There are a few standard rules like: requireFiles... all rules extends class: AbstractRequireFiles .

All files given as list must satisfy rule.

You can add next parameter to AbstractRequireFiles , eg satisfyAny . Implementation should not be difficult.

Issue for track MENFORCER-430 and for fix for volunteers:-)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM