Last active
June 19, 2019 11:59
-
-
Save AM-csx/63f63c5166345cb398ddcb3a90287037 to your computer and use it in GitHub Desktop.
[KoSIT-Validationtool] Validator does not work correctly when packaged as jar within other application
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example.KositValidationDemo; | |
import de.kosit.validationtool.api.Check; | |
import de.kosit.validationtool.api.CheckConfiguration; | |
import de.kosit.validationtool.impl.DefaultCheck; | |
import org.springframework.boot.SpringApplication; | |
import org.springframework.boot.autoconfigure.SpringBootApplication; | |
import org.springframework.context.annotation.Bean; | |
import org.springframework.util.ResourceUtils; | |
import java.io.FileNotFoundException; | |
import java.net.URI; | |
import java.net.URISyntaxException; | |
@SpringBootApplication | |
public class KositValidationDemoApplication { | |
public static void main(String[] args) { | |
SpringApplication.run(KositValidationDemoApplication.class, args); | |
} | |
@Bean | |
public Check kositValidationCheck() throws FileNotFoundException, URISyntaxException { | |
URI scenariosUri = ResourceUtils.toURI(ResourceUtils.getURL("classpath:XRechnung/v1_2/kosit-validation/scenarios.xml")); | |
CheckConfiguration checkConfiguration = new CheckConfiguration(scenariosUri); | |
return new DefaultCheck(checkConfiguration); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<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> | |
<parent> | |
<groupId>org.springframework.boot</groupId> | |
<artifactId>spring-boot-starter-parent</artifactId> | |
<version>2.1.6.RELEASE</version> | |
<relativePath/> <!-- lookup parent from repository --> | |
</parent> | |
<groupId>com.example</groupId> | |
<artifactId>KositValidationDemo</artifactId> | |
<version>0.0.1-SNAPSHOT</version> | |
<name>KositValidationDemo</name> | |
<description>Demo project for Spring Boot</description> | |
<properties> | |
<java.version>11</java.version> | |
<maven.compiler.target>11</maven.compiler.target> | |
<maven.compiler.source>11</maven.compiler.source> | |
<maven.build.timestamp.format>yyyyMMdd-HHmm</maven.build.timestamp.format> | |
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | |
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> | |
<maven.javadoc.skip>true</maven.javadoc.skip> | |
<maven.source.skip>true</maven.source.skip> | |
<maven.compiler.plugin.version>3.8.1</maven.compiler.plugin.version> | |
<maven.enforcer.plugin.version>1.4.1</maven.enforcer.plugin.version> | |
<maven.release.plugin.version>2.5.3</maven.release.plugin.version> | |
<maven.resources.version>3.1.0</maven.resources.version> | |
<org.apache.cxf.version>3.3.0</org.apache.cxf.version> | |
<de.kosit.version>v1.0.2</de.kosit.version> | |
</properties> | |
<repositories> | |
<repository> | |
<id>jitpack.io</id> | |
<url>https://jitpack.io</url> | |
</repository> | |
</repositories> | |
<dependencies> | |
<dependency> | |
<groupId>org.springframework.boot</groupId> | |
<artifactId>spring-boot-starter-web</artifactId> | |
</dependency> | |
<dependency> | |
<groupId>org.apache.cxf</groupId> | |
<artifactId>cxf-xjc-plugin</artifactId> | |
<version>${org.apache.cxf.version}</version> | |
</dependency> | |
<dependency> | |
<groupId>com.github.itplr-kosit</groupId> | |
<artifactId>validator</artifactId> | |
<version>${de.kosit.version}</version> | |
</dependency> | |
</dependencies> | |
<build> | |
<plugins> | |
<plugin> | |
<groupId>org.springframework.boot</groupId> | |
<artifactId>spring-boot-maven-plugin</artifactId> | |
</plugin> | |
</plugins> | |
</build> | |
</project> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment