样品验证

以下是verifys.xml文件的示例:

<verifications xmlns="http://maven.apache.org/verifications/1.0.0"
               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
               xsi:schemaLocation="http://maven.apache.org/verifications/1.0.0 http://maven.apache.org/xsd/verifications-1.0.0.xsd">
  <files>
    <file>
      <location>src/main/resources/file1.txt</location>
    </file>
    <file>
      <location>src/main/resources/file2.txt</location>
      <contains>aaaabbbb</contains>
    </file>
    <file>
      <location>src/main/resources/file3.txt</location>
      <exists>false</exists>
    </file>
  </files>
</verifications>

这个文件:

  • 检查文件src/main/resources/file1.txt是否存在。
  • 检查文件src/main/resources/file2.txt是否存在并与正则表达式aaaabbbb匹配。
  • 检查文件src/main/resources/file3.txt是否存在。