TestNG & Maven: How to configure it correctly
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>pre-test</id>
<phase>process-test-resources</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks>
<move todir="${project.build.outputDirectory}">
<fileset dir="${project.build.outputDirectory}">
<!-- include list of files you want to have hidden during tests -->
<include name="META-INF/persistence.xml"/>
</fileset>
<mapper type="glob" from="*" to="*~"/>
</move>
</tasks>
</configuration>
</execution>
<execution>
<id>post-test</id>
<phase>test</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks>
<move todir="${project.build.outputDirectory}">
<fileset dir="${project.build.outputDirectory}" defaultexcludes="false">
<include name="**/*~"/>
</fileset>
<mapper type="glob" from="*~" to="*"/>
</move>
</tasks>
</configuration>
</execution>
</executions>
</plugin>
No hay comentarios:
Publicar un comentario