Skip to content

Development

Philip Helger edited this page May 8, 2024 · 5 revisions

This page encapsulates the most relevant aspects on development with phase4

Submodules

phase4 currently consists of the following submodules:

  • phase4-lib - basic data structures for AS4 handling, sending and receiving
  • phase4-profile-... - AS4 profile for ... as well as the PMode and the respective validation
  • phase4-test - integration test project
  • phase4-server-webapp - Standalone AS4 server for demo purposes
  • phase4-dynamic-discovery - a shared library that contains common stuff for dynamic discovery using SML and SMP
  • phase4-...-client - a specific client to send messages using the ... profile
  • phase4-peppol-servlet - a specific servlet that can be used to receive messages from Peppol
  • phase4-peppol-server-webapp - a simple standalone Peppol AS4 server for demo purposes
  • phase4-spring-boot-demo - an example how to integrate phase4 with Spring Boot

Usage with Maven

If you want to use phase4 with Maven I suggest the following way:

  1. add the BOM into your <dependencyManagement> section and
  2. add the main artefacts without version in the <dependency> block to have a consistent versioning:
<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/maven-v4_0_0.xsd">
...
  <dependencyManagement>
    <dependencies>
...
      <!-- step 1 -->
      <dependency>
        <groupId>com.helger.phase4</groupId>
        <artifactId>phase4-parent-pom</artifactId>
        <version>x.y.z</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
...
    </dependencies>
  </dependencyManagement>
...
  <dependencies>
...
    <!-- step 2 -->
    <dependency>
      <groupId>com.helger.phase4</groupId>
      <artifactId>phase4-lib</artifactId>
    </dependency>
    <dependency>
      <groupId>com.helger.phase4</groupId>
      <artifactId>phase4-profile-peppol</artifactId>
    </dependency>
...
  </dependencies>
...
</project>

Building from source

Apache Maven needed v3.6 or later and Java JDK 11 or later is required. The solution is developed with Adoptium formerly known as AdoptOpenJDK.

To build the whole package on the commandline use mvn clean install -U.

If you are importing this into your IDE and you get build errors, it maybe necessary to run mvn process-sources once in the phase4-lib subproject. Afterwards the folder target/generated-sources/xjc must be added to the source build path. When building only on the commandline, this is done automatically.

Dependencies

The following tables show the runtime dependencies of the different submodules. The order is alphabetical by the artefact name. Dependencies only needed for testing are NOT shown (e.g. JUnit).

Dependencies phase4-lib

The phase4-lib depends at runtime on the following libraries:

