Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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

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

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

Code Block
languagexml
themeMidnight
titlepom.xml
linenumbersfalse
<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:

Code Block
languagexml
themeMidnight
titlepom.xml
linenumbersfalse
<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:

Code Block
languagexml
themeMidnight
titlepom.xml
linenumbersfalse
<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.