Usage

The plugin provides one single goal:

  • read-dependency-pom: import properties from specified dependencies.

Each goal is further described below.

Importing properties

To import properties from dependencies add the plugin to your project's pom.xml:

<build>
  ...
  <plugins>
    ...
    <plugin>
      <groupId>com.github.jpmsilva.ppmp</groupId>
      <artifactId>pom-properties-maven-plugin</artifactId>
      <version>0.0.2-SNAPSHOT</version>
      <executions>
        <execution>
          <phase>initialize</phase>
          <goals>
            <goal>read-dependency-pom</goal>
          </goals>
        </execution>
      </executions>
      <configuration>
        <dependencies>
          <dependency>
            <groupId>groupId</groupId>
            <artifactId>artifactId</artifactId>
            <version>version</version>
          </dependency>
        </dependencies>
      </configuration>
    </plugin>
    ...
  </plugins>
  ...
</build>

This configuration allows importing properties defined in groupId:artifactId:version into your own project. Property placeholders such as ${variable} will be recursively resolved, and the dependency tree of the referred artifacts should be checked for proper resolution.