Artefact Vendor URL
org.eclipse.angus:angus-activation Eclipse Foundation AISBL https://eclipse-ee4j.github.io/angus-activation/
org.eclipse.angus:angus-mail Eclipse Foundation AISBL https://eclipse-ee4j.github.io/angus-mail/
org.bouncycastle:bcmail-jdk18on The Legion of the Bouncy Castle https://www.bouncycastle.org/
org.bouncycastle:bcpkix-jdk18on The Legion of the Bouncy Castle https://www.bouncycastle.org/
org.bouncycastle:bcprov-jdk18on The Legion of the Bouncy Castle https://www.bouncycastle.org/
org.bouncycastle:bcutil-jdk18on The Legion of the Bouncy Castle https://www.bouncycastle.org/
commons-codec:commons-codec Apache Software Foundation https://commons.apache.org/proper/commons-codec/
org.cryptacular:cryptacular Virginia Tech https://www.cryptacular.org/download.html
org.apache.httpcomponents:client5 Apache Software Foundation https://hc.apache.org/
org.apache.httpcomponents.core5:httpcore5 Apache Software Foundation https://hc.apache.org/
org.apache.httpcomponents.core5:httpcore5-h2 Apache Software Foundation https://hc.apache.org/
jakarta.activation:jakarta.activation-api Eclipse Foundation AISBL https://jakarta.ee/specifications/activation/
jakarta.mail:jakarta.mail-api Eclipse Foundation AISBL https://jakarta.ee/specifications/mail/
jakarta.servlet:jakarta.servlet-api Eclipse Foundation AISBL https://jakarta.ee/specifications/servlet/
jakarta.xml.bind:jakarta.xml.bind-api Eclipse Foundation AISBL https://jakarta.ee/specifications/xml-binding/
org.jasypt:jasypt jasypt Team http://www.jasypt.org/
org.sl4j:jcl-over-slf4j QOS.ch https://www.slf4j.org/
com.google.code.findbugs:jsr305 Findbugs team none
org.sl4j:jul-to-slf4j QOS.ch https://www.slf4j.org/
com.helger.commons:ph-bc Philip Helger https://github.com/phax/ph-commons
com.helger.commons:ph-collection Philip Helger https://github.com/phax/ph-commons
com.helger.commons:ph-commons Philip Helger https://github.com/phax/ph-commons
com.helger.commons:ph-config Philip Helger https://github.com/phax/ph-commons
com.helger.commons:ph-dao Philip Helger https://github.com/phax/ph-commons
com.helger.commons:ph-datetime Philip Helger https://github.com/phax/ph-commons
com.helger.web:ph-http Philip Helger https://github.com/phax/ph-web
com.helger.web:ph-httpclient Philip Helger https://github.com/phax/ph-web
com.helger.commons:ph-jaxb Philip Helger https://github.com/phax/ph-commons
com.helger.commons:ph-jaxb-adapter Philip Helger https://github.com/phax/ph-commons
com.helger.commons:ph-json Philip Helger https://github.com/phax/ph-commons
com.helger.web:ph-mail Philip Helger https://github.com/phax/ph-web
com.helger.masterdata:ph-masterdata Philip Helger https://github.com/phax/ph-masterdata
com.helger.schedule:ph-mini-quartz Philip Helger https://github.com/phax/ph-schedule
com.helger.web:ph-network Philip Helger https://github.com/phax/ph-web
com.helger.photon:ph-oton-audit Philip Helger https://github.com/phax/ph-oton
com.helger.photon:ph-oton-io Philip Helger https://github.com/phax/ph-oton
com.helger.photon:ph-oton-security Philip Helger https://github.com/phax/ph-oton
com.helger.schedule:ph-schedule Philip Helger https://github.com/phax/ph-schedule
com.helger.commons:ph-scopes Philip Helger https://github.com/phax/ph-commons
com.helger.commons:ph-security Philip Helger https://github.com/phax/ph-commons
com.helger.web:ph-servlet Philip Helger https://github.com/phax/ph-web
com.helger.masterdata:ph-tenancy Philip Helger https://github.com/phax/ph-masterdata
com.helger.web:ph-useragent Philip Helger https://github.com/phax/ph-web
com.helger.web:ph-web Philip Helger https://github.com/phax/ph-web
com.helger.commons:ph-xml Philip Helger https://github.com/phax/ph-commons
com.helger.xsd:ph-xsds-xlink Philip Helger https://github.com/phax/ph-xsds
com.helger.xsd:ph-xsds-xml Philip Helger https://github.com/phax/ph-xsds
com.helger.xsd:ph-xsds-xmldsig Philip Helger https://github.com/phax/ph-xsds
com.helger.web:ph-xservlet Philip Helger https://github.com/phax/ph-web
org.sl4j:slf4j-api QOS.ch https://www.slf4j.org/
com.github.spotbugs:spotbugs-annotations Spotbugs Team https://spotbugs.github.io/
org.apache.wss4j:wss4j-ws-security-common Apache Software Foundation https://ws.apache.org/wss4j/
org.apache.wss4j:wss4j-ws-security-dom Apache Software Foundation https://ws.apache.org/wss4j/
org.apache.santuario:xmlsec Apache Software Foundation https://santuario.apache.org/

Dependencies phase4-peppol-client

The submodule phase4-peppol-client adds the following libraries on top of phase4-lib:

