Skip to content

Commit

Permalink
Update phive dependencies for peppol validation of the May 2025 rules
Browse files Browse the repository at this point in the history
  • Loading branch information
eivinhb committed Aug 13, 2024
1 parent bad3057 commit 31c2257
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 29 deletions.
25 changes: 13 additions & 12 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,15 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<maven.compiler.release>11</maven.compiler.release>
</properties>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.junit</groupId>
<artifactId>junit-bom</artifactId>
<version>5.5.2</version>
<version>5.10.3</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand All @@ -53,12 +54,12 @@
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.30</version>
<version>2.0.16</version>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest</artifactId>
<version>2.2-rc1</version>
<version>3.0</version>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down Expand Up @@ -97,7 +98,7 @@
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M3</version>
<version>3.3.1</version>
<configuration>
<argLine>-Djava.util.logging.config.file=/logging.properties</argLine>
</configuration>
Expand All @@ -119,21 +120,21 @@
</plugin>
<plugin>
<artifactId>maven-install-plugin</artifactId>
<version>3.0.0-M1</version>
<version>3.1.1</version>
</plugin>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>3.0.0-M1</version>
<version>3.1.2</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>versions-maven-plugin</artifactId>
<version>2.7</version>
<version>2.17.1</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.6.0</version>
<version>3.3.0</version>
</plugin>
<plugin>
<groupId>com.github.siom79.japicmp</groupId>
Expand All @@ -159,15 +160,15 @@
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<version>3.13.0</version>
<configuration>
<source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target>
</configuration>
</plugin>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.1.2</version>
<version>3.7.1</version>
<executions>
<execution>
<goals>
Expand Down Expand Up @@ -217,8 +218,8 @@
</plugin>
<plugin>
<groupId>org.jasig.maven</groupId>
<artifactId>maven-notice-plugin</artifactId>
<version>1.1.0</version>
<artifactId>notice-maven-plugin</artifactId>
<version>2.0.0</version>
<configuration>
<excludeOptional>true</excludeOptional>
<excludeScopes>
Expand Down
7 changes: 4 additions & 3 deletions validation/NOTICE
Original file line number Diff line number Diff line change
Expand Up @@ -18,32 +18,33 @@ This project includes:
Apache HttpComponents Core HTTP/2 under Apache License, Version 2.0
Eaxy Easy XML library under The Apache Licence, version 2.0
FindBugs-jsr305 under The Apache Software License, Version 2.0
Jakarta Activation API jar under EDL 1.0
Jakarta Activation API under EDL 1.0
Jakarta XML Binding API under Eclipse Distribution License - v 1.0
jsr305 under GNU Lesser Public License
peppol-bis-billing-3-generator-domain under Apache License, Version 2.0
peppol-bis-billing-3-generator-validation under Apache License, Version 2.0
ph-cii-d16b under Apache 2
ph-commons under Apache 2
ph-diver-api under Apache 2
ph-jaxb under Apache 2
ph-jaxb-adapter under Apache 2
ph-schematron-api under Apache 2
ph-schematron-pure under Apache 2
ph-schematron-schxslt under Apache 2
ph-schematron-xslt under Apache 2
ph-ubl21 under Apache 2
ph-ubl23 under Apache 2
ph-xml under Apache 2
ph-xsds-ccts-cct-schemamodule under Apache 2
ph-xsds-xades132 under Apache 2
ph-xsds-xades141 under Apache 2
ph-xsds-xml under Apache 2
ph-xsds-xmldsig under Apache 2
phive-api under Apache 2
phive-engine under Apache 2
phive-rules-peppol under Apache 2
phive-xml under Apache 2
Saxon-HE under Mozilla Public License Version 2.0
SchXslt Core under MIT License
SLF4J API Module under MIT License
XML Commons External Components XML APIs under The Apache Software License, Version 2.0 or The SAX License or The W3C License
XML Resolver under Apache License version 2.0

