The PD4ML Maven Repositories contain artifacts that you may require to compile, test, package, perform integration testing, or deploy PD4ML-enabled applications.
   

Including regular PD4ML artifact to Maven project

Maven projects are defined with Maven Project Object Model (POM) file named pom.xml. Among other things, this file gives dependencies that a project has on external libraries - in our case on PD4ML.   You must define a groupId, artifactId and version for PD4ML. For PD4ML v4 the parameters are:
  • groupId: com.pd4ml
  • artifactId: pd4ml
  • version: 4.0.0+
pom.xml
<project>
...
<dependencies>
...
	<dependency>
		<groupId>com.pd4ml</groupId>
		<artifactId>pd4ml</artifactId>
		<version>[4.0.0,)</version>
	</dependency>
</dependencies>
</project>
You must also add a repository definition to Maven, as PD4ML is not in any public Maven repository. Add the definition to your Maven settings.xml file or to your pom.xml files, or both. The repository definition may look like the following: settings.xml
<settings>
  ...
  <profiles>
    <profile>
      <id>main</id>
      <repositories>
        <repository>
          <id>pd4ml</id>
          <name>PD4ML Repository</name>
          <url>https://pd4ml.tech/maven2/</url>
          <snapshots>
            <enabled>true</enabled>
          </snapshots>
        </repository>
      </repositories>
    </profile>
  </profiles>
  ...
</settings>
...
<activeprofiles>
    <activeprofile>main</activeprofile>
</activeprofiles>
The repository URL is https://pd4ml.tech/maven2/. Access is only provided over HTTPS.

Using PD4ML library with source code

PD4ML Source Code Maven repository provides an access to the same PD4ML library binaries plus additional JARs with the product source code. PD4ML artifact is identified identically: pom.xml
<project>
	...
	<dependencies>
		...
		<dependency>
			<groupId>com.pd4ml</groupId>
			<artifactId>pd4ml</artifactId>
			<version>[4.0.0,)</version>
		</dependency>
	</dependencies>
</project>
PD4ML Source Code Maven repository URL is https://pd4ml.tech/maven2-src/   Every time you want to access the PD4ML Source Code Maven Repository, you must provide the user name and the password from your license. You can store your credentials in the Maven settings file so that you do not have to specify them manually every time. settings.xml
<settings>
  ...
  <servers>
    ...
    <server>
      <id>pd4ml-src</id>
      <username>LOGIN</username> <!-- credentials from PD4ML license -->
      <password>PASSWORD</password>
    </server>
  </servers>
  ...
  <profiles>
    <profile>
      <id>main</id>
      <repositories>
        <repository>
          <id>pd4ml-src</id>
          <name>PD4ML Repository</name>
          <url>https://pd4ml.tech/maven2-src/</url>
          <snapshots>
            <enabled>true</enabled>
          </snapshots>
        </repository>
      </repositories>
    </profile>
  </profiles>
</settings>
  <activeprofiles>
    <activeprofile>main</activeprofile>
  </activeprofiles>

Replace the <LOGIN> and <PASSWORD> entries with PD4ML license user name and password. We strongly recommend that you encrypt your password using the standard Maven encryption mechanisms, as described in the following: http://maven.apache.org/guides/mini/guide-encryption.html