Build server application code with Maven
The Diffusion™ API for server application code is not available in the DiffusionData public Maven™ repository. To build server components, you must install the product locally and depend on diffusion.jar using a Maven system scope.
The following pom.xml shows to declare the dependency on
diffusion.jar. To use it, you must set the
DIFFUSION_HOME environment variable to the absolute file path
of your
Diffusion
installation.
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.examplecorp</groupId> <artifactId>mypublisher</artifactId> <version>1.0-SNAPSHOT</version> <dependencyManagement> <dependency> <groupId>com.pushtechnology.diffusion</groupId> <artifactId>diffusion</artifactId> <version>local-installation</version> </dependency> </dependencyManagement> <profiles> <profile> <activation> <property> <name>env.DIFFUSION_HOME</name> </property> </activation> <dependencyManagement> <dependencies> <dependency> <groupId>com.pushtechnology.diffusion</groupId> <artifactId>diffusion</artifactId> <version>local-installation</version> <scope>system</scope> <systemPath>${DIFFUSION_HOME}/lib/diffusion.jar</systemPath> </dependency> </dependencies> </dependencyManagement> </profile> </profiles> </project>