Skip to content
This repository has been archived by the owner on Aug 13, 2021. It is now read-only.

PortnumberMojo

Andreas Schmitz edited this page Jan 7, 2013 · 2 revisions

Portnumber Mojo

The portnumber mojo can be used to get an unoccupied port number for use in integration tests. This is desirable if you're often running parallel integration test builds with tomcat.

The mojo runs in the initialization phase, you can use the maven expression ${portnumber} afterwards (eg. to specify the port in the tomcat maven plugin, to filter resources used by test scripts etc.).

Use it like this:

<plugin>
  <groupId>org.deegree</groupId>
  <artifactId>deegree-maven-plugin</artifactId>
  <executions>
    <execution>
      <id>generate-portnumber</id>
      <goals>
        <goal>generate-portnumber</goal>
      </goals>
    </execution>
  </executions>
</plugin>
Clone this wiki locally