You need the Java™ libraries and Maven plug-ins to build decision service archives or
execute decision services with the execution Java API. They cannot be deployed to the Maven central
repository. You can configure Maven to connect to Decision Designer, and use Decision Designer as a Maven
repository.
About this task
To run the command in the command line, you must allow your local Maven to connect to Decision Designer to download the
necessary dependencies.
Procedure
-
Configure Maven to connect to Decision Designer.
In the local
$HOME/.m2/settings.xml file, add a
repository:
<repositories>
<repository>
<id>ads-maven</id>
<name>ADS maven repository</name>
<url>https://<zen_hostname>:<zen_port>/ads/static/maven-releases</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
If you need to use the Maven plug-ins, add the following item as
well:
<pluginRepositories>
<pluginRepository>
<id>ads-maven</id>
<name>ADS maven repository</name>
<url>https://<zen_hostname>:<zen_port>/ads/static/maven-releases</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
The Maven command or the underlying JVM must trust the Zen certificate, if it is self-signed.
- Configure the authentication to the server with a Zen API key:
<server>
<id>ads-maven</id>
<configuration>
<httpHeaders>
<property>
<name>Authorization</name>
<value>ZenApiKey %YOUR API KEY HERE%</value>
</property>
</httpHeaders>
</configuration>
</server>
For more information about the Zen API key, see Authorizing HTTP
requests by using the Zen API key.
Results
When the local settings.xml file is configured, the mvn clean
install command in a Maven project uses the Java libraries from Decision Designer.