Artefact Vendor URL
dnsjava:dnsjava dnsjava Team https://github.com/dnsjava/dnsjava
jakarta.xml.soap:jakarta.xml.soap-api Eclipse Foundation AISBL https://jakarta.ee/specifications/soap-attachments/
jakarta.xml.ws:jakarta.xml.ws-api Eclipse Foundation AISBL https://jakarta.ee/specifications/xml-web-services/
com.helger.peppol:peppol-commons Philip Helger https://github.com/phax/peppol-commons
com.helger.peppol:peppol-id Philip Helger https://github.com/phax/peppol-commons
com.helger.peppol:peppol-id-datatypes Philip Helger https://github.com/phax/peppol-commons
com.helger.peppol:peppol-reporting-api Philip Helger https://github.com/phax/peppol-reporting
com.helger.peppol:peppol-sbdh Philip Helger https://github.com/phax/peppol-commons
com.helger.peppol:peppol-smp-client Philip Helger https://github.com/phax/peppol-commons
com.helger.peppol:peppol-smp-datatypes Philip Helger https://github.com/phax/peppol-commons
com.helger.cii:ph-cii-d16b Philip Helger https://github.com/phax/ph-cii
com.helger.diver:ph-diver-api Philip Helger https://github.com/phax/ph-diver
com.helger.web:ph-dns Philip Helger https://github.com/phax/ph-web
com.helger.phive:phive-api Philip Helger https://github.com/phax/ph-phive
com.helger.phive.rules:phive-rules-peppol Philip Helger https://github.com/phax/ph-phive-rules
com.helger.phive:phive-xml Philip Helger https://github.com/phax/ph-phive
com.helger:ph-sbdh Philip Helger https://github.com/phax/ph-sbdh
com.helger.schematron:ph-schematron-api Philip Helger https://github.com/phax/ph-schematron
com.helger.schematron:ph-schematron-pure Philip Helger https://github.com/phax/ph-schematron
com.helger.schematron:ph-schematron-schxslt Philip Helger https://github.com/phax/ph-schematron
com.helger.schematron:ph-schematron-xslt Philip Helger https://github.com/phax/ph-schematron
com.helger.ubl:ph-ubl21 Philip Helger https://github.com/phax/ph-ubl
com.helger.ubl:ph-ubl23 Philip Helger https://github.com/phax/ph-ubl
com.helger.xsd:ph-xsds-bdxr-smp1 Philip Helger https://github.com/phax/ph-xsds
com.helger.xsd:ph-xsds-bdxr-smp2 Philip Helger https://github.com/phax/ph-xsds
com.helger.xsd:ph-xsds-ccts-cct-schemamodule Philip Helger https://github.com/phax/ph-xsds
com.helger.xsd:ph-xsds-wsaddr Philip Helger https://github.com/phax/ph-xsds
com.helger.xsd:ph-xsds-xades132 Philip Helger https://github.com/phax/ph-xsds
com.helger.xsd:ph-xsds-xades141 Philip Helger https://github.com/phax/ph-xsds
com.helger.xsd:ph-xsds-xmldsig11 Philip Helger https://github.com/phax/ph-xsds
net.sf.saxon:Saxon-HE Saxonica https://github.com/Saxonica/Saxon-HE
name.dmaus.schxslt:schxslt David Maus https://github.com/schxslt
org.xmlresolver:xmlresolver Norman Walsh https://github.com/xmlresolver/

Dependencies phase4-peppol-servlet

The submodule phase4-peppol-servlet adds the following libraries on top of phase4-lib:

Artefact Vendor URL
dnsjava:dnsjava dnsjava Team https://github.com/dnsjava/dnsjava
jakarta.xml.soap:jakarta.xml.soap-api Eclipse Foundation AISBL https://jakarta.ee/specifications/soap-attachments/
jakarta.xml.ws:jakarta.xml.ws-api Eclipse Foundation AISBL https://jakarta.ee/specifications/xml-web-services/
com.helger.peppol:peppol-commons Philip Helger https://github.com/phax/peppol-commons
com.helger.peppol:peppol-id Philip Helger https://github.com/phax/peppol-commons
com.helger.peppol:peppol-id-datatypes Philip Helger https://github.com/phax/peppol-commons
com.helger.peppol:peppol-reporting-api Philip Helger https://github.com/phax/peppol-reporting
com.helger.peppol:peppol-sbdh Philip Helger https://github.com/phax/peppol-commons
com.helger.peppol:peppol-smp-client Philip Helger https://github.com/phax/peppol-commons
com.helger.peppol:peppol-smp-datatypes Philip Helger https://github.com/phax/peppol-commons
com.helger.web:ph-dns Philip Helger https://github.com/phax/ph-web
com.helger:ph-sbdh Philip Helger https://github.com/phax/ph-sbdh
com.helger.xsd:ph-xsds-bdxr-smp1 Philip Helger https://github.com/phax/ph-xsds
com.helger.xsd:ph-xsds-bdxr-smp2 Philip Helger https://github.com/phax/ph-xsds
com.helger.xsd:ph-xsds-ccts-cct-schemamodule Philip Helger https://github.com/phax/ph-xsds
com.helger.xsd:ph-xsds-wsaddr Philip Helger https://github.com/phax/ph-xsds
com.helger.xsd:ph-xsds-xades132 Philip Helger https://github.com/phax/ph-xsds
com.helger.xsd:ph-xsds-xades141 Philip Helger https://github.com/phax/ph-xsds
com.helger.xsd:ph-xsds-xmldsig11 Philip Helger https://github.com/phax/ph-xsds