Add Plugin to Project

To add the Stream plugin to an existing Pricefx project, you need to modify your pom.xml.

An example can be also found in the pricefx-starter template project.

Add Pricefx Artifact Repository (you may already have that in settings):

pom.xml
<project> <!-- ... --> <repositories> <repository> <id>Default repo</id> <url>https://repo1.maven.org/maven2</url> <snapshots> <enabled>false</enabled> </snapshots> <releases> <enabled>true</enabled> </releases> </repository> <repository> <id>Pricefx public maven artifacts</id> <url>https://nexus.pricefx.net/tools</url> <snapshots> <enabled>true</enabled> </snapshots> <releases> <enabled>true</enabled> </releases> </repository> </repositories> <!-- ... --> </project>

Add the plugin dependency:

pom.xml
<project> <!-- ... --> <dependencies> <dependency> <groupId>net.pricefx.learn</groupId> <artifactId>pricefx-stream-maven-plugin</artifactId> <version>1.0-SNAPSHOT</version> </dependency> </dependencies> <!-- ... --> </project>

Add the plugin itself:

pom.xml
<project> <!-- ... --> <build> <plugins> <!-- ... --> <plugin> <groupId>net.pricefx.learn</groupId> <artifactId>pricefx-stream-maven-plugin</artifactId> <version>1.0-SNAPSHOT</version> <configuration> <!-- Following properties come from maven profile in ~/.m2/settings.xml --> <url>${pricefx-stream.url}</url> <partition>${pricefx-stream.partition}</partition> <username>${pricefx-stream.username}</username> <password>${pricefx-stream.password}</password> </configuration> </plugin> <!-- ... --> </plugins> </build> <!-- ... --> </project>

Next Steps

Now that you have added the plugin to your project, you are ready to add the Pricefx partition connection information to a Maven profile.

Found an issue in documentation? Write to us.