***************************************************** ***************************************************** ***************************************************** ***************************************************** ***************************************************** ********************** WARNING ********************** ********************** WARNING ********************** ********************** WARNING ********************** ********************** WARNING ********************** ********************** WARNING ********************** ********************** WARNING ********************** ********************** WARNING ********************** ********************** WARNING ********************** ********************** WARNING ********************** ********************** WARNING ********************** This Confluence article was automatically generated from Asciidoc. Any changes you make to this document will be overridden! If you want to change the content, consider leaving a comment. You can edit the content directly here: https://gitlab.pricefx.eu/training/pricefx-knowledge-base/-/tree/dev/public/content/docs/tools/pricefx-maven-plugin/add-to-project ***************************************************** ***************************************************** ***************************************************** ***************************************************** ***************************************************** ********************** WARNING ********************** ********************** WARNING ********************** ********************** WARNING ********************** ********************** WARNING ********************** ********************** WARNING ********************** ********************** WARNING ********************** ********************** WARNING ********************** ********************** WARNING ********************** ********************** WARNING ********************** ********************** WARNING **********************
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):
<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:
<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:
<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> |
Now that you have added the plugin to your project, you are ready to add the Pricefx partition connection information to a Maven profile.