Search code examples
maven-2maven-plugin

How do I tell maven-verifier-plugin to use a location inside an archive?


The maven-verifier-plugin seems useful, but the example verifications.xml:

<verifications><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>

is too simple. I want to specify a location inside an archive (e.g., jar or zip) file. How can I do that? Thanks in advance!


Solution

  • A look through the source code only shows files being opened using a File object and File won't extract things from and archive. So you won't be able to do this without modifying the plugin itself.