***************************************************** ***************************************************** ***************************************************** ***************************************************** ***************************************************** ********************** 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/connect-to-partition ***************************************************** ***************************************************** ***************************************************** ***************************************************** ***************************************************** ********************** WARNING ********************** ********************** WARNING ********************** ********************** WARNING ********************** ********************** WARNING ********************** ********************** WARNING ********************** ********************** WARNING ********************** ********************** WARNING ********************** ********************** WARNING ********************** ********************** WARNING ********************** ********************** WARNING **********************

Before you can use the Stream Maven plugin, you must set up connection to your remote partition.

The partition connection can be stored:

  • Directly in pom.xml;

  • or in a Maven profile in the file ~/.m2/settings.xml.

We recommend to use Maven profiles because you can easily switch between connections to more partitions with IntelliJ’s integrated Maven plugin.

switching profiles

Define settings.xml

Maven settings file is located in ~/.m2/settings.xml ("~" denotes your home directory). If you do not have the Maven settings file yet, create a new file with the following content:

<settings
        xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.1.0 http://maven.apache.org/xsd/settings-1.1.0.xsd"
        xmlns="http://maven.apache.org/SETTINGS/1.1.0"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>
    <profiles>

        <!-- here goes profile 1 -->
        <!-- here goes profile 2 -->
        <!-- here goes profile 3 -->

    </profiles>
</settings>

Add a new profile to your ~/.m2/settings.xml file (i the <profiles> tag), and fill in the URL and credentials for your Pricefx partition:

<profile>
    <id>my-pricefx-partition-connection-profile</id>
    <properties>
        <pricefx-stream.url>https://...</pricefx-stream.url>
        <pricefx-stream.partition>...</pricefx-stream.partition>
        <pricefx-stream.username>...</pricefx-stream.username>
        <pricefx-stream.password>...</pricefx-stream.password>
    </properties>
</profile>
For a profile ID, you can use the name of the partition or any description of the partition.

Save the changes in the file.

The new profile should appear in the list of Maven profiles. If not, use the 🔄 Reload the Maven Projects button (rotating arrows icon) to reload the settings. Revisit the screenshot above to see the icon.

Next Steps

Now that you have added the plugin to your project and set up a connection to your Pricefx partition, you are ready to use the plugin.