74 lines
1.9 KiB
XML
74 lines
1.9 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
|
<modelVersion>4.0.0</modelVersion>
|
|
|
|
<groupId>com.inteligr8</groupId>
|
|
<artifactId>xpath-maven-plugin-query-file</artifactId>
|
|
<version>@pom.version@</version>
|
|
<packaging>pom</packaging>
|
|
|
|
<name>Query File Plugin Tests</name>
|
|
|
|
<build>
|
|
<plugins>
|
|
<plugin>
|
|
<groupId>${project.groupId}</groupId>
|
|
<artifactId>xpath-maven-plugin</artifactId>
|
|
<version>@pom.version@</version>
|
|
<executions>
|
|
<execution>
|
|
<id>query-text</id>
|
|
<phase>validate</phase>
|
|
<goals>
|
|
<goal>query-file</goal>
|
|
</goals>
|
|
<configuration>
|
|
<file>pom.xml</file>
|
|
<xpath>/project/modelVersion/text()</xpath>
|
|
<newProperty>result.1</newProperty>
|
|
</configuration>
|
|
</execution>
|
|
<execution>
|
|
<id>query-condition</id>
|
|
<phase>validate</phase>
|
|
<goals>
|
|
<goal>query-file</goal>
|
|
</goals>
|
|
<configuration>
|
|
<file>pom.xml</file>
|
|
<xpath>/project/build/plugins/plugin[artifactId="maven-enforcer-plugin"]/version</xpath>
|
|
<newProperty>result.2</newProperty>
|
|
</configuration>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
<plugin>
|
|
<artifactId>maven-enforcer-plugin</artifactId>
|
|
<version>3.5.0</version>
|
|
<executions>
|
|
<execution>
|
|
<id>assert</id>
|
|
<goals><goal>enforce</goal></goals>
|
|
<configuration>
|
|
<rules>
|
|
<requireProperty>
|
|
<property>result.1</property>
|
|
<regex>4.0.0</regex>
|
|
</requireProperty>
|
|
<requireProperty>
|
|
<property>result.2</property>
|
|
<regex>3.5.0</regex>
|
|
</requireProperty>
|
|
</rules>
|
|
</configuration>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
</plugins>
|
|
</build>
|
|
|
|
</project>
|