| 1 |
<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 http://maven.apache.org/maven-v4_0_0.xsd"> |
| 2 |
<modelVersion>4.0.0</modelVersion> |
| 3 |
|
| 4 |
<groupId>org.codehaus.mojo</groupId> |
| 5 |
<artifactId>build-helper-maven-plugin-reverse-port-it</artifactId> |
| 6 |
<version>1.0-SNAPSHOT</version> |
| 7 |
<name>build-helper-maven-plugin-reverse-port-it</name> |
| 8 |
|
| 9 |
<build> |
| 10 |
<defaultGoal>package</defaultGoal> |
| 11 |
<plugins> |
| 12 |
<plugin> |
| 13 |
<groupId>@project.groupId@</groupId> |
| 14 |
<artifactId>@project.artifactId@</artifactId> |
| 15 |
<version>@project.version@</version> |
| 16 |
<executions> |
| 17 |
<execution> |
| 18 |
<id>reserve-ports</id> |
| 19 |
<phase>process-test-resources</phase> |
| 20 |
<goals> |
| 21 |
<goal>reserve-network-port</goal> |
| 22 |
</goals> |
| 23 |
<configuration> |
| 24 |
<urls> |
| 25 |
<url>file:///${project.basedir}/names2.txt</url> |
| 26 |
</urls> |
| 27 |
</configuration> |
| 28 |
</execution> |
| 29 |
<execution> |
| 30 |
<id>reserve-ports-to-files</id> |
| 31 |
<phase>process-test-resources</phase> |
| 32 |
<goals> |
| 33 |
<goal>reserve-network-port</goal> |
| 34 |
</goals> |
| 35 |
<configuration> |
| 36 |
<outputFile>${project.build.directory}/ports.properties</outputFile> |
| 37 |
<urls> |
| 38 |
<url>file:///${project.basedir}/names1.txt</url> |
| 39 |
<url>file:///${project.basedir}/names2.txt</url> |
| 40 |
</urls> |
| 41 |
</configuration> |
| 42 |
</execution> |
| 43 |
</executions> |
| 44 |
</plugin> |
| 45 |
<plugin> |
| 46 |
<artifactId>maven-antrun-plugin</artifactId> |
| 47 |
<executions> |
| 48 |
<execution> |
| 49 |
<id>mk-target-dir</id> |
| 50 |
<phase>compile</phase> |
| 51 |
<goals> |
| 52 |
<goal>run</goal> |
| 53 |
</goals> |
| 54 |
<configuration> |
| 55 |
<tasks> |
| 56 |
<mkdir dir="${project.build.directory}" /> |
| 57 |
</tasks> |
| 58 |
</configuration> |
| 59 |
</execution> |
| 60 |
|
| 61 |
<execution> |
| 62 |
<id>echo-reserve-ports</id> |
| 63 |
<phase>test</phase> |
| 64 |
<goals> |
| 65 |
<goal>run</goal> |
| 66 |
</goals> |
| 67 |
<configuration> |
| 68 |
<tasks> |
| 69 |
<echo>port1=${port1}</echo> |
| 70 |
<echo>port2=${port2}</echo> |
| 71 |
<echo>port3=${port3}</echo> |
| 72 |
</tasks> |
| 73 |
</configuration> |
| 74 |
</execution> |
| 75 |
</executions> |
| 76 |
</plugin> |
| 77 |
</plugins> |
| 78 |
</build> |
| 79 |
</project> |