15 changes: 10 additions & 5 deletions validation/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,23 +21,28 @@
<dependency>
<groupId>com.helger.commons</groupId>
<artifactId>ph-commons</artifactId>
<version>11.0.1</version>
<version>11.1.6</version>
</dependency>
<dependency>
<groupId>com.helger.phive.rules</groupId>
<artifactId>phive-rules-peppol</artifactId>
<version>2.1.18</version>
<version>3.1.12</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.helger.diver</groupId>
<artifactId>ph-diver-api</artifactId>
<version>1.2.0</version>
</dependency>
<dependency>
<groupId>com.helger.phive</groupId>
<artifactId>phive-engine</artifactId>
<version>7.2.4</version>
<artifactId>phive-xml</artifactId>
<version>9.2.2</version>
</dependency>
<dependency>
<groupId>com.helger.phive</groupId>
<artifactId>phive-api</artifactId>
<version>7.2.4</version>
<version>9.2.2</version>
</dependency>
<dependency>
<groupId>org.eaxy</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@

import com.helger.commons.error.list.ErrorList;
import com.helger.commons.io.resource.inmemory.ReadableResourceString;
import com.helger.diver.api.version.VESID;
import com.helger.phive.api.execute.ValidationExecutionManager;
import com.helger.phive.api.executorset.IValidationExecutorSet;
import com.helger.phive.api.executorset.VESID;
import com.helger.phive.api.executorset.IValidationExecutorSetRegistry;
import com.helger.phive.api.executorset.ValidationExecutorSetRegistry;
import com.helger.phive.api.result.ValidationResultList;
import com.helger.phive.engine.source.IValidationSourceXML;
import com.helger.phive.engine.source.ValidationSourceXML;
import com.helger.phive.peppol.PeppolValidation;
import com.helger.phive.peppol.PeppolValidation3_14_0;
import com.helger.phive.peppol.PeppolValidation3_15_0;
import com.helger.phive.peppol.PeppolValidation2024_05;
import com.helger.phive.xml.source.IValidationSourceXML;
import com.helger.phive.xml.source.ValidationSourceXML;
import org.eaxy.Document;
import peppol.bis.invoice3.domain.BillingCommon;
import peppol.bis.invoice3.domain.CreditNote;
Expand All @@ -41,15 +41,15 @@

public class DefaultPeppolBilling3Validation implements PeppolBilling3Validation {

private static ValidationExecutorSetRegistry<IValidationSourceXML> validationExecutorSetRegistry;
private static IValidationExecutorSetRegistry<IValidationSourceXML> validationExecutorSetRegistry;
private static VESID vesid_invoice;
private static VESID vesid_creditNote;

{
if (vesid_invoice == null)
DefaultPeppolBilling3Validation.setVesid_invoice(PeppolValidation3_15_0.VID_OPENPEPPOL_INVOICE_UBL_V3);
DefaultPeppolBilling3Validation.setVesid_invoice(PeppolValidation2024_05.VID_OPENPEPPOL_INVOICE_UBL_V3);
if (vesid_creditNote == null)
DefaultPeppolBilling3Validation.setVesid_creditNote(PeppolValidation3_15_0.VID_OPENPEPPOL_CREDIT_NOTE_UBL_V3);
DefaultPeppolBilling3Validation.setVesid_creditNote(PeppolValidation2024_05.VID_OPENPEPPOL_CREDIT_NOTE_UBL_V3);
}

@Override
Expand Down Expand Up @@ -86,7 +86,7 @@ public ValidationResult isValid(Document billingDocument) {

private ValidationResult doValidation(IValidationExecutorSet<IValidationSourceXML> aVES, String s) {
// Shortcut introduced in v6
final ValidationSourceXML validationSourceXML = ValidationSourceXML.create(new ReadableResourceString(s, StandardCharsets.UTF_8));
final IValidationSourceXML validationSourceXML = ValidationSourceXML.create(new ReadableResourceString(s, StandardCharsets.UTF_8));

final ValidationResultList vResult = ValidationExecutionManager.executeValidation(aVES, validationSourceXML);
if (vResult.containsAtLeastOneError()) {
Expand Down

0 comments on commit 31c2257

Please sign in to comment.