Build publishers with Maven
The Diffusion™ API for publishers is not available in the Push Technology public Maven™ repository. To build publishers, you must install the product locally and depend on diffusion.jar using a Maven system scope.
DAR files
The preferred way to deploy publishers is to build them into a DAR. DARs are JAR format files that contain compiled code, libraries, and configuration. They have a similar purpose to Java™ EE EAR or WAR files, and can be dynamically deployed to and undeployed from a running Diffusion server
- The META-INF directory contains the
MANIFEST.MF file.
This file contains an attribute, Diffusion-Version, which specifies the minimum version number of Diffusion on which this publisher runs. This prevents deployment of publishers to Diffusion instances which might not support features of the publisher or have different API signatures.
Manifest-Version: 1.0 Diffusion-Version: 6.2.8
- The etc directory can contain the following files.
- etc/Publishers.xml
- You must include this file.
The Publishers.xml file has the same structure and the one in a Diffusion installation's etc directory. For more information, see .
For example:<publishers> <publisher name="MyPublisher"> <class>com.pushtechnology.diffusion.test.publisher.MyPublisher</class> <start>true</start> <enabled>true</enabled> </publisher> </publishers>
- etc/Aliases.xml (optional)
- Include this file if there are associated HTML files.
- etc/SubscriptionValidationPolicy.xml
- Include this file if it is referenced from the etc/Publishers.xml file.
- The ext directory contains all Java code required by your publisher.
You can also include any required third-party JAR files or resources in this folder.
- The html is optional and can contain any HTML files or web assets required by the publisher.
mvndar
Example: Using Maven to build the demo applications
If you selected the demo applications when you installed Diffusion, the source files and an example Maven pom.xml can be found in the directories beneath the demos/src directory. The example uses mvndar, and depends on diffusion.jar using system scope.
For more information, see .
This page last modified: 2015/04/30