diff --git a/History.md b/History.md index bf1885ee..3d9c58d4 100644 --- a/History.md +++ b/History.md @@ -10,7 +10,8 @@ done - 2.1 now default - pushprovider -- integrates ZUV +- integrates validator +- validator now additionally supports xrechnung - integrates mustangserver - modular project setup diff --git a/Mustang-Server/Dockerfile b/Mustang-Server/Dockerfile deleted file mode 100644 index 111ce122..00000000 --- a/Mustang-Server/Dockerfile +++ /dev/null @@ -1,37 +0,0 @@ -# See https://docs.docker.com/engine/userguide/eng-image/multistage-build/ -# to build please run -# sudo docker build --tag mustang:2.0 . -# to start please run -# sudo docker run --publish 8080:8080 --detach --name mustang mustang:2.0 -# takes around 15s to start up, afterwards access http://127.0.0.1:8080 -# to remove please run -# sudo docker rm --force mustang - -FROM openjdk:8-jdk-alpine as builder -WORKDIR /build -RUN apk --no-cache add openjdk11 --repository=http://dl-cdn.alpinelinux.org/alpine/edge/community -RUN apk --update add git maven -RUN git clone https://github.com/ZUGFeRD/mustangproject.git -RUN cd mustangproject && mvn clean package - - -FROM openjdk:8-jre-alpine as runner - -ENV MUSTANG_VERSION=2.0.0-SNAPSHOT - -# Since this is a running network service we'll create an unprivileged account -# which will be used to perform the rest of the work and run the actual service: - -# Debian: -# RUN useradd --system --user-group --home-dir=/opt/mustang mustang -# Alpine / Busybox: -RUN install -d -o root -g root -m 755 /opt && adduser -h /opt/mustang -S mustang -USER mustang -WORKDIR /opt/mustang - -COPY --from=builder /build/mustangproject/Mustang-Server/target/Mustang-Server-${MUSTANG_VERSION}.jar /opt/mustang/ -COPY --from=builder /build/mustangproject/Mustang-Server/config.yml /opt/mustang/ -COPY --from=builder /build/mustangproject/Mustang-Server/dwstart.keystore /opt/mustang/ - -EXPOSE 8080 -ENTRYPOINT java -jar /opt/mustang/Mustang-Server-${MUSTANG_VERSION}.jar server config.yml diff --git a/Mustang-Server/History.md b/Mustang-Server/History.md deleted file mode 100644 index d94255a6..00000000 --- a/Mustang-Server/History.md +++ /dev/null @@ -1,14 +0,0 @@ -0.0.2 -===== -2019-09-15 - -- Https support, -- User authentication (for combine method, username good-guy password secret) -- completed mandatory swagger attributes. - - -0.0.1 -===== -2019-08-18 - -Possibility to extract/combine files, swagger support \ No newline at end of file diff --git a/Mustang-Server/LICENSE b/Mustang-Server/LICENSE deleted file mode 100644 index 261eeb9e..00000000 --- a/Mustang-Server/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/Mustang-Server/README.md b/Mustang-Server/README.md deleted file mode 100644 index 5dd6d86c..00000000 --- a/Mustang-Server/README.md +++ /dev/null @@ -1,45 +0,0 @@ -# mustangAPI -A rest API for [Mustangproject](https://www.mustangproject.org), i.e. for ZUGFeRD/Factur-X - -![Screenshot](README_screenshot.png "Screenshot Swagger API") - -## Architecture - -Using a - * [Dropwizard](https://dropwizard.io) and a - * Swagger integration - -Recommended: German 45min Dropwizard/Swagger introduction [video](https://media.ccc.de/v/froscon2017-1985-einfache_rest-apis_mit_dropwizard_und_swagger) and [slides](https://programm.froscon.de/2017/system/event_attachments/attachments/000/000/469/original/20170818_LeanIX_Presentation_Froscon.pdf) from Froscon 2017 - -## Features - - - * Integrates its own (jersey) webserver - * get the API documentation online (Human readable and as OpenAPI) - * try the API in a swagger generated demo web client - * Extract the XML from a ZUGFeRD/Factur-X invoice - * Combine custom XML and a PDF/A-1 file to a ZUGFeRD/Factur-X invoice - -Feel free to send pull requests for more functionality. - -## Compile - -`mvn clean package` - -## Start - -`java -jar target/server-0.0.2-SNAPSHOT.jar server config.yml` - -## Use - -use http://127.0.0.1:8080/swagger to try the methods (https://localhost:8443/swagger would work but is self-signed). -Access http://localhost:8080/swagger.yaml to build your clients. -For demo purposes, extract does not require authentication but combine requires http authentication with user name "good-guy" and password "secret". - -## Support - -Community support is available via the [ZUGFeRD Google Group](https://groups.google.com/forum/?hl=de#!forum/zugferd) - -## Contact - -For commercial and/or legal inquiries contact Jochen Stärk jochen@zugferd.org diff --git a/Mustang-Server/README_screenshot.png b/Mustang-Server/README_screenshot.png deleted file mode 100644 index 53e3ec3f..00000000 Binary files a/Mustang-Server/README_screenshot.png and /dev/null differ diff --git a/Mustang-Server/config.yml b/Mustang-Server/config.yml deleted file mode 100644 index d1943c27..00000000 --- a/Mustang-Server/config.yml +++ /dev/null @@ -1,13 +0,0 @@ -swagger: - resourcePackage: mustang -server: - applicationConnectors: - - type: http - port: 8080 - - type: https - port: 8443 - # keytool -genkeypair -keyalg RSA -dname "CN=localhost" -keystore dwstart.keystore -keypass crimson -storepass crimson - keyStorePath: ./dwstart.keystore - keyStorePassword: "crimson" - validateCerts: false - validatePeers: false \ No newline at end of file diff --git a/Mustang-Server/dwstart.keystore b/Mustang-Server/dwstart.keystore deleted file mode 100644 index 745f3a09..00000000 Binary files a/Mustang-Server/dwstart.keystore and /dev/null differ diff --git a/Mustang-Server/pom.xml b/Mustang-Server/pom.xml deleted file mode 100644 index 5e7bd058..00000000 --- a/Mustang-Server/pom.xml +++ /dev/null @@ -1,147 +0,0 @@ - - - org.mustangproject - core - 2.0.0-SNAPSHOT - - 4.0.0 - org.mustangproject - Mustang-Server - 2.0.0-SNAPSHOT - Mustang Server - A rest API for ZUGFeRD, Factur-X and XRechnung - - UTF-8 - 1.8 - 1.8 - 1.3.12 - - - - - - org.mustangproject - libraryExtended - 2.0.0-SNAPSHOT - - - - io.dropwizard - dropwizard-core - ${dropwizard.version} - - - com.smoketurner - dropwizard-swagger - 1.3.12-1 - - - io.dropwizard - dropwizard-forms - ${dropwizard.version} - pom - - - io.dropwizard - dropwizard-auth - ${dropwizard.version} - pom - - - - - - org.junit - junit5-api - 5.0.0-ALPHA - test - - - org.junit - junit5-engine - 5.0.0-ALPHA - test - - - - org.apache.pdfbox - pdfbox-tools - 2.0.3 - - - net.sf.cssbox - pdf2dom - 1.6 - - - com.itextpdf - itextpdf - 5.5.10 - - - com.itextpdf.tool - xmlworker - 5.5.10 - - - org.apache.poi - poi-ooxml - 3.15 - - - org.apache.poi - poi-scratchpad - 3.15 - - - - - - org.apache.maven.plugins - maven-shade-plugin - 2.3 - - true - - - *:* - - META-INF/*.SF - META-INF/*.DSA - META-INF/*.RSA - - - - - - - - package - - shade - - - - - - - - api.ApiApplication - - - - - - - - - \ No newline at end of file diff --git a/Mustang-Server/src/main/java/api/ApiApplication.java b/Mustang-Server/src/main/java/api/ApiApplication.java deleted file mode 100644 index 1408976b..00000000 --- a/Mustang-Server/src/main/java/api/ApiApplication.java +++ /dev/null @@ -1,51 +0,0 @@ -package api; - -import org.glassfish.jersey.media.multipart.MultiPartFeature; -import org.glassfish.jersey.server.filter.RolesAllowedDynamicFeature; - -import io.dropwizard.Application; -import io.dropwizard.auth.AuthDynamicFeature; -import io.dropwizard.auth.AuthValueFactoryProvider; -import io.dropwizard.auth.basic.BasicCredentialAuthFilter; -import io.dropwizard.setup.Bootstrap; -import io.dropwizard.setup.Environment; -import io.federecio.dropwizard.swagger.SwaggerBundle; -import io.federecio.dropwizard.swagger.SwaggerBundleConfiguration; -import mustang.MustangResource; - -public class ApiApplication extends Application { - public static void main(String[] args) throws Exception { - new ApiApplication().run(args); - } - - @Override - public String getName() { - return "Mustang Server"; - } - - @Override - public void initialize(Bootstrap bootstrap) { - - bootstrap.addBundle(new SwaggerBundle() { - @Override - protected SwaggerBundleConfiguration getSwaggerBundleConfiguration(ApiConfiguration configuration) { - return configuration.swaggerBundleConfiguration; - } - }); - } - - @Override - public void run(ApiConfiguration configuration, Environment environment) { - final MustangResource resource = new MustangResource(); - - environment.jersey() - .register(new AuthDynamicFeature(new BasicCredentialAuthFilter.Builder() - .setAuthenticator(new BasicAuthenticator()).setAuthorizer(new BasicAuthorizer()) - .setRealm("Rest API access").buildAuthFilter())); - environment.jersey().register(RolesAllowedDynamicFeature.class); - environment.jersey().register(new AuthValueFactoryProvider.Binder<>(User.class)); - environment.jersey().register(MultiPartFeature.class); - environment.jersey().register(resource); - } - -} \ No newline at end of file diff --git a/Mustang-Server/src/main/java/api/ApiConfiguration.java b/Mustang-Server/src/main/java/api/ApiConfiguration.java deleted file mode 100644 index 23d7071f..00000000 --- a/Mustang-Server/src/main/java/api/ApiConfiguration.java +++ /dev/null @@ -1,12 +0,0 @@ -package api; -import io.dropwizard.Configuration; -import io.federecio.dropwizard.swagger.SwaggerBundleConfiguration; - -import com.fasterxml.jackson.annotation.JsonProperty; - -public class ApiConfiguration extends Configuration { - - @JsonProperty("swagger") - public SwaggerBundleConfiguration swaggerBundleConfiguration; - -} \ No newline at end of file diff --git a/Mustang-Server/src/main/java/api/BasicAuthenticator.java b/Mustang-Server/src/main/java/api/BasicAuthenticator.java deleted file mode 100644 index c69a5468..00000000 --- a/Mustang-Server/src/main/java/api/BasicAuthenticator.java +++ /dev/null @@ -1,18 +0,0 @@ -package api; - - -import java.util.Optional; - -import io.dropwizard.auth.AuthenticationException; -import io.dropwizard.auth.Authenticator; -import io.dropwizard.auth.basic.BasicCredentials; - -public class BasicAuthenticator implements Authenticator { - @Override - public Optional authenticate(BasicCredentials credentials) throws AuthenticationException { - if ("secret".equals(credentials.getPassword())) { - return Optional.of(new User(credentials.getUsername())); - } - return Optional.empty(); - } -} \ No newline at end of file diff --git a/Mustang-Server/src/main/java/api/BasicAuthorizer.java b/Mustang-Server/src/main/java/api/BasicAuthorizer.java deleted file mode 100644 index ff53d53c..00000000 --- a/Mustang-Server/src/main/java/api/BasicAuthorizer.java +++ /dev/null @@ -1,11 +0,0 @@ -package api; - - -import io.dropwizard.auth.Authorizer; - -public class BasicAuthorizer implements Authorizer { - @Override - public boolean authorize(User user, String role) { - return user.getName().equals("good-guy") && role.equals("ADMIN"); - } -} \ No newline at end of file diff --git a/Mustang-Server/src/main/java/api/User.java b/Mustang-Server/src/main/java/api/User.java deleted file mode 100644 index 67e02a66..00000000 --- a/Mustang-Server/src/main/java/api/User.java +++ /dev/null @@ -1,15 +0,0 @@ -package api; - -import io.dropwizard.auth.PrincipalImpl; - -public class User extends PrincipalImpl { - String username; - - public User(String name) { - super(name); - username=name; - } - - - -} diff --git a/Mustang-Server/src/main/java/mustang/MustangResource.java b/Mustang-Server/src/main/java/mustang/MustangResource.java deleted file mode 100644 index d1eb218e..00000000 --- a/Mustang-Server/src/main/java/mustang/MustangResource.java +++ /dev/null @@ -1,166 +0,0 @@ -package mustang; - -import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; -import java.io.FileInputStream; -import java.io.FileNotFoundException; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.File; -import java.nio.file.*; - -import javax.annotation.security.RolesAllowed; -import javax.ws.rs.Consumes; -import javax.ws.rs.POST; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import javax.ws.rs.core.HttpHeaders; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.Response; - -import org.glassfish.jersey.media.multipart.FormDataContentDisposition; -import org.glassfish.jersey.media.multipart.FormDataParam; -import org.mustangproject.ZUGFeRD.ZUGFeRDConformanceLevel; -import org.mustangproject.ZUGFeRD.ZUGFeRDExporter; -import org.mustangproject.ZUGFeRD.ZUGFeRDExporterFromA1Factory; -import org.mustangproject.ZUGFeRD.ZUGFeRDImporter; - -import org.mustangproject.library.extended.ZUGFeRDValidator; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import com.itextpdf.text.Document; -import com.itextpdf.text.DocumentException; -import com.itextpdf.text.pdf.PdfWriter; -import com.itextpdf.tool.xml.XMLWorkerHelper; - -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import io.swagger.annotations.ApiParam; -import io.swagger.annotations.License; -import io.swagger.annotations.Info; -import io.swagger.annotations.SwaggerDefinition; - -@Path("/mustang") -@Produces(MediaType.APPLICATION_JSON) -@Api(value = "Mustang") -@SwaggerDefinition(info = @Info(description = "Rest API to read/write hybrid (ZUGFeRD/Factur-X) e-invoices with a Mustang Server", version = "V0.0.2", title = "Mustangproject API", license = @License(name = "Apache 2.0", url = "http://www.apache.org") - -), schemes = { SwaggerDefinition.Scheme.HTTP, SwaggerDefinition.Scheme.HTTPS }) -public class MustangResource { - - Logger logger = LoggerFactory.getLogger(MustangResource.class.getName()); - - public MustangResource() { - } - - @POST - @Path("/extract") - // @RolesAllowed("ADMIN") - @Consumes(MediaType.MULTIPART_FORM_DATA) - @Produces(MediaType.APPLICATION_XML) - @ApiOperation(value = "Extracts XML from a zf/fx PDF", notes = "Input PDF must be ZUGFeRD or Factur-X") - public String extractFile( - @ApiParam(required = true, value = "Input ZUGFeRD/Factur-X file") @FormDataParam("file") final InputStream fileInputStream, - @FormDataParam("file") final FormDataContentDisposition contentDispositionHeader) { - - ZUGFeRDImporter zi; - logger.debug("Reading..."); - zi = new ZUGFeRDImporter(fileInputStream); - return "" + zi.getUTF8() + ""; - } - - @POST - @Path("/validateFX") - // @RolesAllowed("ADMIN") - @Consumes(MediaType.MULTIPART_FORM_DATA) - @Produces(MediaType.APPLICATION_XML) - @ApiOperation(value = "Validates a ZUGFeRD PDF file", notes = "Input PDF must be ZUGFeRD or Factur-X") - public String validateFX( - @ApiParam(required = true, value = "Input ZUGFeRD/Factur-X file") @FormDataParam("file") final InputStream fileInputStream, - @FormDataParam("file") final FormDataContentDisposition contentDispositionHeader) { - ZUGFeRDValidator zfv = new ZUGFeRDValidator(); - String validationResult = ""; - try { - - final File tempFile = File.createTempFile("tovalidate", ".pdf"); - tempFile.deleteOnExit(); - - Files.copy(fileInputStream, tempFile.toPath(), StandardCopyOption.REPLACE_EXISTING); - - validationResult = zfv.validate(tempFile.getAbsolutePath()); - } catch (Exception ex) { - logger.error(ex.getMessage(),ex); - } - - logger.debug("Validating..."); - return validationResult; - } - - @POST - @Path("/combine") - @RolesAllowed("ADMIN") - @Consumes(MediaType.MULTIPART_FORM_DATA) - @Produces(MediaType.APPLICATION_OCTET_STREAM) - @ApiOperation(value = "Combine PDF file and custom XML to zf/fx PDF", notes = "Input PDF must be PDF/A-1, output PDF will be a ZUGFeRD/Factur-X PDF/A-3 file called invoice.pdf. Demo authentication good-guy:secret") - public Response combineFile( - @ApiParam(required = true, value = "Input PDF/A-1 file") @FormDataParam("file") final InputStream fileInputStream, - @FormDataParam("file") final FormDataContentDisposition contentDispositionHeader, - @ApiParam(required = true, value = "The zf/fx XML to add to the file") @FormDataParam("xml") String XML, - @ApiParam(required = true, defaultValue = "zf", value = "zf|fx:zf for ZUGFeRD, fx for Factur-X") @FormDataParam("format") String format, - @ApiParam(required = true, defaultValue = "2", value = "version, i.e. fx 1 or zf 1 or 2") @FormDataParam("version") int version, - @ApiParam(required = true, defaultValue = "EN16931", value = "Profile: BASIC|COMFORT|EXTENDED for zf1, MINIMUM|BASICWL|BASIC|CIUS|EN16931|EXTENDED for zf2/fx1") @FormDataParam("profile") String profile) { - - ZUGFeRDExporter ze; - ByteArrayOutputStream output = new ByteArrayOutputStream(); - - try { - logger.debug("Converting to PDF/A-3u"); - - if ((version < 1) || (version > 2)) { - // this should be checked with annotations but I did not get it to work - throw new IllegalArgumentException("invalid version"); - } - - // this should be restricted to the enum with annotations but I did not get it - // to work - ZUGFeRDConformanceLevel prof = ZUGFeRDConformanceLevel.valueOf(profile); - /* - * Add .setZUGFeRDVersion and .setZUGFeRDConformanceLevel in the next lines to - * set the ZUGFeRD version respective profile of the XML you are inserting. - */ - ze = new ZUGFeRDExporterFromA1Factory().setProducer("Mustang API") - .setCreator(System.getProperty("user.name")).setZUGFeRDVersion(version) - .setZUGFeRDConformanceLevel(prof).load(fileInputStream); - logger.debug("Attaching ZUGFeRD-Data"); - if (format.equalsIgnoreCase("fx")) { - ze.setFacturX(); - } - ze.setZUGFeRDXMLData(XML.getBytes("UTF-8")); - logger.debug("Writing ZUGFeRD-PDF"); - - ze.export(output); - } catch (IOException e) { - e.printStackTrace(); - } - byte[] bytes = output.toByteArray(); - InputStream inputStream = new ByteArrayInputStream(bytes); - - return Response.ok(inputStream).header(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=\"invoice.pdf\"") - .build(); - - } - - @POST - @Path("/test") - @Consumes(MediaType.APPLICATION_JSON) - @Produces(MediaType.APPLICATION_JSON) - @ApiOperation(value = "Returns a hello world", notes = "Just a test") - public Response test() { - - return Response.status(Response.Status.OK).entity("{\"payload\":\"test\"}").build(); - - } - -} \ No newline at end of file diff --git a/Mustang-Server/src/test/java/mustangAPI/IntegrationTest.java b/Mustang-Server/src/test/java/mustangAPI/IntegrationTest.java deleted file mode 100644 index 3c8389e8..00000000 --- a/Mustang-Server/src/test/java/mustangAPI/IntegrationTest.java +++ /dev/null @@ -1,50 +0,0 @@ -package mustangAPI; - -import javax.ws.rs.client.Client; -import javax.ws.rs.client.ClientBuilder; -import javax.ws.rs.core.MediaType; - -import org.glassfish.jersey.client.authentication.HttpAuthenticationFeature; -import api.ApiApplication; - -public class IntegrationTest { - /*@ClassRule - public static final DropwizardAppRule RULE - = new DropwizardAppRule<>(ApiApplication.class, - "config.yml"); - @Test - public void testGetGreeting() { - //test w/ssl - * //Create SSL Configurator - SslConfigurator sslConfigurator = SslConfigurator.newInstance(); - //Register a keystore - sslConfigurator.trustStoreFile("dwstart.keystore") - .trustStorePassword("crimson"); - //Create SSL Context - SSLContext sSLContext = sslConfigurator.createSSLContext(); - //Obtain client - Client client = ClientBuilder - .newBuilder() - .sslContext(sSLContext) - .build(); - - - - - String expected = "Hello world!"; - //Obtain client - Client client = ClientBuilder.newClient(); - //Build a feature in basic authentication mode - HttpAuthenticationFeature feature - = HttpAuthenticationFeature.basic("javaeeeee", "crimson"); - //Register the feature - client.register(feature); - //Get actual resul string - String actual = client - .target("http://localhost:8080/secured_hello") - .request(MediaType.TEXT_PLAIN) - .get(String.class); - //Do an assertion - assertEquals(expected, actual); - }*/ - } diff --git a/NOTICE b/NOTICE index 75b846a1..85b08d6a 100644 --- a/NOTICE +++ b/NOTICE @@ -22,4 +22,8 @@ Copyright (c) 2002-2007, www.pdfbox.org Copyright (c) 2006-2007, www.jempbox.org Apache PDFBox was based on source code originally developed in the PaDaF project. -Copyright (c) 2010 Atos Worldline SAS \ No newline at end of file +Copyright (c) 2010 Atos Worldline SAS + +Based on VeraPDF-library https://github.com/veraPDF/veraPDF-library licensed under the MPL 2.0 +Based on PH-Schematron https://github.com/phax/ph-schematron licensed under the APL2.0 +Based on https://github.com/itplr-kosit/xrechnung-schematron licensed under the APL2.0 diff --git a/NOTICE.txt b/NOTICE.txt deleted file mode 100644 index 2d28d372..00000000 --- a/NOTICE.txt +++ /dev/null @@ -1,14 +0,0 @@ -Apache PDFBox -Copyright 2014 The Apache Software Foundation - -This product includes software developed at -The Apache Software Foundation (http://www.apache.org/). - -Based on source code originally developed in the PDFBox, JempBox and -FontBox projects. -Copyright (c) 2002-2007, www.pdfbox.org -Copyright (c) 2006-2007, www.jempbox.org - -Based on source code originally developed in the PaDaF project. -Copyright (c) 2010 Atos Worldline SAS - diff --git a/libraryExtended/ZUV-Architektur.graphml b/doc/ZUV-Architektur.graphml similarity index 100% rename from libraryExtended/ZUV-Architektur.graphml rename to doc/ZUV-Architektur.graphml diff --git a/libraryExtended/ZUV-Architektur.svg b/doc/ZUV-Architektur.svg similarity index 100% rename from libraryExtended/ZUV-Architektur.svg rename to doc/ZUV-Architektur.svg diff --git a/libraryBasic/pom.xml b/library/pom.xml similarity index 97% rename from libraryBasic/pom.xml rename to library/pom.xml index d006d1be..a063478c 100644 --- a/libraryBasic/pom.xml +++ b/library/pom.xml @@ -8,10 +8,10 @@ 4.0.0 org.mustangproject - libraryBasic + library 2.0.0-SNAPSHOT jar - libraryBasic + Library for to write and read FacturX 1.0 and ZUGFeRD 1.0 and 2.1 e-invoices. A PDF/A file is required, the XML can be generated or provided. The Mustang project is a java library to read and write ZUGFeRD meta data inside your invoice PDFs http://www.mustangproject.org/ @@ -19,7 +19,7 @@ scm:git:https://github.com/ZUGFeRD/mustangproject.git scm:git:https://github.com/ZUGFeRD/mustangproject.git https://github.com/ZUGFeRD/mustangproject - mustang-1.7.3 + mustang-2.0.0-SNAPSHOT diff --git a/libraryBasic/src/main/java-templates/org/mustangproject/ZUGFeRD/Version.java b/library/src/main/java-templates/org/mustangproject/ZUGFeRD/Version.java similarity index 100% rename from libraryBasic/src/main/java-templates/org/mustangproject/ZUGFeRD/Version.java rename to library/src/main/java-templates/org/mustangproject/ZUGFeRD/Version.java diff --git a/libraryBasic/src/main/java/org/mustangproject/XMLTools.java b/library/src/main/java/org/mustangproject/XMLTools.java similarity index 100% rename from libraryBasic/src/main/java/org/mustangproject/XMLTools.java rename to library/src/main/java/org/mustangproject/XMLTools.java diff --git a/libraryBasic/src/main/java/org/mustangproject/ZUGFeRD/Contact.java b/library/src/main/java/org/mustangproject/ZUGFeRD/Contact.java similarity index 100% rename from libraryBasic/src/main/java/org/mustangproject/ZUGFeRD/Contact.java rename to library/src/main/java/org/mustangproject/ZUGFeRD/Contact.java diff --git a/libraryBasic/src/main/java/org/mustangproject/ZUGFeRD/CustomXMLProvider.java b/library/src/main/java/org/mustangproject/ZUGFeRD/CustomXMLProvider.java similarity index 100% rename from libraryBasic/src/main/java/org/mustangproject/ZUGFeRD/CustomXMLProvider.java rename to library/src/main/java/org/mustangproject/ZUGFeRD/CustomXMLProvider.java diff --git a/libraryBasic/src/main/java/org/mustangproject/ZUGFeRD/IExporterFactory.java b/library/src/main/java/org/mustangproject/ZUGFeRD/IExporterFactory.java similarity index 100% rename from libraryBasic/src/main/java/org/mustangproject/ZUGFeRD/IExporterFactory.java rename to library/src/main/java/org/mustangproject/ZUGFeRD/IExporterFactory.java diff --git a/libraryBasic/src/main/java/org/mustangproject/ZUGFeRD/IProfileProvider.java b/library/src/main/java/org/mustangproject/ZUGFeRD/IProfileProvider.java similarity index 100% rename from libraryBasic/src/main/java/org/mustangproject/ZUGFeRD/IProfileProvider.java rename to library/src/main/java/org/mustangproject/ZUGFeRD/IProfileProvider.java diff --git a/libraryBasic/src/main/java/org/mustangproject/ZUGFeRD/IXMLProvider.java b/library/src/main/java/org/mustangproject/ZUGFeRD/IXMLProvider.java similarity index 100% rename from libraryBasic/src/main/java/org/mustangproject/ZUGFeRD/IXMLProvider.java rename to library/src/main/java/org/mustangproject/ZUGFeRD/IXMLProvider.java diff --git a/libraryBasic/src/main/java/org/mustangproject/ZUGFeRD/IZUGFeRDAllowanceCharge.java b/library/src/main/java/org/mustangproject/ZUGFeRD/IZUGFeRDAllowanceCharge.java similarity index 100% rename from libraryBasic/src/main/java/org/mustangproject/ZUGFeRD/IZUGFeRDAllowanceCharge.java rename to library/src/main/java/org/mustangproject/ZUGFeRD/IZUGFeRDAllowanceCharge.java diff --git a/libraryBasic/src/main/java/org/mustangproject/ZUGFeRD/IZUGFeRDDate.java b/library/src/main/java/org/mustangproject/ZUGFeRD/IZUGFeRDDate.java similarity index 100% rename from libraryBasic/src/main/java/org/mustangproject/ZUGFeRD/IZUGFeRDDate.java rename to library/src/main/java/org/mustangproject/ZUGFeRD/IZUGFeRDDate.java diff --git a/libraryBasic/src/main/java/org/mustangproject/ZUGFeRD/IZUGFeRDExportableContact.java b/library/src/main/java/org/mustangproject/ZUGFeRD/IZUGFeRDExportableContact.java similarity index 100% rename from libraryBasic/src/main/java/org/mustangproject/ZUGFeRD/IZUGFeRDExportableContact.java rename to library/src/main/java/org/mustangproject/ZUGFeRD/IZUGFeRDExportableContact.java diff --git a/libraryBasic/src/main/java/org/mustangproject/ZUGFeRD/IZUGFeRDExportableItem.java b/library/src/main/java/org/mustangproject/ZUGFeRD/IZUGFeRDExportableItem.java similarity index 100% rename from libraryBasic/src/main/java/org/mustangproject/ZUGFeRD/IZUGFeRDExportableItem.java rename to library/src/main/java/org/mustangproject/ZUGFeRD/IZUGFeRDExportableItem.java diff --git a/libraryBasic/src/main/java/org/mustangproject/ZUGFeRD/IZUGFeRDExportableProduct.java b/library/src/main/java/org/mustangproject/ZUGFeRD/IZUGFeRDExportableProduct.java similarity index 100% rename from libraryBasic/src/main/java/org/mustangproject/ZUGFeRD/IZUGFeRDExportableProduct.java rename to library/src/main/java/org/mustangproject/ZUGFeRD/IZUGFeRDExportableProduct.java diff --git a/libraryBasic/src/main/java/org/mustangproject/ZUGFeRD/IZUGFeRDExportableTransaction.java b/library/src/main/java/org/mustangproject/ZUGFeRD/IZUGFeRDExportableTransaction.java similarity index 100% rename from libraryBasic/src/main/java/org/mustangproject/ZUGFeRD/IZUGFeRDExportableTransaction.java rename to library/src/main/java/org/mustangproject/ZUGFeRD/IZUGFeRDExportableTransaction.java diff --git a/libraryBasic/src/main/java/org/mustangproject/ZUGFeRD/IZUGFeRDPaymentDiscountTerms.java b/library/src/main/java/org/mustangproject/ZUGFeRD/IZUGFeRDPaymentDiscountTerms.java similarity index 100% rename from libraryBasic/src/main/java/org/mustangproject/ZUGFeRD/IZUGFeRDPaymentDiscountTerms.java rename to library/src/main/java/org/mustangproject/ZUGFeRD/IZUGFeRDPaymentDiscountTerms.java diff --git a/libraryBasic/src/main/java/org/mustangproject/ZUGFeRD/IZUGFeRDPaymentTerms.java b/library/src/main/java/org/mustangproject/ZUGFeRD/IZUGFeRDPaymentTerms.java similarity index 100% rename from libraryBasic/src/main/java/org/mustangproject/ZUGFeRD/IZUGFeRDPaymentTerms.java rename to library/src/main/java/org/mustangproject/ZUGFeRD/IZUGFeRDPaymentTerms.java diff --git a/libraryBasic/src/main/java/org/mustangproject/ZUGFeRD/IZUGFeRDTradeSettlement.java b/library/src/main/java/org/mustangproject/ZUGFeRD/IZUGFeRDTradeSettlement.java similarity index 100% rename from libraryBasic/src/main/java/org/mustangproject/ZUGFeRD/IZUGFeRDTradeSettlement.java rename to library/src/main/java/org/mustangproject/ZUGFeRD/IZUGFeRDTradeSettlement.java diff --git a/libraryBasic/src/main/java/org/mustangproject/ZUGFeRD/IZUGFeRDTradeSettlementDebit.java b/library/src/main/java/org/mustangproject/ZUGFeRD/IZUGFeRDTradeSettlementDebit.java similarity index 100% rename from libraryBasic/src/main/java/org/mustangproject/ZUGFeRD/IZUGFeRDTradeSettlementDebit.java rename to library/src/main/java/org/mustangproject/ZUGFeRD/IZUGFeRDTradeSettlementDebit.java diff --git a/libraryBasic/src/main/java/org/mustangproject/ZUGFeRD/IZUGFeRDTradeSettlementPayment.java b/library/src/main/java/org/mustangproject/ZUGFeRD/IZUGFeRDTradeSettlementPayment.java similarity index 100% rename from libraryBasic/src/main/java/org/mustangproject/ZUGFeRD/IZUGFeRDTradeSettlementPayment.java rename to library/src/main/java/org/mustangproject/ZUGFeRD/IZUGFeRDTradeSettlementPayment.java diff --git a/libraryBasic/src/main/java/org/mustangproject/ZUGFeRD/Item.java b/library/src/main/java/org/mustangproject/ZUGFeRD/Item.java similarity index 100% rename from libraryBasic/src/main/java/org/mustangproject/ZUGFeRD/Item.java rename to library/src/main/java/org/mustangproject/ZUGFeRD/Item.java diff --git a/libraryBasic/src/main/java/org/mustangproject/ZUGFeRD/PDFAConformanceLevel.java b/library/src/main/java/org/mustangproject/ZUGFeRD/PDFAConformanceLevel.java similarity index 100% rename from libraryBasic/src/main/java/org/mustangproject/ZUGFeRD/PDFAConformanceLevel.java rename to library/src/main/java/org/mustangproject/ZUGFeRD/PDFAConformanceLevel.java diff --git a/libraryBasic/src/main/java/org/mustangproject/ZUGFeRD/Product.java b/library/src/main/java/org/mustangproject/ZUGFeRD/Product.java similarity index 100% rename from libraryBasic/src/main/java/org/mustangproject/ZUGFeRD/Product.java rename to library/src/main/java/org/mustangproject/ZUGFeRD/Product.java diff --git a/libraryBasic/src/main/java/org/mustangproject/ZUGFeRD/VATAmount.java b/library/src/main/java/org/mustangproject/ZUGFeRD/VATAmount.java similarity index 100% rename from libraryBasic/src/main/java/org/mustangproject/ZUGFeRD/VATAmount.java rename to library/src/main/java/org/mustangproject/ZUGFeRD/VATAmount.java diff --git a/libraryBasic/src/main/java/org/mustangproject/ZUGFeRD/XMPSchemaPDFAExtensions.java b/library/src/main/java/org/mustangproject/ZUGFeRD/XMPSchemaPDFAExtensions.java similarity index 100% rename from libraryBasic/src/main/java/org/mustangproject/ZUGFeRD/XMPSchemaPDFAExtensions.java rename to library/src/main/java/org/mustangproject/ZUGFeRD/XMPSchemaPDFAExtensions.java diff --git a/libraryBasic/src/main/java/org/mustangproject/ZUGFeRD/XMPSchemaZugferd.java b/library/src/main/java/org/mustangproject/ZUGFeRD/XMPSchemaZugferd.java similarity index 100% rename from libraryBasic/src/main/java/org/mustangproject/ZUGFeRD/XMPSchemaZugferd.java rename to library/src/main/java/org/mustangproject/ZUGFeRD/XMPSchemaZugferd.java diff --git a/libraryBasic/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRD1PullProvider.java b/library/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRD1PullProvider.java similarity index 100% rename from libraryBasic/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRD1PullProvider.java rename to library/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRD1PullProvider.java diff --git a/libraryBasic/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRD2PullProvider.java b/library/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRD2PullProvider.java similarity index 99% rename from libraryBasic/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRD2PullProvider.java rename to library/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRD2PullProvider.java index 3b0425c4..34ce859e 100644 --- a/libraryBasic/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRD2PullProvider.java +++ b/library/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRD2PullProvider.java @@ -35,7 +35,6 @@ import org.dom4j.DocumentHelper; import org.dom4j.io.OutputFormat; import org.dom4j.io.XMLWriter; import org.mustangproject.XMLTools; -import org.mustangproject.toecount.Toecount; public class ZUGFeRD2PullProvider implements IXMLProvider, IProfileProvider { @@ -574,7 +573,7 @@ public class ZUGFeRD2PullProvider implements IXMLProvider, IProfileProvider { zugferdData = zugferdRaw; } } catch (UnsupportedEncodingException e) { - Logger.getLogger(Toecount.class.getName()).log(Level.SEVERE, null, e); + Logger.getLogger(ZUGFeRD2PullProvider.class.getName()).log(Level.SEVERE, null, e); } // $NON-NLS-1$ } diff --git a/libraryBasic/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRD2PushProvider.java b/library/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRD2PushProvider.java similarity index 100% rename from libraryBasic/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRD2PushProvider.java rename to library/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRD2PushProvider.java diff --git a/libraryBasic/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDConformanceLevel.java b/library/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDConformanceLevel.java similarity index 100% rename from libraryBasic/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDConformanceLevel.java rename to library/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDConformanceLevel.java diff --git a/libraryBasic/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDDateFormat.java b/library/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDDateFormat.java similarity index 100% rename from libraryBasic/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDDateFormat.java rename to library/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDDateFormat.java diff --git a/libraryBasic/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDExportException.java b/library/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDExportException.java similarity index 100% rename from libraryBasic/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDExportException.java rename to library/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDExportException.java diff --git a/libraryBasic/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDExporter.java b/library/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDExporter.java similarity index 100% rename from libraryBasic/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDExporter.java rename to library/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDExporter.java diff --git a/libraryBasic/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDExporterFromA1Factory.java b/library/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDExporterFromA1Factory.java similarity index 100% rename from libraryBasic/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDExporterFromA1Factory.java rename to library/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDExporterFromA1Factory.java diff --git a/libraryBasic/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDExporterFromA3Factory.java b/library/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDExporterFromA3Factory.java similarity index 100% rename from libraryBasic/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDExporterFromA3Factory.java rename to library/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDExporterFromA3Factory.java diff --git a/libraryBasic/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDImporter.java b/library/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDImporter.java similarity index 100% rename from libraryBasic/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDImporter.java rename to library/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDImporter.java diff --git a/libraryBasic/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDImporterException.java b/library/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDImporterException.java similarity index 100% rename from libraryBasic/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDImporterException.java rename to library/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDImporterException.java diff --git a/libraryBasic/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDInvoiceImporter.java b/library/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDInvoiceImporter.java similarity index 100% rename from libraryBasic/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDInvoiceImporter.java rename to library/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDInvoiceImporter.java diff --git a/libraryBasic/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDMigrator.java b/library/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDMigrator.java similarity index 100% rename from libraryBasic/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDMigrator.java rename to library/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDMigrator.java diff --git a/libraryBasic/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDTransactionModelConverter.java b/library/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDTransactionModelConverter.java similarity index 100% rename from libraryBasic/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDTransactionModelConverter.java rename to library/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDTransactionModelConverter.java diff --git a/libraryBasic/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDVisualizer.java b/library/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDVisualizer.java similarity index 100% rename from libraryBasic/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDVisualizer.java rename to library/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDVisualizer.java diff --git a/libraryBasic/src/main/java/org/mustangproject/ZUGFeRD/model/DateTimeTypeConstants.java b/library/src/main/java/org/mustangproject/ZUGFeRD/model/DateTimeTypeConstants.java similarity index 100% rename from libraryBasic/src/main/java/org/mustangproject/ZUGFeRD/model/DateTimeTypeConstants.java rename to library/src/main/java/org/mustangproject/ZUGFeRD/model/DateTimeTypeConstants.java diff --git a/libraryBasic/src/main/java/org/mustangproject/ZUGFeRD/model/DocumentCodeTypeConstants.java b/library/src/main/java/org/mustangproject/ZUGFeRD/model/DocumentCodeTypeConstants.java similarity index 100% rename from libraryBasic/src/main/java/org/mustangproject/ZUGFeRD/model/DocumentCodeTypeConstants.java rename to library/src/main/java/org/mustangproject/ZUGFeRD/model/DocumentCodeTypeConstants.java diff --git a/libraryBasic/src/main/java/org/mustangproject/ZUGFeRD/model/DocumentContextParameterTypeConstants.java b/library/src/main/java/org/mustangproject/ZUGFeRD/model/DocumentContextParameterTypeConstants.java similarity index 100% rename from libraryBasic/src/main/java/org/mustangproject/ZUGFeRD/model/DocumentContextParameterTypeConstants.java rename to library/src/main/java/org/mustangproject/ZUGFeRD/model/DocumentContextParameterTypeConstants.java diff --git a/libraryBasic/src/main/java/org/mustangproject/ZUGFeRD/model/NoteTypeConstants.java b/library/src/main/java/org/mustangproject/ZUGFeRD/model/NoteTypeConstants.java similarity index 100% rename from libraryBasic/src/main/java/org/mustangproject/ZUGFeRD/model/NoteTypeConstants.java rename to library/src/main/java/org/mustangproject/ZUGFeRD/model/NoteTypeConstants.java diff --git a/libraryBasic/src/main/java/org/mustangproject/ZUGFeRD/model/PaymentMeansCodeTypeConstants.java b/library/src/main/java/org/mustangproject/ZUGFeRD/model/PaymentMeansCodeTypeConstants.java similarity index 100% rename from libraryBasic/src/main/java/org/mustangproject/ZUGFeRD/model/PaymentMeansCodeTypeConstants.java rename to library/src/main/java/org/mustangproject/ZUGFeRD/model/PaymentMeansCodeTypeConstants.java diff --git a/libraryBasic/src/main/java/org/mustangproject/ZUGFeRD/model/QuantityTypeConstants.java b/library/src/main/java/org/mustangproject/ZUGFeRD/model/QuantityTypeConstants.java similarity index 100% rename from libraryBasic/src/main/java/org/mustangproject/ZUGFeRD/model/QuantityTypeConstants.java rename to library/src/main/java/org/mustangproject/ZUGFeRD/model/QuantityTypeConstants.java diff --git a/libraryBasic/src/main/java/org/mustangproject/ZUGFeRD/model/TaxCategoryCodeTypeConstants.java b/library/src/main/java/org/mustangproject/ZUGFeRD/model/TaxCategoryCodeTypeConstants.java similarity index 100% rename from libraryBasic/src/main/java/org/mustangproject/ZUGFeRD/model/TaxCategoryCodeTypeConstants.java rename to library/src/main/java/org/mustangproject/ZUGFeRD/model/TaxCategoryCodeTypeConstants.java diff --git a/libraryBasic/src/main/java/org/mustangproject/ZUGFeRD/model/TaxRegistrationTypeConstants.java b/library/src/main/java/org/mustangproject/ZUGFeRD/model/TaxRegistrationTypeConstants.java similarity index 100% rename from libraryBasic/src/main/java/org/mustangproject/ZUGFeRD/model/TaxRegistrationTypeConstants.java rename to library/src/main/java/org/mustangproject/ZUGFeRD/model/TaxRegistrationTypeConstants.java diff --git a/libraryBasic/src/main/java/org/mustangproject/ZUGFeRD/model/TaxTypeCodeTypeConstants.java b/library/src/main/java/org/mustangproject/ZUGFeRD/model/TaxTypeCodeTypeConstants.java similarity index 100% rename from libraryBasic/src/main/java/org/mustangproject/ZUGFeRD/model/TaxTypeCodeTypeConstants.java rename to library/src/main/java/org/mustangproject/ZUGFeRD/model/TaxTypeCodeTypeConstants.java diff --git a/libraryBasic/src/main/java/org/mustangproject/ZUGFeRD/model/ZFNamespacePrefixMapper.java b/library/src/main/java/org/mustangproject/ZUGFeRD/model/ZFNamespacePrefixMapper.java similarity index 100% rename from libraryBasic/src/main/java/org/mustangproject/ZUGFeRD/model/ZFNamespacePrefixMapper.java rename to library/src/main/java/org/mustangproject/ZUGFeRD/model/ZFNamespacePrefixMapper.java diff --git a/libraryBasic/src/main/resources/COMFORTtoEN16931.xsl b/library/src/main/resources/COMFORTtoEN16931.xsl similarity index 100% rename from libraryBasic/src/main/resources/COMFORTtoEN16931.xsl rename to library/src/main/resources/COMFORTtoEN16931.xsl diff --git a/libraryBasic/src/main/resources/schema/ZUGFeRD1p0.xsd b/library/src/main/resources/schema/ZUGFeRD1p0.xsd similarity index 100% rename from libraryBasic/src/main/resources/schema/ZUGFeRD1p0.xsd rename to library/src/main/resources/schema/ZUGFeRD1p0.xsd diff --git a/libraryBasic/src/main/resources/schema/ZUGFeRD1p0_urn_un_unece_uncefact_data_standard_QualifiedDataType_12.xsd b/library/src/main/resources/schema/ZUGFeRD1p0_urn_un_unece_uncefact_data_standard_QualifiedDataType_12.xsd similarity index 100% rename from libraryBasic/src/main/resources/schema/ZUGFeRD1p0_urn_un_unece_uncefact_data_standard_QualifiedDataType_12.xsd rename to library/src/main/resources/schema/ZUGFeRD1p0_urn_un_unece_uncefact_data_standard_QualifiedDataType_12.xsd diff --git a/libraryBasic/src/main/resources/schema/ZUGFeRD1p0_urn_un_unece_uncefact_data_standard_ReusableAggregateBusinessInformationEntity_12.xsd b/library/src/main/resources/schema/ZUGFeRD1p0_urn_un_unece_uncefact_data_standard_ReusableAggregateBusinessInformationEntity_12.xsd similarity index 100% rename from libraryBasic/src/main/resources/schema/ZUGFeRD1p0_urn_un_unece_uncefact_data_standard_ReusableAggregateBusinessInformationEntity_12.xsd rename to library/src/main/resources/schema/ZUGFeRD1p0_urn_un_unece_uncefact_data_standard_ReusableAggregateBusinessInformationEntity_12.xsd diff --git a/libraryBasic/src/main/resources/schema/ZUGFeRD1p0_urn_un_unece_uncefact_data_standard_UnqualifiedDataType_15.xsd b/library/src/main/resources/schema/ZUGFeRD1p0_urn_un_unece_uncefact_data_standard_UnqualifiedDataType_15.xsd similarity index 100% rename from libraryBasic/src/main/resources/schema/ZUGFeRD1p0_urn_un_unece_uncefact_data_standard_UnqualifiedDataType_15.xsd rename to library/src/main/resources/schema/ZUGFeRD1p0_urn_un_unece_uncefact_data_standard_UnqualifiedDataType_15.xsd diff --git a/libraryBasic/src/main/resources/stylesheets/ZUGFeRD_1p0_c1p0_s1p0.xslt b/library/src/main/resources/stylesheets/ZUGFeRD_1p0_c1p0_s1p0.xslt similarity index 100% rename from libraryBasic/src/main/resources/stylesheets/ZUGFeRD_1p0_c1p0_s1p0.xslt rename to library/src/main/resources/stylesheets/ZUGFeRD_1p0_c1p0_s1p0.xslt diff --git a/libraryBasic/src/test/java/org/mustangproject/ZUGFeRD/BackwardCompatibilityTest.java b/library/src/test/java/org/mustangproject/ZUGFeRD/BackwardCompatibilityTest.java similarity index 100% rename from libraryBasic/src/test/java/org/mustangproject/ZUGFeRD/BackwardCompatibilityTest.java rename to library/src/test/java/org/mustangproject/ZUGFeRD/BackwardCompatibilityTest.java diff --git a/libraryBasic/src/test/java/org/mustangproject/ZUGFeRD/BaseTest.java b/library/src/test/java/org/mustangproject/ZUGFeRD/BaseTest.java similarity index 100% rename from libraryBasic/src/test/java/org/mustangproject/ZUGFeRD/BaseTest.java rename to library/src/test/java/org/mustangproject/ZUGFeRD/BaseTest.java diff --git a/libraryBasic/src/test/java/org/mustangproject/ZUGFeRD/IZUGFeRDAllowanceChargeImpl.java b/library/src/test/java/org/mustangproject/ZUGFeRD/IZUGFeRDAllowanceChargeImpl.java similarity index 100% rename from libraryBasic/src/test/java/org/mustangproject/ZUGFeRD/IZUGFeRDAllowanceChargeImpl.java rename to library/src/test/java/org/mustangproject/ZUGFeRD/IZUGFeRDAllowanceChargeImpl.java diff --git a/libraryBasic/src/test/java/org/mustangproject/ZUGFeRD/IZUGFeRDDateImpl.java b/library/src/test/java/org/mustangproject/ZUGFeRD/IZUGFeRDDateImpl.java similarity index 100% rename from libraryBasic/src/test/java/org/mustangproject/ZUGFeRD/IZUGFeRDDateImpl.java rename to library/src/test/java/org/mustangproject/ZUGFeRD/IZUGFeRDDateImpl.java diff --git a/libraryBasic/src/test/java/org/mustangproject/ZUGFeRD/IZUGFeRDExportableContactImpl.java b/library/src/test/java/org/mustangproject/ZUGFeRD/IZUGFeRDExportableContactImpl.java similarity index 100% rename from libraryBasic/src/test/java/org/mustangproject/ZUGFeRD/IZUGFeRDExportableContactImpl.java rename to library/src/test/java/org/mustangproject/ZUGFeRD/IZUGFeRDExportableContactImpl.java diff --git a/libraryBasic/src/test/java/org/mustangproject/ZUGFeRD/IZUGFeRDExportableItemImpl.java b/library/src/test/java/org/mustangproject/ZUGFeRD/IZUGFeRDExportableItemImpl.java similarity index 100% rename from libraryBasic/src/test/java/org/mustangproject/ZUGFeRD/IZUGFeRDExportableItemImpl.java rename to library/src/test/java/org/mustangproject/ZUGFeRD/IZUGFeRDExportableItemImpl.java diff --git a/libraryBasic/src/test/java/org/mustangproject/ZUGFeRD/IZUGFeRDExportableProductImpl.java b/library/src/test/java/org/mustangproject/ZUGFeRD/IZUGFeRDExportableProductImpl.java similarity index 100% rename from libraryBasic/src/test/java/org/mustangproject/ZUGFeRD/IZUGFeRDExportableProductImpl.java rename to library/src/test/java/org/mustangproject/ZUGFeRD/IZUGFeRDExportableProductImpl.java diff --git a/libraryBasic/src/test/java/org/mustangproject/ZUGFeRD/IZUGFeRDExportableTransactionImpl.java b/library/src/test/java/org/mustangproject/ZUGFeRD/IZUGFeRDExportableTransactionImpl.java similarity index 100% rename from libraryBasic/src/test/java/org/mustangproject/ZUGFeRD/IZUGFeRDExportableTransactionImpl.java rename to library/src/test/java/org/mustangproject/ZUGFeRD/IZUGFeRDExportableTransactionImpl.java diff --git a/libraryBasic/src/test/java/org/mustangproject/ZUGFeRD/IZUGFeRDTradeSettlementPaymentImpl.java b/library/src/test/java/org/mustangproject/ZUGFeRD/IZUGFeRDTradeSettlementPaymentImpl.java similarity index 100% rename from libraryBasic/src/test/java/org/mustangproject/ZUGFeRD/IZUGFeRDTradeSettlementPaymentImpl.java rename to library/src/test/java/org/mustangproject/ZUGFeRD/IZUGFeRDTradeSettlementPaymentImpl.java diff --git a/libraryBasic/src/test/java/org/mustangproject/ZUGFeRD/MustangReaderTestCase.java b/library/src/test/java/org/mustangproject/ZUGFeRD/MustangReaderTestCase.java similarity index 100% rename from libraryBasic/src/test/java/org/mustangproject/ZUGFeRD/MustangReaderTestCase.java rename to library/src/test/java/org/mustangproject/ZUGFeRD/MustangReaderTestCase.java diff --git a/libraryBasic/src/test/java/org/mustangproject/ZUGFeRD/MustangReaderWriterCustomXMLTest.java b/library/src/test/java/org/mustangproject/ZUGFeRD/MustangReaderWriterCustomXMLTest.java similarity index 100% rename from libraryBasic/src/test/java/org/mustangproject/ZUGFeRD/MustangReaderWriterCustomXMLTest.java rename to library/src/test/java/org/mustangproject/ZUGFeRD/MustangReaderWriterCustomXMLTest.java diff --git a/libraryBasic/src/test/java/org/mustangproject/ZUGFeRD/MustangReaderWriterEdgeTest.java b/library/src/test/java/org/mustangproject/ZUGFeRD/MustangReaderWriterEdgeTest.java similarity index 100% rename from libraryBasic/src/test/java/org/mustangproject/ZUGFeRD/MustangReaderWriterEdgeTest.java rename to library/src/test/java/org/mustangproject/ZUGFeRD/MustangReaderWriterEdgeTest.java diff --git a/libraryBasic/src/test/java/org/mustangproject/ZUGFeRD/MustangReaderWriterTest.java b/library/src/test/java/org/mustangproject/ZUGFeRD/MustangReaderWriterTest.java similarity index 100% rename from libraryBasic/src/test/java/org/mustangproject/ZUGFeRD/MustangReaderWriterTest.java rename to library/src/test/java/org/mustangproject/ZUGFeRD/MustangReaderWriterTest.java diff --git a/libraryBasic/src/test/java/org/mustangproject/ZUGFeRD/ResourceUtilities.java b/library/src/test/java/org/mustangproject/ZUGFeRD/ResourceUtilities.java similarity index 100% rename from libraryBasic/src/test/java/org/mustangproject/ZUGFeRD/ResourceUtilities.java rename to library/src/test/java/org/mustangproject/ZUGFeRD/ResourceUtilities.java diff --git a/libraryBasic/src/test/java/org/mustangproject/ZUGFeRD/VersionMigrationTest.java b/library/src/test/java/org/mustangproject/ZUGFeRD/VersionMigrationTest.java similarity index 100% rename from libraryBasic/src/test/java/org/mustangproject/ZUGFeRD/VersionMigrationTest.java rename to library/src/test/java/org/mustangproject/ZUGFeRD/VersionMigrationTest.java diff --git a/libraryBasic/src/test/java/org/mustangproject/ZUGFeRD/ZF2EdgeTest.java b/library/src/test/java/org/mustangproject/ZUGFeRD/ZF2EdgeTest.java similarity index 100% rename from libraryBasic/src/test/java/org/mustangproject/ZUGFeRD/ZF2EdgeTest.java rename to library/src/test/java/org/mustangproject/ZUGFeRD/ZF2EdgeTest.java diff --git a/libraryBasic/src/test/java/org/mustangproject/ZUGFeRD/ZF2PushTest.java b/library/src/test/java/org/mustangproject/ZUGFeRD/ZF2PushTest.java similarity index 100% rename from libraryBasic/src/test/java/org/mustangproject/ZUGFeRD/ZF2PushTest.java rename to library/src/test/java/org/mustangproject/ZUGFeRD/ZF2PushTest.java diff --git a/libraryBasic/src/test/java/org/mustangproject/ZUGFeRD/ZF2Test.java b/library/src/test/java/org/mustangproject/ZUGFeRD/ZF2Test.java similarity index 100% rename from libraryBasic/src/test/java/org/mustangproject/ZUGFeRD/ZF2Test.java rename to library/src/test/java/org/mustangproject/ZUGFeRD/ZF2Test.java diff --git a/libraryBasic/src/test/java/org/mustangproject/ZUGFeRD/ZF2ZInvoiceImporterTest.java b/library/src/test/java/org/mustangproject/ZUGFeRD/ZF2ZInvoiceImporterTest.java similarity index 100% rename from libraryBasic/src/test/java/org/mustangproject/ZUGFeRD/ZF2ZInvoiceImporterTest.java rename to library/src/test/java/org/mustangproject/ZUGFeRD/ZF2ZInvoiceImporterTest.java diff --git a/libraryBasic/src/test/java/org/mustangproject/ZUGFeRD/ZUGFeRDTransactionModelConverterTest.java b/library/src/test/java/org/mustangproject/ZUGFeRD/ZUGFeRDTransactionModelConverterTest.java similarity index 100% rename from libraryBasic/src/test/java/org/mustangproject/ZUGFeRD/ZUGFeRDTransactionModelConverterTest.java rename to library/src/test/java/org/mustangproject/ZUGFeRD/ZUGFeRDTransactionModelConverterTest.java diff --git a/libraryBasic/src/test/java/org/mustangproject/ZUGFeRD/ZUGFeRDXMLAssert.java b/library/src/test/java/org/mustangproject/ZUGFeRD/ZUGFeRDXMLAssert.java similarity index 100% rename from libraryBasic/src/test/java/org/mustangproject/ZUGFeRD/ZUGFeRDXMLAssert.java rename to library/src/test/java/org/mustangproject/ZUGFeRD/ZUGFeRDXMLAssert.java diff --git a/libraryBasic/src/test/resources/MustangGnuaccountingBeispielRE-20170509_505.pdf b/library/src/test/resources/MustangGnuaccountingBeispielRE-20170509_505.pdf similarity index 100% rename from libraryBasic/src/test/resources/MustangGnuaccountingBeispielRE-20170509_505.pdf rename to library/src/test/resources/MustangGnuaccountingBeispielRE-20170509_505.pdf diff --git a/libraryBasic/src/test/resources/MustangGnuaccountingBeispielRE-20170509_505PDF14.pdf b/library/src/test/resources/MustangGnuaccountingBeispielRE-20170509_505PDF14.pdf similarity index 100% rename from libraryBasic/src/test/resources/MustangGnuaccountingBeispielRE-20170509_505PDF14.pdf rename to library/src/test/resources/MustangGnuaccountingBeispielRE-20170509_505PDF14.pdf diff --git a/libraryBasic/src/test/resources/MustangGnuaccountingBeispielRE-20170509_505PDFA3.pdf b/library/src/test/resources/MustangGnuaccountingBeispielRE-20170509_505PDFA3.pdf similarity index 100% rename from libraryBasic/src/test/resources/MustangGnuaccountingBeispielRE-20170509_505PDFA3.pdf rename to library/src/test/resources/MustangGnuaccountingBeispielRE-20170509_505PDFA3.pdf diff --git a/libraryBasic/src/test/resources/MustangGnuaccountingBeispielRE-20170509_505blanko.pdf b/library/src/test/resources/MustangGnuaccountingBeispielRE-20170509_505blanko.pdf similarity index 100% rename from libraryBasic/src/test/resources/MustangGnuaccountingBeispielRE-20170509_505blanko.pdf rename to library/src/test/resources/MustangGnuaccountingBeispielRE-20170509_505blanko.pdf diff --git a/libraryBasic/src/test/resources/MustangGnuaccountingBeispielRE-20171118_506blanko.pdf b/library/src/test/resources/MustangGnuaccountingBeispielRE-20171118_506blanko.pdf similarity index 100% rename from libraryBasic/src/test/resources/MustangGnuaccountingBeispielRE-20171118_506blanko.pdf rename to library/src/test/resources/MustangGnuaccountingBeispielRE-20171118_506blanko.pdf diff --git a/libraryBasic/src/test/resources/MustangGnuaccountingBeispielRE-20190610_507blanko.pdf b/library/src/test/resources/MustangGnuaccountingBeispielRE-20190610_507blanko.pdf similarity index 100% rename from libraryBasic/src/test/resources/MustangGnuaccountingBeispielRE-20190610_507blanko.pdf rename to library/src/test/resources/MustangGnuaccountingBeispielRE-20190610_507blanko.pdf diff --git a/libraryBasic/src/test/resources/ZUGFeRD_1p0.scmt b/library/src/test/resources/ZUGFeRD_1p0.scmt similarity index 100% rename from libraryBasic/src/test/resources/ZUGFeRD_1p0.scmt rename to library/src/test/resources/ZUGFeRD_1p0.scmt diff --git a/libraryBasic/src/test/resources/migration/input/ZUGFeRD1-invoice-adjusted.xml b/library/src/test/resources/migration/input/ZUGFeRD1-invoice-adjusted.xml similarity index 100% rename from libraryBasic/src/test/resources/migration/input/ZUGFeRD1-invoice-adjusted.xml rename to library/src/test/resources/migration/input/ZUGFeRD1-invoice-adjusted.xml diff --git a/libraryBasic/src/test/resources/migration/input/ZUGFeRD1-invoice.xml b/library/src/test/resources/migration/input/ZUGFeRD1-invoice.xml similarity index 100% rename from libraryBasic/src/test/resources/migration/input/ZUGFeRD1-invoice.xml rename to library/src/test/resources/migration/input/ZUGFeRD1-invoice.xml diff --git a/libraryBasic/src/test/resources/migration/input/ZUGFeRD1_COMFORT_Einfach.xml b/library/src/test/resources/migration/input/ZUGFeRD1_COMFORT_Einfach.xml similarity index 100% rename from libraryBasic/src/test/resources/migration/input/ZUGFeRD1_COMFORT_Einfach.xml rename to library/src/test/resources/migration/input/ZUGFeRD1_COMFORT_Einfach.xml diff --git a/libraryBasic/src/test/resources/migration/input/ZUGFeRD1_EXTENDED_Warenrechnung.xml b/library/src/test/resources/migration/input/ZUGFeRD1_EXTENDED_Warenrechnung.xml similarity index 100% rename from libraryBasic/src/test/resources/migration/input/ZUGFeRD1_EXTENDED_Warenrechnung.xml rename to library/src/test/resources/migration/input/ZUGFeRD1_EXTENDED_Warenrechnung.xml diff --git a/libraryBasic/src/test/resources/migration/reference/ZUGFeRD2-invoice-adjusted.xml b/library/src/test/resources/migration/reference/ZUGFeRD2-invoice-adjusted.xml similarity index 100% rename from libraryBasic/src/test/resources/migration/reference/ZUGFeRD2-invoice-adjusted.xml rename to library/src/test/resources/migration/reference/ZUGFeRD2-invoice-adjusted.xml diff --git a/libraryBasic/src/test/resources/migration/reference/ZUGFeRD2-invoice.xml b/library/src/test/resources/migration/reference/ZUGFeRD2-invoice.xml similarity index 100% rename from libraryBasic/src/test/resources/migration/reference/ZUGFeRD2-invoice.xml rename to library/src/test/resources/migration/reference/ZUGFeRD2-invoice.xml diff --git a/libraryBasic/src/test/resources/migration/reference/ZUGFeRD2_COMFORT_Einfach.xml b/library/src/test/resources/migration/reference/ZUGFeRD2_COMFORT_Einfach.xml similarity index 100% rename from libraryBasic/src/test/resources/migration/reference/ZUGFeRD2_COMFORT_Einfach.xml rename to library/src/test/resources/migration/reference/ZUGFeRD2_COMFORT_Einfach.xml diff --git a/libraryBasic/src/test/resources/migration/reference/ZUGFeRD2_EXTENDED_Warenrechnung.xml b/library/src/test/resources/migration/reference/ZUGFeRD2_EXTENDED_Warenrechnung.xml similarity index 100% rename from libraryBasic/src/test/resources/migration/reference/ZUGFeRD2_EXTENDED_Warenrechnung.xml rename to library/src/test/resources/migration/reference/ZUGFeRD2_EXTENDED_Warenrechnung.xml diff --git a/libraryBasic/src/test/resources/zugferd_invoice.pdf b/library/src/test/resources/zugferd_invoice.pdf similarity index 100% rename from libraryBasic/src/test/resources/zugferd_invoice.pdf rename to library/src/test/resources/zugferd_invoice.pdf diff --git a/libraryBasic/src/main/java/org/mustangproject/toecount/FileChecker.java b/libraryBasic/src/main/java/org/mustangproject/toecount/FileChecker.java deleted file mode 100755 index 27273e2e..00000000 --- a/libraryBasic/src/main/java/org/mustangproject/toecount/FileChecker.java +++ /dev/null @@ -1,95 +0,0 @@ -/** ********************************************************************** - * - * Copyright 2018 Jochen Staerk - * - * Use is subject to license terms. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not - * use this file except in compliance with the License. You may obtain a copy - * of the License at http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * - * See the License for the specific language governing permissions and - * limitations under the License. - * - *********************************************************************** */ -package org.mustangproject.toecount; - -import java.math.BigDecimal; - -import org.mustangproject.ZUGFeRD.ZUGFeRDImporter; - -public class FileChecker { - String filename; - StatRun thisRun; - boolean isPDF = false; - - public FileChecker(String filename, StatRun statistics) { - this.filename = filename; - thisRun = statistics; - thisRun.incFileCount(); - String extension = ""; - if (!thisRun.shallIgnoreFileExt()) { - int extIndex = filename.lastIndexOf("."); - if (extIndex >= 0) { - extension = filename.substring(extIndex).toLowerCase(); - isPDF = extension.equals(".pdf");// alternative check for PDF: File starts with %PDF- - if (isPDF) { - thisRun.incPDFCount(); - } - } - - } else { - thisRun.incPDFCount(); - } - } - - public boolean checkForZUGFeRD() { - if ((!isPDF) && (!thisRun.shallIgnoreFileExt())) { - return false; - } - ZUGFeRDImporter zi = new ZUGFeRDImporter(filename); - try { - if (zi.canParse()) { - thisRun.incZUGFeRDCount(zi.getVersion()); - thisRun.incTotal(new BigDecimal(zi.getAmount())); - return true; - } else { - return false; - } - } catch (NullPointerException e) { - // something really rare happened -- corrupted ZF? - /*** - * e.g. Exception in thread "main" java.lang.NullPointerException - at org.mustangproject.ZUGFeRD.ZUGFeRDImporter.extractLowLevel(ZUGFeRDImporter.java:90) - at org.mustangproject.ZUGFeRD.ZUGFeRDImporter.extract(ZUGFeRDImporter.java:64) - at toecount.FileChecker.checkForZUGFeRD(FileChecker.java:33) - at toecount.Toecount.main(Toecount.java:111) - * - */ - // Ignore nevertheless, most likely we're batch processing - return false; - } catch (Exception e2) { - /** - * probably thrown up from - AM org.apache.pdfbox.pdfparser.PDFParser parse, most likely - INFORMATION: Document is encrypted - but also other internal PDF errors possible like - ..Okt 23, 2015 11:17:53 AM org.apache.pdfbox.pdfparser.XrefTrailerResolver setStartxref - */ - return false; - } - } - - public boolean isPDF() { - return isPDF; - } - - public String getOutputLine() { - return thisRun.getOutputLine(); - } - -} diff --git a/libraryBasic/src/main/java/org/mustangproject/toecount/FileTraverser.java b/libraryBasic/src/main/java/org/mustangproject/toecount/FileTraverser.java deleted file mode 100755 index da530782..00000000 --- a/libraryBasic/src/main/java/org/mustangproject/toecount/FileTraverser.java +++ /dev/null @@ -1,75 +0,0 @@ -/** ********************************************************************** - * - * Copyright 2018 Jochen Staerk - * - * Use is subject to license terms. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not - * use this file except in compliance with the License. You may obtain a copy - * of the License at http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * - * See the License for the specific language governing permissions and - * limitations under the License. - * - *********************************************************************** */ -package org.mustangproject.toecount; - -import java.io.IOException; -import java.nio.file.FileVisitResult; -import java.nio.file.Path; -import java.nio.file.SimpleFileVisitor; -import java.nio.file.attribute.BasicFileAttributes; - -import static java.nio.file.FileVisitResult.CONTINUE; - -public class FileTraverser extends SimpleFileVisitor { - - - private StatRun thisRun; - - public FileTraverser(StatRun statistics) { - this.thisRun = statistics; - } - - /** - * check each file - */ - @Override - public FileVisitResult visitFile(Path file, BasicFileAttributes attr) { - if (attr.isSymbolicLink()) { - // Not yet handled - } else if (attr.isRegularFile()) { - String filename = file.toString(); - FileChecker fc = new FileChecker(filename, thisRun); - fc.checkForZUGFeRD(); - System.out.print(fc.getOutputLine()); - - } - return CONTINUE; - } - - /** - * for each directory - */ - @Override - public FileVisitResult postVisitDirectory(Path dir, IOException exc) { - // System.out.format("Directory: %s%n", dir); - thisRun.incDirCount(); - return CONTINUE; - } - - - /** - * show errors like file permission stacktraces - */ - @Override - public FileVisitResult visitFileFailed(Path file, IOException exc) { - System.err.println(exc); - return CONTINUE; - } - -} diff --git a/libraryBasic/src/main/java/org/mustangproject/toecount/StatRun.java b/libraryBasic/src/main/java/org/mustangproject/toecount/StatRun.java deleted file mode 100755 index 8768850b..00000000 --- a/libraryBasic/src/main/java/org/mustangproject/toecount/StatRun.java +++ /dev/null @@ -1,99 +0,0 @@ -/** ********************************************************************** - * - * Copyright 2018 Jochen Staerk - * - * Use is subject to license terms. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not - * use this file except in compliance with the License. You may obtain a copy - * of the License at http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * - * See the License for the specific language governing permissions and - * limitations under the License. - * - *********************************************************************** */ -package org.mustangproject.toecount; - -import java.math.BigDecimal; - -public class StatRun { - private int pdfCount = 0; - private int horseCount = 0; - private int fileCount = 0; - private int dirCount = 0; - private BigDecimal total = BigDecimal.ZERO; - private boolean checkFileExt = true; - - public void ignoreFileExtension() { - checkFileExt = false; - } - - public boolean shallIgnoreFileExt() { - return !checkFileExt; - } - - public void incFileCount() { - fileCount++; - } - - public void incPDFCount() { - pdfCount++; - } - - public void incZUGFeRDCount(int version) { - horseCount++; - } - - public void incDirCount() { - dirCount++; - } - - public int getFileCount() { - return fileCount; - } - - public int getPDFCount() { - return pdfCount; - } - - public int getZUGFeRDCount() { - return horseCount; - } - - public int getDirCount() { - return dirCount; - } - - /** - * returns final statistics - * - * @return english string with linefeeds detailling number of files, directories, number of pdfs and of zugferd files - */ - public String getSummaryLine() { - - return "\r\n===================================================================\r\n" + String.format( - "Files:\t%d\tDirs:\t%d\tPDF:\t%d\tZUGFeRD:\t%d\tTotal:\t%s\r\n", - getFileCount(), getDirCount(), getPDFCount(), getZUGFeRDCount(), total.toString()); - - } - - /** - * show that something is happening - * - * @return String, usually a dot - */ - public String getOutputLine() { - return "."; - } - - public void incTotal(BigDecimal delta) { - total=total.add(delta); - - } - - -} diff --git a/libraryBasic/src/main/java/org/mustangproject/toecount/Toecount.java b/libraryBasic/src/main/java/org/mustangproject/toecount/Toecount.java deleted file mode 100755 index a29e58c8..00000000 --- a/libraryBasic/src/main/java/org/mustangproject/toecount/Toecount.java +++ /dev/null @@ -1,621 +0,0 @@ -/** ********************************************************************** - * - * Copyright 2018 Jochen Staerk - * - * Use is subject to license terms. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not - * use this file except in compliance with the License. You may obtain a copy - * of the License at http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * - * See the License for the specific language governing permissions and - * limitations under the License. - * - *********************************************************************** */ -package org.mustangproject.toecount; - -import java.io.BufferedReader; -import java.io.File; -import java.io.IOException; -import java.io.InputStreamReader; -import java.nio.file.Files; -import java.nio.file.Path; -import java.nio.file.Paths; -import java.util.logging.Level; -import java.util.logging.Logger; - -import javax.xml.transform.TransformerException; - -import org.mustangproject.ZUGFeRD.ZUGFeRDConformanceLevel; -import org.mustangproject.ZUGFeRD.ZUGFeRDExporter; -import org.mustangproject.ZUGFeRD.ZUGFeRDExporterFromA1Factory; -import org.mustangproject.ZUGFeRD.ZUGFeRDImporter; -import org.mustangproject.ZUGFeRD.ZUGFeRDMigrator; - -/*** - * This is the command line interface to mustangproject - * - */ - -import com.sanityinc.jargs.CmdLineParser; -import com.sanityinc.jargs.CmdLineParser.Option; - -public class Toecount { - // build with: /opt/local/bin/mvn clean compile assembly:single - private static void printUsage() { - System.err.println(getUsage()); - } - - private static String getUsage() { - return "Usage: [-d,--directory] [-l,--listfromstdin] [-i,--ignorefileextension] | [-c,--combine] | [-e,--extract] | [-u,--upgrade] | [-a,--a3only] | [-h,--help] \r\n" - + "* Count operations\n" + " -d, --directory count ZUGFeRD files in directory to be scanned\n" - + " If it is a directory, it will recurse.\n" - + " -l, --listfromstdin count ZUGFeRD files from a list of linefeed separated files on runtime.\n" - + " It will start once a blank line has been entered.\n" + "\n" - + " Additional parameter for both count operations\n" - + " [-i, --ignorefileextension] Check for all files (*.*) instead of PDF files only (*.pdf)\n" - + "\n" + "* Merge operations\n" + " -e, --extract extract ZUGFeRD PDF to XML file\n" - + " Additional parameters (optional - user will be prompted if not defined)\n" - + " [--source ]: set input PDF file\n" - + " [--out ]: set output XML file\n" - + " -u, --upgrade upgrade ZUGFeRD XML to ZUGFeRD 2 XML\n" - + " Additional parameters (optional - user will be prompted if not defined)\n" - + " [--source ]: set input XML ZUGFeRD 1 file\n" - + " [--out ]: set output XML ZUGFeRD 2 file\n" - + " -a, --a3only upgrade from PDF/A1 to A3 only (no ZUGFeRD data attached)\n" - + " Additional parameters (optional - user will be prompted if not defined)\n" - + " [--source ]: set input PDF file\n" - + " [--out ]: set output PDF file\n" - + " -c, --combine combine XML and PDF file to ZUGFeRD PDF file\n" - + " Additional parameters (optional - user will be prompted if not defined)\n" - + " [--source ]: set input PDF file\n" - + " [--source-xml ]: set input XML file\n" - + " [--out ]: set output PDF file\n" - + " [--format ]: set ZUGFeRD or FacturX\n" - + " [--version <1|2>]: set ZUGFeRD version\n" - + " [--profile <...>]: set ZUGFeRD profile\n" - + " For ZUGFeRD v1: ASIC, OMFORT or XTENDED\n" - + " For ZUGFeRD v2: INIMUM, BASIC L, ASIC, IUS, N16931, ETENDED "; - } - - private static void printHelp() { - System.out.println("Mustangproject.org " + org.mustangproject.ZUGFeRD.Version.VERSION + " \r\n" - + "A Apache Public License library and command line tool for statistics on PDF invoices with\r\n" - + "ZUGFeRD Metadata (http://www.zugferd.org)\r\n" + "\r\n" + getUsage() + "\r\n" - + "* Count operations\r\n" + "\t-d, --directory\tcount ZUGFeRD files in directory to be scanned\r\n" - + "\t\tIf it is a directory, it will recurse.\r\n" - + "\t-l, --listfromstdin\tcount ZUGFeRD files from a list of linefeed separated files on runtime.\r\n" - + "\t\tIt will start once a blank line has been entered.\r\n" + "\r\n" - + "\tAdditional parameter for both count operations\r\n" - + "\t[-i, --ignorefileextension]\tCheck for all files (*.*) instead of PDF files only (*.pdf)\r\n" - + "\r\n" + "* Merge operations\r\n" + "\t-e, --extract\textract ZUGFeRD PDF to XML file\r\n" - + "\t\tAdditional parameters (optional - user will be prompted if not defined)\r\n" - + "\t\t[--source ]: set input PDF file\r\n" - + "\t\t[--out ]: set output XML file\r\n" - + "\t-u, --upgrade\tupgrade ZUGFeRD XML to ZUGFeRD 2 XML\r\n" - + "\t\tAdditional parameters (optional - user will be prompted if not defined)\r\n" - + "\t\t[--source ]: set input XML ZUGFeRD 1 file\r\n" - + "\t\t[--out ]: set output XML ZUGFeRD 2 file\r\n" - + "\t-a, --a3only\tupgrade from PDF/A1 to A3 only (no ZUGFeRD data attached) \r\n" - + "\t\tAdditional parameters (optional - user will be prompted if not defined)\r\n" - + "\t\t[--source ]: set input PDF file\r\n" - + "\t\t[--out ]: set output PDF file\r\n" - + "\t-c, --combine\tcombine XML and PDF file to ZUGFeRD PDF file\r\n" - + "\t\tAdditional parameters (optional - user will be prompted if not defined)\r\n" - + "\t\t[--source ]: set input PDF file\r\n" - + "\t\t[--source-xml ]: set input XML file\r\n" - + "\t\t[--out ]: set output PDF file\r\n" - + "\t\t[--format ]: enable factur-x or ZUGFeRD\r\n" - + "\t\t[--version <1|2>]: set ZUGFeRD version\r\n" + "\t\t[--profile <...>]: set ZUGFeRD profile\r\n" - + "\t\t\tFor ZUGFeRD v1: ASIC, OMFORT or XTENDED\r\n" - + "\t\t\tFor ZUGFeRD v2: INIMUM, BASIC L, ASIC, IUS, N16931, ETENDED\r\n"); - } - - /** - * Asks the user (repeatedly, if neccessary) on the command line for a String - * (offering a defaultValue) conforming to a Regex pattern - * - * @param prompt - * the question to be asked to the user - * @param defaultValue - * the default return value if user hits enter - * @param pattern - * a regex of acceptable values - * @return the user answer conforming to pattern - * @throws Exception - * if pattern not compielable or IOexception on input - */ - protected static String getStringFromUser(String prompt, String defaultValue, String pattern) throws Exception { - String input = ""; - if (!defaultValue.matches(pattern)) { - throw new Exception("Default value must match pattern"); - } - boolean firstInput = true; - do { - // for a more sophisticated dialogue maybe https://github.com/mabe02/lanterna/ - // could be taken into account - System.out.print(prompt + " (default: " + defaultValue + ")"); - if (!firstInput) { - System.out.print("\n(allowed pattern: " + pattern + ")"); - - } - System.out.print(":"); - BufferedReader buffer = new BufferedReader(new InputStreamReader(System.in)); - try { - input = buffer.readLine(); - } catch (IOException e) { - Logger.getLogger(Toecount.class.getName()).log(Level.SEVERE, null, e); - - } - - if (input.isEmpty()) { - // pressed return without entering anything - input = defaultValue; - } - - firstInput = false; - } while (!input.matches(pattern)); - - return input; - } - - /** - * Prompts the user for a input or output filename - * - * @param prompt the text the user is asked - * @param defaultFilename a default Filename - * @param expectedExtension will warn if filename does not match expected file extension - * @param ensureFileExists will warn if file does NOT exist (for input files) - * @param ensureFileNotExists will warn if file DOES exist (for output files) - * @return String - */ - protected static String getFilenameFromUser(String prompt, String defaultFilename, String expectedExtension, - boolean ensureFileExists, boolean ensureFileNotExists) { - boolean fileExistenceOK = false; - String selectedName = ""; - do { - // for a more sophisticated dialogue maybe https://github.com/mabe02/lanterna/ - // could be taken into account - System.out.print(prompt + " (default: " + defaultFilename + "):"); - BufferedReader buffer = new BufferedReader(new InputStreamReader(System.in)); - try { - selectedName = buffer.readLine(); - } catch (IOException e) { - Logger.getLogger(Toecount.class.getName()).log(Level.SEVERE, null, e); - - } - - if (selectedName.isEmpty()) { - // pressed return without entering anything - selectedName = defaultFilename; - } - - // error cases - if (!selectedName.toLowerCase().endsWith(expectedExtension.toLowerCase())) { - System.err.println("Expected " + expectedExtension - + " extension, this may corrupt your file. Do you still want to continue?(Y|N)"); - String selectedAnswer = ""; - try { - selectedAnswer = buffer.readLine(); - } catch (IOException e) { - Logger.getLogger(Toecount.class.getName()).log(Level.SEVERE, null, e); - } - if (!selectedAnswer.equals("Y") && !selectedAnswer.equals("y")) { - System.err.println("Aborted by user"); - System.exit(-1); - } - - } else if (ensureFileExists) { - if (fileExists(selectedName)) { - fileExistenceOK = true; - } else { - System.out.println("File does not exist, try again or CTRL+C to cancel"); - // discard the input, a scanner.reset is not sufficient - fileExistenceOK = false; - } - } else { - fileExistenceOK = true; - - if (ensureFileNotExists) { - if (fileExists(selectedName)) { - fileExistenceOK = false; - System.out.println("Output file already exists, try again or CTRL+C to cancel"); - // discard the input, a scanner.reset is not sufficient - } - } else { - fileExistenceOK = true; - } - } - - } while (!fileExistenceOK); - - return selectedName; - } - - // /opt/local/bin/mvn clean compile assembly:single - public static void main(String[] args) { - try { - - CmdLineParser parser = new CmdLineParser(); - - // Option: Help - Option helpOption = parser.addBooleanOption('h', "help"); - // Option: Action - Option actionOption = parser.addStringOption('a', "action"); - - // Generic options available for multiple command - // --source: input file - Option sourceOption = parser.addStringOption("source"); - // --out: output file - Option outOption = parser.addStringOption("out"); - - // Command: Extract XML - // --extract - // (--source: input PDF file) - // (--out: output XML file) - Option extractOption = parser.addBooleanOption('e', "extract"); - - // Command: Migrating ZUGFeRD 1 to 2 - // --upgrade - // (--source: input XML ZUGFeRD 1 file) - // (--out: output XML ZUGFeRD 2 file) - Option upgradeOption = parser.addBooleanOption('u', "upgrade"); - - // Command: Convert PDF/A-1 to PDF/A-3 - // --a3only - // (--source: input PDF file) - // (--out: output PDF file) - Option a3onlyOption = parser.addBooleanOption('a', "a3only"); - - // Command: Combining PDF and XML - // --combine - // (--source: input PDF file) - // (--source-xml: input XML file) - // (--out: output PDF file) - // (--version: ZUGFeRD version) - // (--profile: ZUGFeRD profile) - Option combineOption = parser.addBooleanOption('c', "combine"); - Option sourceXmlOption = parser.addStringOption("source-xml"); - Option formatOption = parser.addStringOption('f', "format"); - Option zugferdVersionOption = parser.addStringOption("version"); - Option zugferdProfileOption = parser.addStringOption("profile"); - - // Command: Show metrics in dir - // --directory - // (--ignorefileextension) - Option dirnameOption = parser.addStringOption('d', "directory"); - Option ignoreFileExtOption = parser.addBooleanOption('i', "ignorefileextension"); - - // Command: Show metrics from list from stdin - // --listfromstdin - Option filesFromStdInOption = parser.addBooleanOption('l', "listfromstdin"); - - try { - parser.parse(args); - } catch (CmdLineParser.OptionException e) { - System.err.println(e.getMessage()); - printUsage(); - System.exit(2); - } - - // Retrieve all options - String action = parser.getOptionValue(actionOption); - String directoryName = parser.getOptionValue(dirnameOption); - Boolean filesFromStdIn = parser.getOptionValue(filesFromStdInOption, Boolean.FALSE); - Boolean combineRequested = parser.getOptionValue(combineOption, Boolean.FALSE) || ((action!=null)&&(action.equals("combine"))); - Boolean extractRequested = parser.getOptionValue(extractOption, Boolean.FALSE) || ((action!=null)&&(action.equals("extract"))); - Boolean helpRequested = parser.getOptionValue(helpOption, Boolean.FALSE) || ((action!=null)&&(action.equals("help"))); - Boolean upgradeRequested = parser.getOptionValue(upgradeOption, Boolean.FALSE) || ((action!=null)&&(action.equals("upgrade"))); - Boolean ignoreFileExt = parser.getOptionValue(ignoreFileExtOption, Boolean.FALSE); - Boolean a3only = parser.getOptionValue(a3onlyOption, Boolean.FALSE) || ((action!=null)&&(action.equals("a3"))); - String sourceName = parser.getOptionValue(sourceOption); - String sourceXMLName = parser.getOptionValue(sourceXmlOption); - String outName = parser.getOptionValue(outOption); - String format = parser.getOptionValue(formatOption); - String zugferdVersion = parser.getOptionValue(zugferdVersionOption); - String zugferdProfile = parser.getOptionValue(zugferdProfileOption); - - if (helpRequested) { - printHelp(); - } else if (((directoryName != null) && (directoryName.length() > 0)) || filesFromStdIn.booleanValue()) { - performMetrics(directoryName, filesFromStdIn, ignoreFileExt); - } else if (combineRequested) { - performCombine(sourceName, sourceXMLName, outName, format, zugferdVersion, zugferdProfile); - } else if (extractRequested) { - performExtract(sourceName, outName); - } else if (a3only) { - performConvert(sourceName, outName); - } else if (upgradeRequested) { - performUpgrade(sourceName, outName); - } else { - // no argument or argument unknown - printUsage(); - System.exit(2); - } - } catch (Exception e) { - - Logger.getLogger(Toecount.class.getName()).log(Level.SEVERE, null, e); - System.exit(-1); - } - - } - - private static void performUpgrade(String xmlName, String outName) throws IOException, TransformerException { - - // Get params from user if not already defined - if (xmlName == null) { - xmlName = getFilenameFromUser("ZUGFeRD 1.0 XML source", "ZUGFeRD-invoice.xml", "xml", true, false); - } else { - System.out.println("ZUGFeRD 1.0 XML source set to " + xmlName); - } - if (outName == null) { - outName = getFilenameFromUser("ZUGFeRD 2.0 XML target", "zugferd-invoice.xml", "xml", false, true); - } else { - System.out.println("ZUGFeRD 1.0 XML source set to " + outName); - } - - // Verify params - ensureFileExists(xmlName); - ensureFileNotExists(outName); - - // All params are good! continue... - ZUGFeRDMigrator zmi = new ZUGFeRDMigrator(); - String xml = null; - xml = zmi.migrateFromV1ToV2(xmlName); - Files.write(Paths.get(outName), xml.getBytes()); - System.out.println("Written to " + outName); - /* - * } catch (FileNotFoundException ex) { - * Logger.getLogger(Toecount.class.getName()).log(Level.SEVERE, null, ex); - */ - } - - private static void performConvert(String pdfName, String outName) throws IOException { - /* - * ZUGFeRDExporter ze= new ZUGFeRDExporterFromA1Factory() - * .setProducer("toecount") .setCreator(System.getProperty("user.name")) - * .loadFromPDFA1("invoice.pdf"); - */ - // Get params from user if not already defined - if (pdfName == null) { - pdfName = getFilenameFromUser("Source PDF", "invoice.pdf", "pdf", true, false); - } else { - System.out.println("Source PDF set to " + pdfName); - } - if (outName == null) { - outName = getFilenameFromUser("Target PDF", "invoice.a3.pdf", "pdf", false, true); - } else { - System.out.println("Target PDF set to " + outName); - } - - // Verify params - ensureFileExists(pdfName); - ensureFileNotExists(outName); - - // All params are good! continue... - ZUGFeRDExporter ze = new ZUGFeRDExporterFromA1Factory().setAttachZUGFeRDHeaders(false).load(pdfName); - - ze.export(outName); - System.out.println("Written to " + outName); - } - - private static void performExtract(String pdfName, String xmlName) throws IOException { - // Get params from user if not already defined - if (pdfName == null) { - pdfName = getFilenameFromUser("Source PDF", "invoice.pdf", "pdf", true, false); - } else { - System.out.println("Source PDF set to " + pdfName); - } - if (xmlName == null) { - xmlName = getFilenameFromUser("ZUGFeRD XML", "ZUGFeRD-invoice.xml", "xml", false, true); - } else { - System.out.println("ZUGFeRD XML set to " + pdfName); - } - - // Verify params - ensureFileExists(pdfName); - ensureFileNotExists(xmlName); - - // All params are good! continue... - ZUGFeRDImporter zi = new ZUGFeRDImporter(pdfName); - byte[] XMLContent = zi.getRawXML(); - if (XMLContent == null) { - System.err.println("No ZUGFeRD XML found in PDF file"); - - } else { - Files.write(Paths.get(xmlName), XMLContent); - System.out.println("Written to " + xmlName); - } - } - - private static void performCombine(String pdfName, String xmlName, String outName, String format, String zfVersion, - String zfProfile) throws Exception { - /* - * ZUGFeRDExporter ze= new ZUGFeRDExporterFromA1Factory() - * .setProducer("toecount") .setCreator(System.getProperty("user.name")) - * .loadFromPDFA1("invoice.pdf"); - */ - try { - int zfIntVersion = ZUGFeRDExporter.DefaultZUGFeRDVersion; - ZUGFeRDConformanceLevel zfConformanceLevelProfile = ZUGFeRDConformanceLevel.EXTENDED; - - if (pdfName == null) { - pdfName = getFilenameFromUser("Source PDF", "invoice.pdf", "pdf", true, false); - } else { - System.out.println("Source PDF set to " + pdfName); - } - - if (xmlName == null) { - xmlName = getFilenameFromUser("ZUGFeRD XML", "ZUGFeRD-invoice.xml", "xml", true, false); - } else { - System.out.println("ZUGFeRD XML set to " + xmlName); - } - - if (outName == null) { - outName = getFilenameFromUser("Ouput PDF", "invoice.ZUGFeRD.pdf", "pdf", false, true); - } else { - System.out.println("Ouput PDF set to " + outName); - } - - if (format == null) { - try { - format = getStringFromUser("Format (fx=Factur-X, zf=ZUGFeRD,)", "zf", "fx|zf"); - } catch (Exception e) { - Logger.getLogger(Toecount.class.getName()).log(Level.SEVERE, null, e); - } - } else { - System.out.println("Format set to " + format); - } - - if (zfVersion == null) { - try { - zfVersion = getStringFromUser("Version (1 or 2)", "1", "1|2"); - } catch (Exception e) { - Logger.getLogger(Toecount.class.getName()).log(Level.SEVERE, null, e); - } - } else { - System.out.println("Version set to " + zfVersion); - } - zfIntVersion = Integer.valueOf(zfVersion); - - if (zfProfile == null) { - try { - if (format.equals("zf") && (zfIntVersion == 1)) { - zfProfile = getStringFromUser("Profile b)asic, c)omfort or e)xtended", "e", "B|b|C|c|E|e"); - } else { - zfProfile = getStringFromUser( - "Profile [M]INIMUM, BASIC [W]L, [B]ASIC,\n" + "[C]IUS, [E]N16931, E[X]TENDED", "E", - "M|m|W|w|B|b|C|c|E|e|X|x|"); - } - } catch (Exception e) { - Logger.getLogger(Toecount.class.getName()).log(Level.SEVERE, null, e); - - } - } else { - System.out.println("Profile set to " + zfProfile); - } - zfProfile = zfProfile.toLowerCase(); - - // Verify params - ensureFileExists(pdfName); - ensureFileExists(xmlName); - ensureFileNotExists(outName); - - if ((format.equals("fx")) && (zfIntVersion > 1)) { - throw new Exception("Factur-X is only available in version 1 (roughly corresponding to ZF2)"); - } - - if ((format.equals("zf")) && (zfIntVersion == 1)) { - if (zfProfile.equals("b")) { - zfConformanceLevelProfile = ZUGFeRDConformanceLevel.BASIC; - } else if (zfProfile.equals("c")) { - zfConformanceLevelProfile = ZUGFeRDConformanceLevel.COMFORT; - } else if (zfProfile.equals("e")) { - zfConformanceLevelProfile = ZUGFeRDConformanceLevel.EXTENDED; - } else { - throw new Exception(String.format("Unknown ZUGFeRD profile '%s'", zfProfile)); - } - } else if (((format.equals("zf")) && (zfIntVersion == 2)) || (format.equals("fx"))) { - if (zfProfile.equals("m")) { - zfConformanceLevelProfile = ZUGFeRDConformanceLevel.MINIMUM; - } else if (zfProfile.equals("w")) { - zfConformanceLevelProfile = ZUGFeRDConformanceLevel.BASICWL; - } else if (zfProfile.equals("b")) { - zfConformanceLevelProfile = ZUGFeRDConformanceLevel.BASIC; - } else if (zfProfile.equals("c")) { - zfConformanceLevelProfile = ZUGFeRDConformanceLevel.CIUS; - } else if (zfProfile.equals("e")) { - zfConformanceLevelProfile = ZUGFeRDConformanceLevel.EN16931; - } else if (zfProfile.equals("x")) { - zfConformanceLevelProfile = ZUGFeRDConformanceLevel.EXTENDED; - } else { - throw new Exception(String.format("Unknown ZUGFeRD profile '%s'", zfProfile)); - } - } else { - throw new Exception(String.format("Unknown version '%i'", zfIntVersion)); - } - - // All params are good! continue... - ZUGFeRDExporter ze = new ZUGFeRDExporterFromA1Factory().setProducer("Toecount") - .setZUGFeRDVersion(zfIntVersion) - .setCreator(System.getProperty("user.name")).setZUGFeRDConformanceLevel(zfConformanceLevelProfile) - .load(pdfName); - - if (format.equals("fx")) { - ze.setFacturX(); - } - - ze.setZUGFeRDXMLData(Files.readAllBytes(Paths.get(xmlName))); - - ze.export(outName); - - System.out.println("Written to " + outName); - - } catch (IOException e) { - Logger.getLogger(Toecount.class.getName()).log(Level.SEVERE, null, e); - - } - } - - private static void performMetrics(String directoryName, Boolean filesFromStdIn, Boolean ignoreFileExt) - throws IOException { - - StatRun sr = new StatRun(); - if (ignoreFileExt) { - sr.ignoreFileExtension(); - } - if (directoryName != null) { - Path startingDir = Paths.get(directoryName); - - if (Files.isRegularFile(startingDir)) { - String filename = startingDir.toString(); - FileChecker fc = new FileChecker(filename, sr); - - fc.checkForZUGFeRD(); - System.out.print(fc.getOutputLine()); - - } else if (Files.isDirectory(startingDir)) { - FileTraverser pf = new FileTraverser(sr); - Files.walkFileTree(startingDir, pf); - } - } - - if (filesFromStdIn) { - BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); - String s; - while ((s = in.readLine()) != null && s.length() != 0) { - FileChecker fc = new FileChecker(s, sr); - - fc.checkForZUGFeRD(); - System.out.print(fc.getOutputLine()); - - } - - } - System.out.println(sr.getSummaryLine()); - } - - private static void ensureFileExists(String fileName) throws IOException { - if (!fileExists(fileName)) { - throw new IOException(String.format("File %s does not exists", fileName)); - } - } - - private static void ensureFileNotExists(String fileName) throws IOException { - if (fileExists(fileName)) { - throw new IOException(String.format("File %s does not exists", fileName)); - } - } - - private static Boolean fileExists(String fileName) { - if (fileName == null) - return false; - File f = new File(fileName); - return f.exists(); - } - -} diff --git a/libraryExtended/mvnw b/libraryExtended/mvnw deleted file mode 100755 index 41c0f0c2..00000000 --- a/libraryExtended/mvnw +++ /dev/null @@ -1,310 +0,0 @@ -#!/bin/sh -# ---------------------------------------------------------------------------- -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# ---------------------------------------------------------------------------- - -# ---------------------------------------------------------------------------- -# Maven Start Up Batch script -# -# Required ENV vars: -# ------------------ -# JAVA_HOME - location of a JDK home dir -# -# Optional ENV vars -# ----------------- -# M2_HOME - location of maven2's installed home dir -# MAVEN_OPTS - parameters passed to the Java VM when running Maven -# e.g. to debug Maven itself, use -# set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 -# MAVEN_SKIP_RC - flag to disable loading of mavenrc files -# ---------------------------------------------------------------------------- - -if [ -z "$MAVEN_SKIP_RC" ] ; then - - if [ -f /etc/mavenrc ] ; then - . /etc/mavenrc - fi - - if [ -f "$HOME/.mavenrc" ] ; then - . "$HOME/.mavenrc" - fi - -fi - -# OS specific support. $var _must_ be set to either true or false. -cygwin=false; -darwin=false; -mingw=false -case "`uname`" in - CYGWIN*) cygwin=true ;; - MINGW*) mingw=true;; - Darwin*) darwin=true - # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home - # See https://developer.apple.com/library/mac/qa/qa1170/_index.html - if [ -z "$JAVA_HOME" ]; then - if [ -x "/usr/libexec/java_home" ]; then - export JAVA_HOME="`/usr/libexec/java_home`" - else - export JAVA_HOME="/Library/Java/Home" - fi - fi - ;; -esac - -if [ -z "$JAVA_HOME" ] ; then - if [ -r /etc/gentoo-release ] ; then - JAVA_HOME=`java-config --jre-home` - fi -fi - -if [ -z "$M2_HOME" ] ; then - ## resolve links - $0 may be a link to maven's home - PRG="$0" - - # need this for relative symlinks - while [ -h "$PRG" ] ; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG="`dirname "$PRG"`/$link" - fi - done - - saveddir=`pwd` - - M2_HOME=`dirname "$PRG"`/.. - - # make it fully qualified - M2_HOME=`cd "$M2_HOME" && pwd` - - cd "$saveddir" - # echo Using m2 at $M2_HOME -fi - -# For Cygwin, ensure paths are in UNIX format before anything is touched -if $cygwin ; then - [ -n "$M2_HOME" ] && - M2_HOME=`cygpath --unix "$M2_HOME"` - [ -n "$JAVA_HOME" ] && - JAVA_HOME=`cygpath --unix "$JAVA_HOME"` - [ -n "$CLASSPATH" ] && - CLASSPATH=`cygpath --path --unix "$CLASSPATH"` -fi - -# For Mingw, ensure paths are in UNIX format before anything is touched -if $mingw ; then - [ -n "$M2_HOME" ] && - M2_HOME="`(cd "$M2_HOME"; pwd)`" - [ -n "$JAVA_HOME" ] && - JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`" -fi - -if [ -z "$JAVA_HOME" ]; then - javaExecutable="`which javac`" - if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then - # readlink(1) is not available as standard on Solaris 10. - readLink=`which readlink` - if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then - if $darwin ; then - javaHome="`dirname \"$javaExecutable\"`" - javaExecutable="`cd \"$javaHome\" && pwd -P`/javac" - else - javaExecutable="`readlink -f \"$javaExecutable\"`" - fi - javaHome="`dirname \"$javaExecutable\"`" - javaHome=`expr "$javaHome" : '\(.*\)/bin'` - JAVA_HOME="$javaHome" - export JAVA_HOME - fi - fi -fi - -if [ -z "$JAVACMD" ] ; then - if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" - else - JAVACMD="$JAVA_HOME/bin/java" - fi - else - JAVACMD="`which java`" - fi -fi - -if [ ! -x "$JAVACMD" ] ; then - echo "Error: JAVA_HOME is not defined correctly." >&2 - echo " We cannot execute $JAVACMD" >&2 - exit 1 -fi - -if [ -z "$JAVA_HOME" ] ; then - echo "Warning: JAVA_HOME environment variable is not set." -fi - -CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher - -# traverses directory structure from process work directory to filesystem root -# first directory with .mvn subdirectory is considered project base directory -find_maven_basedir() { - - if [ -z "$1" ] - then - echo "Path not specified to find_maven_basedir" - return 1 - fi - - basedir="$1" - wdir="$1" - while [ "$wdir" != '/' ] ; do - if [ -d "$wdir"/.mvn ] ; then - basedir=$wdir - break - fi - # workaround for JBEAP-8937 (on Solaris 10/Sparc) - if [ -d "${wdir}" ]; then - wdir=`cd "$wdir/.."; pwd` - fi - # end of workaround - done - echo "${basedir}" -} - -# concatenates all lines of a file -concat_lines() { - if [ -f "$1" ]; then - echo "$(tr -s '\n' ' ' < "$1")" - fi -} - -BASE_DIR=`find_maven_basedir "$(pwd)"` -if [ -z "$BASE_DIR" ]; then - exit 1; -fi - -########################################################################################## -# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central -# This allows using the maven wrapper in projects that prohibit checking in binary data. -########################################################################################## -if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then - if [ "$MVNW_VERBOSE" = true ]; then - echo "Found .mvn/wrapper/maven-wrapper.jar" - fi -else - if [ "$MVNW_VERBOSE" = true ]; then - echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..." - fi - if [ -n "$MVNW_REPOURL" ]; then - jarUrl="$MVNW_REPOURL/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar" - else - jarUrl="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar" - fi - while IFS="=" read key value; do - case "$key" in (wrapperUrl) jarUrl="$value"; break ;; - esac - done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties" - if [ "$MVNW_VERBOSE" = true ]; then - echo "Downloading from: $jarUrl" - fi - wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" - if $cygwin; then - wrapperJarPath=`cygpath --path --windows "$wrapperJarPath"` - fi - - if command -v wget > /dev/null; then - if [ "$MVNW_VERBOSE" = true ]; then - echo "Found wget ... using wget" - fi - if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then - wget "$jarUrl" -O "$wrapperJarPath" - else - wget --http-user=$MVNW_USERNAME --http-password=$MVNW_PASSWORD "$jarUrl" -O "$wrapperJarPath" - fi - elif command -v curl > /dev/null; then - if [ "$MVNW_VERBOSE" = true ]; then - echo "Found curl ... using curl" - fi - if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then - curl -o "$wrapperJarPath" "$jarUrl" -f - else - curl --user $MVNW_USERNAME:$MVNW_PASSWORD -o "$wrapperJarPath" "$jarUrl" -f - fi - - else - if [ "$MVNW_VERBOSE" = true ]; then - echo "Falling back to using Java to download" - fi - javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java" - # For Cygwin, switch paths to Windows format before running javac - if $cygwin; then - javaClass=`cygpath --path --windows "$javaClass"` - fi - if [ -e "$javaClass" ]; then - if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then - if [ "$MVNW_VERBOSE" = true ]; then - echo " - Compiling MavenWrapperDownloader.java ..." - fi - # Compiling the Java class - ("$JAVA_HOME/bin/javac" "$javaClass") - fi - if [ -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then - # Running the downloader - if [ "$MVNW_VERBOSE" = true ]; then - echo " - Running MavenWrapperDownloader.java ..." - fi - ("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR") - fi - fi - fi -fi -########################################################################################## -# End of extension -########################################################################################## - -export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"} -if [ "$MVNW_VERBOSE" = true ]; then - echo $MAVEN_PROJECTBASEDIR -fi -MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS" - -# For Cygwin, switch paths to Windows format before running java -if $cygwin; then - [ -n "$M2_HOME" ] && - M2_HOME=`cygpath --path --windows "$M2_HOME"` - [ -n "$JAVA_HOME" ] && - JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"` - [ -n "$CLASSPATH" ] && - CLASSPATH=`cygpath --path --windows "$CLASSPATH"` - [ -n "$MAVEN_PROJECTBASEDIR" ] && - MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"` -fi - -# Provide a "standardized" way to retrieve the CLI args that will -# work with both Windows and non-Windows executions. -MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $@" -export MAVEN_CMD_LINE_ARGS - -WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain - -exec "$JAVACMD" \ - $MAVEN_OPTS \ - -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \ - "-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \ - ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@" diff --git a/libraryExtended/mvnw.cmd b/libraryExtended/mvnw.cmd deleted file mode 100644 index 86115719..00000000 --- a/libraryExtended/mvnw.cmd +++ /dev/null @@ -1,182 +0,0 @@ -@REM ---------------------------------------------------------------------------- -@REM Licensed to the Apache Software Foundation (ASF) under one -@REM or more contributor license agreements. See the NOTICE file -@REM distributed with this work for additional information -@REM regarding copyright ownership. The ASF licenses this file -@REM to you under the Apache License, Version 2.0 (the -@REM "License"); you may not use this file except in compliance -@REM with the License. You may obtain a copy of the License at -@REM -@REM http://www.apache.org/licenses/LICENSE-2.0 -@REM -@REM Unless required by applicable law or agreed to in writing, -@REM software distributed under the License is distributed on an -@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -@REM KIND, either express or implied. See the License for the -@REM specific language governing permissions and limitations -@REM under the License. -@REM ---------------------------------------------------------------------------- - -@REM ---------------------------------------------------------------------------- -@REM Maven Start Up Batch script -@REM -@REM Required ENV vars: -@REM JAVA_HOME - location of a JDK home dir -@REM -@REM Optional ENV vars -@REM M2_HOME - location of maven2's installed home dir -@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands -@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a keystroke before ending -@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven -@REM e.g. to debug Maven itself, use -@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 -@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files -@REM ---------------------------------------------------------------------------- - -@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on' -@echo off -@REM set title of command window -title %0 -@REM enable echoing by setting MAVEN_BATCH_ECHO to 'on' -@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO% - -@REM set %HOME% to equivalent of $HOME -if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%") - -@REM Execute a user defined script before this one -if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre -@REM check for pre script, once with legacy .bat ending and once with .cmd ending -if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat" -if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd" -:skipRcPre - -@setlocal - -set ERROR_CODE=0 - -@REM To isolate internal variables from possible post scripts, we use another setlocal -@setlocal - -@REM ==== START VALIDATION ==== -if not "%JAVA_HOME%" == "" goto OkJHome - -echo. -echo Error: JAVA_HOME not found in your environment. >&2 -echo Please set the JAVA_HOME variable in your environment to match the >&2 -echo location of your Java installation. >&2 -echo. -goto error - -:OkJHome -if exist "%JAVA_HOME%\bin\java.exe" goto init - -echo. -echo Error: JAVA_HOME is set to an invalid directory. >&2 -echo JAVA_HOME = "%JAVA_HOME%" >&2 -echo Please set the JAVA_HOME variable in your environment to match the >&2 -echo location of your Java installation. >&2 -echo. -goto error - -@REM ==== END VALIDATION ==== - -:init - -@REM Find the project base dir, i.e. the directory that contains the folder ".mvn". -@REM Fallback to current working directory if not found. - -set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR% -IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir - -set EXEC_DIR=%CD% -set WDIR=%EXEC_DIR% -:findBaseDir -IF EXIST "%WDIR%"\.mvn goto baseDirFound -cd .. -IF "%WDIR%"=="%CD%" goto baseDirNotFound -set WDIR=%CD% -goto findBaseDir - -:baseDirFound -set MAVEN_PROJECTBASEDIR=%WDIR% -cd "%EXEC_DIR%" -goto endDetectBaseDir - -:baseDirNotFound -set MAVEN_PROJECTBASEDIR=%EXEC_DIR% -cd "%EXEC_DIR%" - -:endDetectBaseDir - -IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig - -@setlocal EnableExtensions EnableDelayedExpansion -for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a -@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS% - -:endReadAdditionalConfig - -SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe" -set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar" -set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain - -set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar" - -FOR /F "tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO ( - IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B -) - -@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central -@REM This allows using the maven wrapper in projects that prohibit checking in binary data. -if exist %WRAPPER_JAR% ( - if "%MVNW_VERBOSE%" == "true" ( - echo Found %WRAPPER_JAR% - ) -) else ( - if not "%MVNW_REPOURL%" == "" ( - SET DOWNLOAD_URL="%MVNW_REPOURL%/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar" - ) - if "%MVNW_VERBOSE%" == "true" ( - echo Couldn't find %WRAPPER_JAR%, downloading it ... - echo Downloading from: %DOWNLOAD_URL% - ) - - powershell -Command "&{"^ - "$webclient = new-object System.Net.WebClient;"^ - "if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^ - "$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^ - "}"^ - "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')"^ - "}" - if "%MVNW_VERBOSE%" == "true" ( - echo Finished downloading %WRAPPER_JAR% - ) -) -@REM End of extension - -@REM Provide a "standardized" way to retrieve the CLI args that will -@REM work with both Windows and non-Windows executions. -set MAVEN_CMD_LINE_ARGS=%* - -%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %* -if ERRORLEVEL 1 goto error -goto end - -:error -set ERROR_CODE=1 - -:end -@endlocal & set ERROR_CODE=%ERROR_CODE% - -if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost -@REM check for post script, once with legacy .bat ending and once with .cmd ending -if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat" -if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd" -:skipRcPost - -@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on' -if "%MAVEN_BATCH_PAUSE%" == "on" pause - -if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE% - -exit /B %ERROR_CODE% diff --git a/libraryExtended/pom.xml b/libraryExtended/pom.xml deleted file mode 100644 index 4527336e..00000000 --- a/libraryExtended/pom.xml +++ /dev/null @@ -1,237 +0,0 @@ - - - - org.mustangproject - core - 2.0.0-SNAPSHOT - - 4.0.0 - org.mustangproject - libraryExtended - jar - 2.0.0-SNAPSHOT - - - - sonatype-oss-public - https://oss.sonatype.org/content/groups/public/ - - true - - - true - - - - - UTF-8 - - - - - javax.xml.bind - jaxb-api - 2.1 - - - - org.dom4j - dom4j - 2.1.1 - - - - ch.qos.logback - logback-classic - 1.2.3 - - - ch.qos.logback - logback-core - 1.2.3 - - - - com.googlecode.slf4j-maven-plugin-log - slf4j-maven-plugin-log - 1.0.0 - - - - - org.verapdf - validation-model - 1.12.1 - - - - com.helger - ph-schematron - 5.6.0 - - - org.mustangproject - libraryBasic - 2.0.0-SNAPSHOT - - - - org.xmlunit - xmlunit-core - 2.6.3 - - - org.xmlunit - xmlunit-assertj - 2.6.3 - test - - - - - com.sanityinc - jargs - 2.0-SNAPSHOT - - - org.riversun - bigdoc - 0.3.0 - - - junit - junit - 4.12 - test - - - - - - - - org.apache.maven.plugins - maven-release-plugin - 2.5.3 - - - - - - - org.apache.maven.plugins - maven-jar-plugin - - - - true - true - - - - - - - org.apache.maven.plugins - maven-compiler-plugin - 2.3.2 - - - jar-with-dependencies - - - - 1.7 - 1.7 - - - - - - org.apache.maven.plugins - maven-shade-plugin - 2.4.3 - - false - - - *:* - - META-INF/*.SF - META-INF/*.DSA - META-INF/*.RSA - - - - log4j:log4j - - ** - - - - commons-logging:commons-logging - - ** - - - - com.sun.xml.bind:jaxb-impl - - ** - - - - com.sun.xml.bind:jaxb-core - - ** - - - - - - - package - - shade - - - - - - - - - - - - - - Apache License, Version 2.0 - http://www.apache.org/licenses/LICENSE-2.0.txt - repo - A business-friendly OSS license - - - - - Jochen Stärk - jstaerk@usegroup.de - - architect - developer - - - - diff --git a/pom.xml b/pom.xml index 962cc10d..badc1aec 100644 --- a/pom.xml +++ b/pom.xml @@ -1,86 +1,86 @@ - - 4.0.0 - org.mustangproject - core - 2.0.0-SNAPSHOT - pom - Mustang - - - libraryBasic - libraryExtended - Mustang-CLI - Mustang-Server - + + 4.0.0 + org.mustangproject + core + 2.0.0-SNAPSHOT + pom + Mustang - The Mustang project is a java library to read and write ZUGFeRD meta data inside your invoice PDFs + + library + validator + Mustang-CLI + + + The Mustang project is a java library to read and write ZUGFeRD meta data inside your invoice PDFs - http://www.mustangproject.org/ - - scm:git:https://github.com/ZUGFeRD/mustangproject.git - scm:git:https://github.com/ZUGFeRD/mustangproject.git - https://github.com/ZUGFeRD/mustangproject - mustang-1.7.3 - - - - sonatype-oss-public - https://oss.sonatype.org/content/groups/public/ - - true - - - true - - - - - - internal.repo - Temporary Staging Repository - file://${project.build.directory}/mvn-repo - - - - UTF-8 - github - -Xdoclint:none - - 1.8 - 1.8 - 1.8 - - - - - User List - https://groups.google.com/forum/?hl=de#!forum/mustangproject - - - - - Apache License, Version 2.0 - http://www.apache.org/licenses/LICENSE-2.0.txt - repo - A business-friendly OSS license - - - - - Jochen Stärk - jstaerk@usegroup.de - - architect - developer - - - - Alexander Schmidt - schmidt.alexander@mail.de - - developer - - - + http://www.mustangproject.org/ + + scm:git:https://github.com/ZUGFeRD/mustangproject.git + scm:git:https://github.com/ZUGFeRD/mustangproject.git + https://github.com/ZUGFeRD/mustangproject + mustang-1.7.3 + + + + sonatype-oss-public + https://oss.sonatype.org/content/groups/public/ + + true + + + true + + + + + + internal.repo + Temporary Staging Repository + file://${project.build.directory}/mvn-repo + + + + UTF-8 + github + -Xdoclint:none + + 1.8 + 1.8 + 1.8 + + + + + User List + https://groups.google.com/forum/?hl=de#!forum/mustangproject + + + + + Apache License, Version 2.0 + http://www.apache.org/licenses/LICENSE-2.0.txt + repo + A business-friendly OSS license + + + + + Jochen Stärk + jstaerk@usegroup.de + + architect + developer + + + + Alexander Schmidt + schmidt.alexander@mail.de + + developer + + + diff --git a/libraryExtended/History.md b/validator/History.md similarity index 100% rename from libraryExtended/History.md rename to validator/History.md diff --git a/libraryExtended/LICENSE b/validator/LICENSE similarity index 100% rename from libraryExtended/LICENSE rename to validator/LICENSE diff --git a/libraryExtended/MustangGnuaccountingBeispielRE-20170509_505.pdf b/validator/MustangGnuaccountingBeispielRE-20170509_505.pdf similarity index 100% rename from libraryExtended/MustangGnuaccountingBeispielRE-20170509_505.pdf rename to validator/MustangGnuaccountingBeispielRE-20170509_505.pdf diff --git a/libraryExtended/README.md b/validator/README.md similarity index 100% rename from libraryExtended/README.md rename to validator/README.md diff --git a/validator/pom.xml b/validator/pom.xml new file mode 100644 index 00000000..6d7247a5 --- /dev/null +++ b/validator/pom.xml @@ -0,0 +1,240 @@ + + + + org.mustangproject + core + 2.0.0-SNAPSHOT + + 4.0.0 + org.mustangproject + validator + Library to validate Factur-X/ZUGFeRD 1.0 and 2.1 as well as XRechnung e-invoices. + + jar + 2.0.0-SNAPSHOT + + + + sonatype-oss-public + https://oss.sonatype.org/content/groups/public/ + + true + + + true + + + + + UTF-8 + + + + + javax.xml.bind + jaxb-api + 2.1 + + + + org.dom4j + dom4j + 2.1.1 + + + + ch.qos.logback + logback-classic + 1.2.3 + + + ch.qos.logback + logback-core + 1.2.3 + + + + com.googlecode.slf4j-maven-plugin-log + slf4j-maven-plugin-log + 1.0.0 + + + + + org.verapdf + validation-model + 1.12.1 + + + + com.helger + ph-schematron + 5.6.0 + + + org.mustangproject + libraryBasic + 2.0.0-SNAPSHOT + + + + org.xmlunit + xmlunit-core + 2.6.3 + + + org.xmlunit + xmlunit-assertj + 2.6.3 + test + + + + + com.sanityinc + jargs + 2.0-SNAPSHOT + + + org.riversun + bigdoc + 0.3.0 + + + junit + junit + 4.12 + test + + + + + + + + org.apache.maven.plugins + maven-release-plugin + 2.5.3 + + + + + + + org.apache.maven.plugins + maven-jar-plugin + + + + true + true + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 2.3.2 + + + jar-with-dependencies + + + + 1.7 + 1.7 + + + + + + org.apache.maven.plugins + maven-shade-plugin + 2.4.3 + + false + + + *:* + + META-INF/*.SF + META-INF/*.DSA + META-INF/*.RSA + + + + log4j:log4j + + ** + + + + commons-logging:commons-logging + + ** + + + + com.sun.xml.bind:jaxb-impl + + ** + + + + com.sun.xml.bind:jaxb-core + + ** + + + + + + + package + + shade + + + + + + + + + + + + + + Apache License, Version 2.0 + http://www.apache.org/licenses/LICENSE-2.0.txt + repo + A business-friendly OSS license + + + + + Jochen Stärk + jstaerk@usegroup.de + + architect + developer + + + + diff --git a/libraryExtended/src/main/java/org/mustangproject/library/extended/EPart.java b/validator/src/main/java/org/mustangproject/library/extended/EPart.java similarity index 100% rename from libraryExtended/src/main/java/org/mustangproject/library/extended/EPart.java rename to validator/src/main/java/org/mustangproject/library/extended/EPart.java diff --git a/libraryExtended/src/main/java/org/mustangproject/library/extended/ESeverity.java b/validator/src/main/java/org/mustangproject/library/extended/ESeverity.java similarity index 100% rename from libraryExtended/src/main/java/org/mustangproject/library/extended/ESeverity.java rename to validator/src/main/java/org/mustangproject/library/extended/ESeverity.java diff --git a/libraryExtended/src/main/java/org/mustangproject/library/extended/IrrecoverableValidationError.java b/validator/src/main/java/org/mustangproject/library/extended/IrrecoverableValidationError.java similarity index 100% rename from libraryExtended/src/main/java/org/mustangproject/library/extended/IrrecoverableValidationError.java rename to validator/src/main/java/org/mustangproject/library/extended/IrrecoverableValidationError.java diff --git a/libraryExtended/src/main/java/org/mustangproject/library/extended/Main.java b/validator/src/main/java/org/mustangproject/library/extended/Main.java similarity index 100% rename from libraryExtended/src/main/java/org/mustangproject/library/extended/Main.java rename to validator/src/main/java/org/mustangproject/library/extended/Main.java diff --git a/libraryExtended/src/main/java/org/mustangproject/library/extended/PDFValidator.java b/validator/src/main/java/org/mustangproject/library/extended/PDFValidator.java similarity index 100% rename from libraryExtended/src/main/java/org/mustangproject/library/extended/PDFValidator.java rename to validator/src/main/java/org/mustangproject/library/extended/PDFValidator.java diff --git a/libraryExtended/src/main/java/org/mustangproject/library/extended/SchematronPipeline.java b/validator/src/main/java/org/mustangproject/library/extended/SchematronPipeline.java similarity index 100% rename from libraryExtended/src/main/java/org/mustangproject/library/extended/SchematronPipeline.java rename to validator/src/main/java/org/mustangproject/library/extended/SchematronPipeline.java diff --git a/libraryExtended/src/main/java/org/mustangproject/library/extended/ValidationContext.java b/validator/src/main/java/org/mustangproject/library/extended/ValidationContext.java similarity index 100% rename from libraryExtended/src/main/java/org/mustangproject/library/extended/ValidationContext.java rename to validator/src/main/java/org/mustangproject/library/extended/ValidationContext.java diff --git a/libraryExtended/src/main/java/org/mustangproject/library/extended/ValidationResultItem.java b/validator/src/main/java/org/mustangproject/library/extended/ValidationResultItem.java similarity index 100% rename from libraryExtended/src/main/java/org/mustangproject/library/extended/ValidationResultItem.java rename to validator/src/main/java/org/mustangproject/library/extended/ValidationResultItem.java diff --git a/libraryExtended/src/main/java/org/mustangproject/library/extended/Validator.java b/validator/src/main/java/org/mustangproject/library/extended/Validator.java similarity index 100% rename from libraryExtended/src/main/java/org/mustangproject/library/extended/Validator.java rename to validator/src/main/java/org/mustangproject/library/extended/Validator.java diff --git a/libraryExtended/src/main/java/org/mustangproject/library/extended/XMLTools.java b/validator/src/main/java/org/mustangproject/library/extended/XMLTools.java similarity index 100% rename from libraryExtended/src/main/java/org/mustangproject/library/extended/XMLTools.java rename to validator/src/main/java/org/mustangproject/library/extended/XMLTools.java diff --git a/libraryExtended/src/main/java/org/mustangproject/library/extended/XMLValidator.java b/validator/src/main/java/org/mustangproject/library/extended/XMLValidator.java similarity index 100% rename from libraryExtended/src/main/java/org/mustangproject/library/extended/XMLValidator.java rename to validator/src/main/java/org/mustangproject/library/extended/XMLValidator.java diff --git a/libraryExtended/src/main/java/org/mustangproject/library/extended/ZUGFeRDValidator.java b/validator/src/main/java/org/mustangproject/library/extended/ZUGFeRDValidator.java similarity index 100% rename from libraryExtended/src/main/java/org/mustangproject/library/extended/ZUGFeRDValidator.java rename to validator/src/main/java/org/mustangproject/library/extended/ZUGFeRDValidator.java diff --git a/libraryExtended/src/main/resources/ZUGFeRDSchematronStylesheetXSLT1.xsl b/validator/src/main/resources/ZUGFeRDSchematronStylesheetXSLT1.xsl similarity index 100% rename from libraryExtended/src/main/resources/ZUGFeRDSchematronStylesheetXSLT1.xsl rename to validator/src/main/resources/ZUGFeRDSchematronStylesheetXSLT1.xsl diff --git a/libraryExtended/src/main/resources/ZUGFeRDSchematronStylesheetXSLT2.xsl b/validator/src/main/resources/ZUGFeRDSchematronStylesheetXSLT2.xsl similarity index 100% rename from libraryExtended/src/main/resources/ZUGFeRDSchematronStylesheetXSLT2.xsl rename to validator/src/main/resources/ZUGFeRDSchematronStylesheetXSLT2.xsl diff --git a/libraryExtended/src/main/resources/ZUGFeRD_1p0.sch b/validator/src/main/resources/ZUGFeRD_1p0.sch similarity index 100% rename from libraryExtended/src/main/resources/ZUGFeRD_1p0.sch rename to validator/src/main/resources/ZUGFeRD_1p0.sch diff --git a/libraryExtended/src/main/resources/iso_abstract_expand.xsl b/validator/src/main/resources/iso_abstract_expand.xsl similarity index 100% rename from libraryExtended/src/main/resources/iso_abstract_expand.xsl rename to validator/src/main/resources/iso_abstract_expand.xsl diff --git a/libraryExtended/src/main/resources/iso_dsdl_include.xsl b/validator/src/main/resources/iso_dsdl_include.xsl similarity index 100% rename from libraryExtended/src/main/resources/iso_dsdl_include.xsl rename to validator/src/main/resources/iso_dsdl_include.xsl diff --git a/libraryExtended/src/main/resources/iso_schematron_message.xsl b/validator/src/main/resources/iso_schematron_message.xsl similarity index 100% rename from libraryExtended/src/main/resources/iso_schematron_message.xsl rename to validator/src/main/resources/iso_schematron_message.xsl diff --git a/libraryExtended/src/main/resources/iso_schematron_skeleton_for_xslt1.xsl b/validator/src/main/resources/iso_schematron_skeleton_for_xslt1.xsl similarity index 100% rename from libraryExtended/src/main/resources/iso_schematron_skeleton_for_xslt1.xsl rename to validator/src/main/resources/iso_schematron_skeleton_for_xslt1.xsl diff --git a/libraryExtended/src/main/resources/iso_svrl_for_xslt1.xsl b/validator/src/main/resources/iso_svrl_for_xslt1.xsl similarity index 100% rename from libraryExtended/src/main/resources/iso_svrl_for_xslt1.xsl rename to validator/src/main/resources/iso_svrl_for_xslt1.xsl diff --git a/libraryExtended/src/main/resources/logback.xml b/validator/src/main/resources/logback.xml similarity index 100% rename from libraryExtended/src/main/resources/logback.xml rename to validator/src/main/resources/logback.xml diff --git a/libraryExtended/src/main/resources/schema/ad/basic/additional_data_base_schema.xsd b/validator/src/main/resources/schema/ad/basic/additional_data_base_schema.xsd similarity index 100% rename from libraryExtended/src/main/resources/schema/ad/basic/additional_data_base_schema.xsd rename to validator/src/main/resources/schema/ad/basic/additional_data_base_schema.xsd diff --git a/libraryExtended/src/main/resources/schema/zf1/ZUGFeRD1p0.xsd b/validator/src/main/resources/schema/zf1/ZUGFeRD1p0.xsd similarity index 100% rename from libraryExtended/src/main/resources/schema/zf1/ZUGFeRD1p0.xsd rename to validator/src/main/resources/schema/zf1/ZUGFeRD1p0.xsd diff --git a/libraryExtended/src/main/resources/schema/zf1/ZUGFeRD1p0_urn_un_unece_uncefact_data_standard_QualifiedDataType_12.xsd b/validator/src/main/resources/schema/zf1/ZUGFeRD1p0_urn_un_unece_uncefact_data_standard_QualifiedDataType_12.xsd similarity index 100% rename from libraryExtended/src/main/resources/schema/zf1/ZUGFeRD1p0_urn_un_unece_uncefact_data_standard_QualifiedDataType_12.xsd rename to validator/src/main/resources/schema/zf1/ZUGFeRD1p0_urn_un_unece_uncefact_data_standard_QualifiedDataType_12.xsd diff --git a/libraryExtended/src/main/resources/schema/zf1/ZUGFeRD1p0_urn_un_unece_uncefact_data_standard_ReusableAggregateBusinessInformationEntity_12.xsd b/validator/src/main/resources/schema/zf1/ZUGFeRD1p0_urn_un_unece_uncefact_data_standard_ReusableAggregateBusinessInformationEntity_12.xsd similarity index 100% rename from libraryExtended/src/main/resources/schema/zf1/ZUGFeRD1p0_urn_un_unece_uncefact_data_standard_ReusableAggregateBusinessInformationEntity_12.xsd rename to validator/src/main/resources/schema/zf1/ZUGFeRD1p0_urn_un_unece_uncefact_data_standard_ReusableAggregateBusinessInformationEntity_12.xsd diff --git a/libraryExtended/src/main/resources/schema/zf1/ZUGFeRD1p0_urn_un_unece_uncefact_data_standard_UnqualifiedDataType_15.xsd b/validator/src/main/resources/schema/zf1/ZUGFeRD1p0_urn_un_unece_uncefact_data_standard_UnqualifiedDataType_15.xsd similarity index 100% rename from libraryExtended/src/main/resources/schema/zf1/ZUGFeRD1p0_urn_un_unece_uncefact_data_standard_UnqualifiedDataType_15.xsd rename to validator/src/main/resources/schema/zf1/ZUGFeRD1p0_urn_un_unece_uncefact_data_standard_UnqualifiedDataType_15.xsd diff --git a/libraryExtended/src/main/resources/schema/zf2/BASIC-WL/FACTUR-X_BASIC-WL.xsd b/validator/src/main/resources/schema/zf2/BASIC-WL/FACTUR-X_BASIC-WL.xsd similarity index 100% rename from libraryExtended/src/main/resources/schema/zf2/BASIC-WL/FACTUR-X_BASIC-WL.xsd rename to validator/src/main/resources/schema/zf2/BASIC-WL/FACTUR-X_BASIC-WL.xsd diff --git a/libraryExtended/src/main/resources/schema/zf2/BASIC-WL/FACTUR-X_BASIC-WL_urn_un_unece_uncefact_data_standard_QualifiedDataType_100.xsd b/validator/src/main/resources/schema/zf2/BASIC-WL/FACTUR-X_BASIC-WL_urn_un_unece_uncefact_data_standard_QualifiedDataType_100.xsd similarity index 100% rename from libraryExtended/src/main/resources/schema/zf2/BASIC-WL/FACTUR-X_BASIC-WL_urn_un_unece_uncefact_data_standard_QualifiedDataType_100.xsd rename to validator/src/main/resources/schema/zf2/BASIC-WL/FACTUR-X_BASIC-WL_urn_un_unece_uncefact_data_standard_QualifiedDataType_100.xsd diff --git a/libraryExtended/src/main/resources/schema/zf2/BASIC-WL/FACTUR-X_BASIC-WL_urn_un_unece_uncefact_data_standard_ReusableAggregateBusinessInformationEntity_100.xsd b/validator/src/main/resources/schema/zf2/BASIC-WL/FACTUR-X_BASIC-WL_urn_un_unece_uncefact_data_standard_ReusableAggregateBusinessInformationEntity_100.xsd similarity index 100% rename from libraryExtended/src/main/resources/schema/zf2/BASIC-WL/FACTUR-X_BASIC-WL_urn_un_unece_uncefact_data_standard_ReusableAggregateBusinessInformationEntity_100.xsd rename to validator/src/main/resources/schema/zf2/BASIC-WL/FACTUR-X_BASIC-WL_urn_un_unece_uncefact_data_standard_ReusableAggregateBusinessInformationEntity_100.xsd diff --git a/libraryExtended/src/main/resources/schema/zf2/BASIC-WL/FACTUR-X_BASIC-WL_urn_un_unece_uncefact_data_standard_UnqualifiedDataType_100.xsd b/validator/src/main/resources/schema/zf2/BASIC-WL/FACTUR-X_BASIC-WL_urn_un_unece_uncefact_data_standard_UnqualifiedDataType_100.xsd similarity index 100% rename from libraryExtended/src/main/resources/schema/zf2/BASIC-WL/FACTUR-X_BASIC-WL_urn_un_unece_uncefact_data_standard_UnqualifiedDataType_100.xsd rename to validator/src/main/resources/schema/zf2/BASIC-WL/FACTUR-X_BASIC-WL_urn_un_unece_uncefact_data_standard_UnqualifiedDataType_100.xsd diff --git a/libraryExtended/src/main/resources/schema/zf2/BASIC/FACTUR-X_BASIC.xsd b/validator/src/main/resources/schema/zf2/BASIC/FACTUR-X_BASIC.xsd similarity index 100% rename from libraryExtended/src/main/resources/schema/zf2/BASIC/FACTUR-X_BASIC.xsd rename to validator/src/main/resources/schema/zf2/BASIC/FACTUR-X_BASIC.xsd diff --git a/libraryExtended/src/main/resources/schema/zf2/BASIC/FACTUR-X_BASIC_urn_un_unece_uncefact_data_standard_QualifiedDataType_100.xsd b/validator/src/main/resources/schema/zf2/BASIC/FACTUR-X_BASIC_urn_un_unece_uncefact_data_standard_QualifiedDataType_100.xsd similarity index 100% rename from libraryExtended/src/main/resources/schema/zf2/BASIC/FACTUR-X_BASIC_urn_un_unece_uncefact_data_standard_QualifiedDataType_100.xsd rename to validator/src/main/resources/schema/zf2/BASIC/FACTUR-X_BASIC_urn_un_unece_uncefact_data_standard_QualifiedDataType_100.xsd diff --git a/libraryExtended/src/main/resources/schema/zf2/BASIC/FACTUR-X_BASIC_urn_un_unece_uncefact_data_standard_ReusableAggregateBusinessInformationEntity_100.xsd b/validator/src/main/resources/schema/zf2/BASIC/FACTUR-X_BASIC_urn_un_unece_uncefact_data_standard_ReusableAggregateBusinessInformationEntity_100.xsd similarity index 100% rename from libraryExtended/src/main/resources/schema/zf2/BASIC/FACTUR-X_BASIC_urn_un_unece_uncefact_data_standard_ReusableAggregateBusinessInformationEntity_100.xsd rename to validator/src/main/resources/schema/zf2/BASIC/FACTUR-X_BASIC_urn_un_unece_uncefact_data_standard_ReusableAggregateBusinessInformationEntity_100.xsd diff --git a/libraryExtended/src/main/resources/schema/zf2/BASIC/FACTUR-X_BASIC_urn_un_unece_uncefact_data_standard_UnqualifiedDataType_100.xsd b/validator/src/main/resources/schema/zf2/BASIC/FACTUR-X_BASIC_urn_un_unece_uncefact_data_standard_UnqualifiedDataType_100.xsd similarity index 100% rename from libraryExtended/src/main/resources/schema/zf2/BASIC/FACTUR-X_BASIC_urn_un_unece_uncefact_data_standard_UnqualifiedDataType_100.xsd rename to validator/src/main/resources/schema/zf2/BASIC/FACTUR-X_BASIC_urn_un_unece_uncefact_data_standard_UnqualifiedDataType_100.xsd diff --git a/libraryExtended/src/main/resources/schema/zf2/EN16931/FACTUR-X_EN16931.xsd b/validator/src/main/resources/schema/zf2/EN16931/FACTUR-X_EN16931.xsd similarity index 100% rename from libraryExtended/src/main/resources/schema/zf2/EN16931/FACTUR-X_EN16931.xsd rename to validator/src/main/resources/schema/zf2/EN16931/FACTUR-X_EN16931.xsd diff --git a/libraryExtended/src/main/resources/schema/zf2/EN16931/FACTUR-X_EN16931_urn_un_unece_uncefact_data_standard_QualifiedDataType_100.xsd b/validator/src/main/resources/schema/zf2/EN16931/FACTUR-X_EN16931_urn_un_unece_uncefact_data_standard_QualifiedDataType_100.xsd similarity index 100% rename from libraryExtended/src/main/resources/schema/zf2/EN16931/FACTUR-X_EN16931_urn_un_unece_uncefact_data_standard_QualifiedDataType_100.xsd rename to validator/src/main/resources/schema/zf2/EN16931/FACTUR-X_EN16931_urn_un_unece_uncefact_data_standard_QualifiedDataType_100.xsd diff --git a/libraryExtended/src/main/resources/schema/zf2/EN16931/FACTUR-X_EN16931_urn_un_unece_uncefact_data_standard_ReusableAggregateBusinessInformationEntity_100.xsd b/validator/src/main/resources/schema/zf2/EN16931/FACTUR-X_EN16931_urn_un_unece_uncefact_data_standard_ReusableAggregateBusinessInformationEntity_100.xsd similarity index 100% rename from libraryExtended/src/main/resources/schema/zf2/EN16931/FACTUR-X_EN16931_urn_un_unece_uncefact_data_standard_ReusableAggregateBusinessInformationEntity_100.xsd rename to validator/src/main/resources/schema/zf2/EN16931/FACTUR-X_EN16931_urn_un_unece_uncefact_data_standard_ReusableAggregateBusinessInformationEntity_100.xsd diff --git a/libraryExtended/src/main/resources/schema/zf2/EN16931/FACTUR-X_EN16931_urn_un_unece_uncefact_data_standard_UnqualifiedDataType_100.xsd b/validator/src/main/resources/schema/zf2/EN16931/FACTUR-X_EN16931_urn_un_unece_uncefact_data_standard_UnqualifiedDataType_100.xsd similarity index 100% rename from libraryExtended/src/main/resources/schema/zf2/EN16931/FACTUR-X_EN16931_urn_un_unece_uncefact_data_standard_UnqualifiedDataType_100.xsd rename to validator/src/main/resources/schema/zf2/EN16931/FACTUR-X_EN16931_urn_un_unece_uncefact_data_standard_UnqualifiedDataType_100.xsd diff --git a/libraryExtended/src/main/resources/schema/zf2/EXTENDED/FACTUR-X_EXTENDED.xsd b/validator/src/main/resources/schema/zf2/EXTENDED/FACTUR-X_EXTENDED.xsd similarity index 100% rename from libraryExtended/src/main/resources/schema/zf2/EXTENDED/FACTUR-X_EXTENDED.xsd rename to validator/src/main/resources/schema/zf2/EXTENDED/FACTUR-X_EXTENDED.xsd diff --git a/libraryExtended/src/main/resources/schema/zf2/EXTENDED/FACTUR-X_EXTENDED_urn_un_unece_uncefact_data_standard_QualifiedDataType_100.xsd b/validator/src/main/resources/schema/zf2/EXTENDED/FACTUR-X_EXTENDED_urn_un_unece_uncefact_data_standard_QualifiedDataType_100.xsd similarity index 100% rename from libraryExtended/src/main/resources/schema/zf2/EXTENDED/FACTUR-X_EXTENDED_urn_un_unece_uncefact_data_standard_QualifiedDataType_100.xsd rename to validator/src/main/resources/schema/zf2/EXTENDED/FACTUR-X_EXTENDED_urn_un_unece_uncefact_data_standard_QualifiedDataType_100.xsd diff --git a/libraryExtended/src/main/resources/schema/zf2/EXTENDED/FACTUR-X_EXTENDED_urn_un_unece_uncefact_data_standard_ReusableAggregateBusinessInformationEntity_100.xsd b/validator/src/main/resources/schema/zf2/EXTENDED/FACTUR-X_EXTENDED_urn_un_unece_uncefact_data_standard_ReusableAggregateBusinessInformationEntity_100.xsd similarity index 100% rename from libraryExtended/src/main/resources/schema/zf2/EXTENDED/FACTUR-X_EXTENDED_urn_un_unece_uncefact_data_standard_ReusableAggregateBusinessInformationEntity_100.xsd rename to validator/src/main/resources/schema/zf2/EXTENDED/FACTUR-X_EXTENDED_urn_un_unece_uncefact_data_standard_ReusableAggregateBusinessInformationEntity_100.xsd diff --git a/libraryExtended/src/main/resources/schema/zf2/EXTENDED/FACTUR-X_EXTENDED_urn_un_unece_uncefact_data_standard_UnqualifiedDataType_100.xsd b/validator/src/main/resources/schema/zf2/EXTENDED/FACTUR-X_EXTENDED_urn_un_unece_uncefact_data_standard_UnqualifiedDataType_100.xsd similarity index 100% rename from libraryExtended/src/main/resources/schema/zf2/EXTENDED/FACTUR-X_EXTENDED_urn_un_unece_uncefact_data_standard_UnqualifiedDataType_100.xsd rename to validator/src/main/resources/schema/zf2/EXTENDED/FACTUR-X_EXTENDED_urn_un_unece_uncefact_data_standard_UnqualifiedDataType_100.xsd diff --git a/libraryExtended/src/main/resources/schema/zf2/MINIMUM/FACTUR-X_MINIMUM.xsd b/validator/src/main/resources/schema/zf2/MINIMUM/FACTUR-X_MINIMUM.xsd similarity index 100% rename from libraryExtended/src/main/resources/schema/zf2/MINIMUM/FACTUR-X_MINIMUM.xsd rename to validator/src/main/resources/schema/zf2/MINIMUM/FACTUR-X_MINIMUM.xsd diff --git a/libraryExtended/src/main/resources/schema/zf2/MINIMUM/FACTUR-X_MINIMUM_urn_un_unece_uncefact_data_standard_QualifiedDataType_100.xsd b/validator/src/main/resources/schema/zf2/MINIMUM/FACTUR-X_MINIMUM_urn_un_unece_uncefact_data_standard_QualifiedDataType_100.xsd similarity index 100% rename from libraryExtended/src/main/resources/schema/zf2/MINIMUM/FACTUR-X_MINIMUM_urn_un_unece_uncefact_data_standard_QualifiedDataType_100.xsd rename to validator/src/main/resources/schema/zf2/MINIMUM/FACTUR-X_MINIMUM_urn_un_unece_uncefact_data_standard_QualifiedDataType_100.xsd diff --git a/libraryExtended/src/main/resources/schema/zf2/MINIMUM/FACTUR-X_MINIMUM_urn_un_unece_uncefact_data_standard_ReusableAggregateBusinessInformationEntity_100.xsd b/validator/src/main/resources/schema/zf2/MINIMUM/FACTUR-X_MINIMUM_urn_un_unece_uncefact_data_standard_ReusableAggregateBusinessInformationEntity_100.xsd similarity index 100% rename from libraryExtended/src/main/resources/schema/zf2/MINIMUM/FACTUR-X_MINIMUM_urn_un_unece_uncefact_data_standard_ReusableAggregateBusinessInformationEntity_100.xsd rename to validator/src/main/resources/schema/zf2/MINIMUM/FACTUR-X_MINIMUM_urn_un_unece_uncefact_data_standard_ReusableAggregateBusinessInformationEntity_100.xsd diff --git a/libraryExtended/src/main/resources/schema/zf2/MINIMUM/FACTUR-X_MINIMUM_urn_un_unece_uncefact_data_standard_UnqualifiedDataType_100.xsd b/validator/src/main/resources/schema/zf2/MINIMUM/FACTUR-X_MINIMUM_urn_un_unece_uncefact_data_standard_UnqualifiedDataType_100.xsd similarity index 100% rename from libraryExtended/src/main/resources/schema/zf2/MINIMUM/FACTUR-X_MINIMUM_urn_un_unece_uncefact_data_standard_UnqualifiedDataType_100.xsd rename to validator/src/main/resources/schema/zf2/MINIMUM/FACTUR-X_MINIMUM_urn_un_unece_uncefact_data_standard_UnqualifiedDataType_100.xsd diff --git a/libraryExtended/src/main/resources/xslt/EN16931-CII-validation.xslt b/validator/src/main/resources/xslt/EN16931-CII-validation.xslt similarity index 100% rename from libraryExtended/src/main/resources/xslt/EN16931-CII-validation.xslt rename to validator/src/main/resources/xslt/EN16931-CII-validation.xslt diff --git a/libraryExtended/src/main/resources/xslt/FACTUR-X_BASIC-WL_codedb.xml b/validator/src/main/resources/xslt/FACTUR-X_BASIC-WL_codedb.xml similarity index 100% rename from libraryExtended/src/main/resources/xslt/FACTUR-X_BASIC-WL_codedb.xml rename to validator/src/main/resources/xslt/FACTUR-X_BASIC-WL_codedb.xml diff --git a/libraryExtended/src/main/resources/xslt/FACTUR-X_BASIC_codedb.xml b/validator/src/main/resources/xslt/FACTUR-X_BASIC_codedb.xml similarity index 100% rename from libraryExtended/src/main/resources/xslt/FACTUR-X_BASIC_codedb.xml rename to validator/src/main/resources/xslt/FACTUR-X_BASIC_codedb.xml diff --git a/libraryExtended/src/main/resources/xslt/FACTUR-X_EN16931_codedb.xml b/validator/src/main/resources/xslt/FACTUR-X_EN16931_codedb.xml similarity index 100% rename from libraryExtended/src/main/resources/xslt/FACTUR-X_EN16931_codedb.xml rename to validator/src/main/resources/xslt/FACTUR-X_EN16931_codedb.xml diff --git a/libraryExtended/src/main/resources/xslt/FACTUR-X_EXTENDED_codedb.xml b/validator/src/main/resources/xslt/FACTUR-X_EXTENDED_codedb.xml similarity index 100% rename from libraryExtended/src/main/resources/xslt/FACTUR-X_EXTENDED_codedb.xml rename to validator/src/main/resources/xslt/FACTUR-X_EXTENDED_codedb.xml diff --git a/libraryExtended/src/main/resources/xslt/FACTUR-X_MINIMUM_codedb.xml b/validator/src/main/resources/xslt/FACTUR-X_MINIMUM_codedb.xml similarity index 100% rename from libraryExtended/src/main/resources/xslt/FACTUR-X_MINIMUM_codedb.xml rename to validator/src/main/resources/xslt/FACTUR-X_MINIMUM_codedb.xml diff --git a/libraryExtended/src/main/resources/xslt/XRechnung-CII-validation.xslt b/validator/src/main/resources/xslt/XRechnung-CII-validation.xslt similarity index 100% rename from libraryExtended/src/main/resources/xslt/XRechnung-CII-validation.xslt rename to validator/src/main/resources/xslt/XRechnung-CII-validation.xslt diff --git a/libraryExtended/src/main/resources/xslt/ZUGFeRD_1p0.xslt b/validator/src/main/resources/xslt/ZUGFeRD_1p0.xslt similarity index 100% rename from libraryExtended/src/main/resources/xslt/ZUGFeRD_1p0.xslt rename to validator/src/main/resources/xslt/ZUGFeRD_1p0.xslt diff --git a/libraryExtended/src/main/resources/xslt/cii16931schematron/EN16931-CII-validation.xslt b/validator/src/main/resources/xslt/cii16931schematron/EN16931-CII-validation.xslt similarity index 100% rename from libraryExtended/src/main/resources/xslt/cii16931schematron/EN16931-CII-validation.xslt rename to validator/src/main/resources/xslt/cii16931schematron/EN16931-CII-validation.xslt diff --git a/libraryExtended/src/main/resources/xslt/zugferd21_basic.xsl b/validator/src/main/resources/xslt/zugferd21_basic.xsl similarity index 100% rename from libraryExtended/src/main/resources/xslt/zugferd21_basic.xsl rename to validator/src/main/resources/xslt/zugferd21_basic.xsl diff --git a/libraryExtended/src/main/resources/xslt/zugferd21_basicwl.xsl b/validator/src/main/resources/xslt/zugferd21_basicwl.xsl similarity index 100% rename from libraryExtended/src/main/resources/xslt/zugferd21_basicwl.xsl rename to validator/src/main/resources/xslt/zugferd21_basicwl.xsl diff --git a/libraryExtended/src/main/resources/xslt/zugferd21_en16931.xsl b/validator/src/main/resources/xslt/zugferd21_en16931.xsl similarity index 100% rename from libraryExtended/src/main/resources/xslt/zugferd21_en16931.xsl rename to validator/src/main/resources/xslt/zugferd21_en16931.xsl diff --git a/libraryExtended/src/main/resources/xslt/zugferd21_extended.xsl b/validator/src/main/resources/xslt/zugferd21_extended.xsl similarity index 100% rename from libraryExtended/src/main/resources/xslt/zugferd21_extended.xsl rename to validator/src/main/resources/xslt/zugferd21_extended.xsl diff --git a/libraryExtended/src/main/resources/xslt/zugferd21_minimum.xsl b/validator/src/main/resources/xslt/zugferd21_minimum.xsl similarity index 100% rename from libraryExtended/src/main/resources/xslt/zugferd21_minimum.xsl rename to validator/src/main/resources/xslt/zugferd21_minimum.xsl diff --git a/libraryExtended/src/main/resources/xslt/zugferd2p0_basicwl_minimum.xslt b/validator/src/main/resources/xslt/zugferd2p0_basicwl_minimum.xslt similarity index 100% rename from libraryExtended/src/main/resources/xslt/zugferd2p0_basicwl_minimum.xslt rename to validator/src/main/resources/xslt/zugferd2p0_basicwl_minimum.xslt diff --git a/libraryExtended/src/main/resources/xslt/zugferd2p0_basicwl_minimum_codedb.xml b/validator/src/main/resources/xslt/zugferd2p0_basicwl_minimum_codedb.xml similarity index 100% rename from libraryExtended/src/main/resources/xslt/zugferd2p0_basicwl_minimum_codedb.xml rename to validator/src/main/resources/xslt/zugferd2p0_basicwl_minimum_codedb.xml diff --git a/libraryExtended/src/main/resources/xslt/zugferd2p0_en16931.xslt b/validator/src/main/resources/xslt/zugferd2p0_en16931.xslt similarity index 100% rename from libraryExtended/src/main/resources/xslt/zugferd2p0_en16931.xslt rename to validator/src/main/resources/xslt/zugferd2p0_en16931.xslt diff --git a/libraryExtended/src/main/resources/xslt/zugferd2p0_en16931_codedb.xml b/validator/src/main/resources/xslt/zugferd2p0_en16931_codedb.xml similarity index 100% rename from libraryExtended/src/main/resources/xslt/zugferd2p0_en16931_codedb.xml rename to validator/src/main/resources/xslt/zugferd2p0_en16931_codedb.xml diff --git a/libraryExtended/src/main/resources/xslt/zugferd2p0_extended.xslt b/validator/src/main/resources/xslt/zugferd2p0_extended.xslt similarity index 100% rename from libraryExtended/src/main/resources/xslt/zugferd2p0_extended.xslt rename to validator/src/main/resources/xslt/zugferd2p0_extended.xslt diff --git a/libraryExtended/src/main/resources/xslt/zugferd2p0_extended_codedb.xml b/validator/src/main/resources/xslt/zugferd2p0_extended_codedb.xml similarity index 100% rename from libraryExtended/src/main/resources/xslt/zugferd2p0_extended_codedb.xml rename to validator/src/main/resources/xslt/zugferd2p0_extended_codedb.xml diff --git a/libraryExtended/src/main/resources/zugferd2p0_basicwl_minimum.sch b/validator/src/main/resources/zugferd2p0_basicwl_minimum.sch similarity index 100% rename from libraryExtended/src/main/resources/zugferd2p0_basicwl_minimum.sch rename to validator/src/main/resources/zugferd2p0_basicwl_minimum.sch diff --git a/libraryExtended/src/main/resources/zugferd2p0_en16931.sch b/validator/src/main/resources/zugferd2p0_en16931.sch similarity index 100% rename from libraryExtended/src/main/resources/zugferd2p0_en16931.sch rename to validator/src/main/resources/zugferd2p0_en16931.sch diff --git a/libraryExtended/src/main/resources/zugferd2p0_extended.sch b/validator/src/main/resources/zugferd2p0_extended.sch similarity index 100% rename from libraryExtended/src/main/resources/zugferd2p0_extended.sch rename to validator/src/main/resources/zugferd2p0_extended.sch diff --git a/libraryExtended/src/test/java/org/mustangproject/library/extended/MiscValidatorTest.java b/validator/src/test/java/org/mustangproject/library/extended/MiscValidatorTest.java similarity index 100% rename from libraryExtended/src/test/java/org/mustangproject/library/extended/MiscValidatorTest.java rename to validator/src/test/java/org/mustangproject/library/extended/MiscValidatorTest.java diff --git a/libraryExtended/src/test/java/org/mustangproject/library/extended/PDFValidatorTest.java b/validator/src/test/java/org/mustangproject/library/extended/PDFValidatorTest.java similarity index 100% rename from libraryExtended/src/test/java/org/mustangproject/library/extended/PDFValidatorTest.java rename to validator/src/test/java/org/mustangproject/library/extended/PDFValidatorTest.java diff --git a/libraryExtended/src/test/java/org/mustangproject/library/extended/ResourceCase.java b/validator/src/test/java/org/mustangproject/library/extended/ResourceCase.java similarity index 100% rename from libraryExtended/src/test/java/org/mustangproject/library/extended/ResourceCase.java rename to validator/src/test/java/org/mustangproject/library/extended/ResourceCase.java diff --git a/libraryExtended/src/test/java/org/mustangproject/library/extended/XMLValidatorTest.java b/validator/src/test/java/org/mustangproject/library/extended/XMLValidatorTest.java similarity index 100% rename from libraryExtended/src/test/java/org/mustangproject/library/extended/XMLValidatorTest.java rename to validator/src/test/java/org/mustangproject/library/extended/XMLValidatorTest.java diff --git a/libraryExtended/src/test/java/org/mustangproject/library/extended/ZUGFeRDValidatorTest.java b/validator/src/test/java/org/mustangproject/library/extended/ZUGFeRDValidatorTest.java similarity index 100% rename from libraryExtended/src/test/java/org/mustangproject/library/extended/ZUGFeRDValidatorTest.java rename to validator/src/test/java/org/mustangproject/library/extended/ZUGFeRDValidatorTest.java diff --git a/libraryExtended/src/test/resources/FAIL_zugferd_2p1_MINIMUM_Rechnung_380.xml b/validator/src/test/resources/FAIL_zugferd_2p1_MINIMUM_Rechnung_380.xml similarity index 100% rename from libraryExtended/src/test/resources/FAIL_zugferd_2p1_MINIMUM_Rechnung_380.xml rename to validator/src/test/resources/FAIL_zugferd_2p1_MINIMUM_Rechnung_380.xml diff --git a/libraryExtended/src/test/resources/Facture_F20180027.pdf b/validator/src/test/resources/Facture_F20180027.pdf similarity index 100% rename from libraryExtended/src/test/resources/Facture_F20180027.pdf rename to validator/src/test/resources/Facture_F20180027.pdf diff --git a/libraryExtended/src/test/resources/XMLinvalidV2PDF.pdf b/validator/src/test/resources/XMLinvalidV2PDF.pdf similarity index 100% rename from libraryExtended/src/test/resources/XMLinvalidV2PDF.pdf rename to validator/src/test/resources/XMLinvalidV2PDF.pdf diff --git a/libraryExtended/src/test/resources/ZUGFeRD-invoice_rabatte_3_abschlag_duepayableamount.xml b/validator/src/test/resources/ZUGFeRD-invoice_rabatte_3_abschlag_duepayableamount.xml similarity index 100% rename from libraryExtended/src/test/resources/ZUGFeRD-invoice_rabatte_3_abschlag_duepayableamount.xml rename to validator/src/test/resources/ZUGFeRD-invoice_rabatte_3_abschlag_duepayableamount.xml diff --git a/libraryExtended/src/test/resources/ZUGFeRD-invoice_rabatte_4_abschlag_taxbasistotalamount.xml b/validator/src/test/resources/ZUGFeRD-invoice_rabatte_4_abschlag_taxbasistotalamount.xml similarity index 100% rename from libraryExtended/src/test/resources/ZUGFeRD-invoice_rabatte_4_abschlag_taxbasistotalamount.xml rename to validator/src/test/resources/ZUGFeRD-invoice_rabatte_4_abschlag_taxbasistotalamount.xml diff --git a/libraryExtended/src/test/resources/attributeBasedXMP_zugferd_2p0_EN16931_Einfach.pdf b/validator/src/test/resources/attributeBasedXMP_zugferd_2p0_EN16931_Einfach.pdf similarity index 100% rename from libraryExtended/src/test/resources/attributeBasedXMP_zugferd_2p0_EN16931_Einfach.pdf rename to validator/src/test/resources/attributeBasedXMP_zugferd_2p0_EN16931_Einfach.pdf diff --git a/libraryExtended/src/test/resources/attributeBasedXMP_zugferd_2p0_EN16931_Einfach_corrected.xml b/validator/src/test/resources/attributeBasedXMP_zugferd_2p0_EN16931_Einfach_corrected.xml similarity index 100% rename from libraryExtended/src/test/resources/attributeBasedXMP_zugferd_2p0_EN16931_Einfach_corrected.xml rename to validator/src/test/resources/attributeBasedXMP_zugferd_2p0_EN16931_Einfach_corrected.xml diff --git a/libraryExtended/src/test/resources/corruptedV2PDF.pdf b/validator/src/test/resources/corruptedV2PDF.pdf similarity index 100% rename from libraryExtended/src/test/resources/corruptedV2PDF.pdf rename to validator/src/test/resources/corruptedV2PDF.pdf diff --git a/libraryExtended/src/test/resources/invalidPDF.pdf b/validator/src/test/resources/invalidPDF.pdf similarity index 100% rename from libraryExtended/src/test/resources/invalidPDF.pdf rename to validator/src/test/resources/invalidPDF.pdf diff --git a/libraryExtended/src/test/resources/invalidV1.xml b/validator/src/test/resources/invalidV1.xml similarity index 100% rename from libraryExtended/src/test/resources/invalidV1.xml rename to validator/src/test/resources/invalidV1.xml diff --git a/libraryExtended/src/test/resources/invalidV1ExtraTags.xml b/validator/src/test/resources/invalidV1ExtraTags.xml similarity index 100% rename from libraryExtended/src/test/resources/invalidV1ExtraTags.xml rename to validator/src/test/resources/invalidV1ExtraTags.xml diff --git a/libraryExtended/src/test/resources/invalidV1TooMinimal.xml b/validator/src/test/resources/invalidV1TooMinimal.xml similarity index 100% rename from libraryExtended/src/test/resources/invalidV1TooMinimal.xml rename to validator/src/test/resources/invalidV1TooMinimal.xml diff --git a/libraryExtended/src/test/resources/invalidV2.xml b/validator/src/test/resources/invalidV2.xml similarity index 100% rename from libraryExtended/src/test/resources/invalidV2.xml rename to validator/src/test/resources/invalidV2.xml diff --git a/libraryExtended/src/test/resources/invalidV2Profile.xml b/validator/src/test/resources/invalidV2Profile.xml similarity index 100% rename from libraryExtended/src/test/resources/invalidV2Profile.xml rename to validator/src/test/resources/invalidV2Profile.xml diff --git a/libraryExtended/src/test/resources/invalidXMP.pdf b/validator/src/test/resources/invalidXMP.pdf similarity index 100% rename from libraryExtended/src/test/resources/invalidXMP.pdf rename to validator/src/test/resources/invalidXMP.pdf diff --git a/libraryExtended/src/test/resources/validAvoir_FR_type380_BASICWL.pdf b/validator/src/test/resources/validAvoir_FR_type380_BASICWL.pdf similarity index 100% rename from libraryExtended/src/test/resources/validAvoir_FR_type380_BASICWL.pdf rename to validator/src/test/resources/validAvoir_FR_type380_BASICWL.pdf diff --git a/libraryExtended/src/test/resources/validV1.xml b/validator/src/test/resources/validV1.xml similarity index 100% rename from libraryExtended/src/test/resources/validV1.xml rename to validator/src/test/resources/validV1.xml diff --git a/libraryExtended/src/test/resources/validV1WithAdditionalData.pdf b/validator/src/test/resources/validV1WithAdditionalData.pdf similarity index 100% rename from libraryExtended/src/test/resources/validV1WithAdditionalData.pdf rename to validator/src/test/resources/validV1WithAdditionalData.pdf diff --git a/libraryExtended/src/test/resources/validV2.xml b/validator/src/test/resources/validV2.xml similarity index 100% rename from libraryExtended/src/test/resources/validV2.xml rename to validator/src/test/resources/validV2.xml diff --git a/libraryExtended/src/test/resources/validV2Basic.xml b/validator/src/test/resources/validV2Basic.xml similarity index 100% rename from libraryExtended/src/test/resources/validV2Basic.xml rename to validator/src/test/resources/validV2Basic.xml diff --git a/libraryExtended/src/test/resources/validV2PDF.pdf b/validator/src/test/resources/validV2PDF.pdf similarity index 100% rename from libraryExtended/src/test/resources/validV2PDF.pdf rename to validator/src/test/resources/validV2PDF.pdf diff --git a/libraryExtended/src/test/resources/validZREtestZugferd.xml b/validator/src/test/resources/validZREtestZugferd.xml similarity index 100% rename from libraryExtended/src/test/resources/validZREtestZugferd.xml rename to validator/src/test/resources/validZREtestZugferd.xml diff --git a/libraryExtended/src/test/resources/valid_Avoir_FR_type380_minimum_factur-x.xml b/validator/src/test/resources/valid_Avoir_FR_type380_minimum_factur-x.xml similarity index 100% rename from libraryExtended/src/test/resources/valid_Avoir_FR_type380_minimum_factur-x.xml rename to validator/src/test/resources/valid_Avoir_FR_type380_minimum_factur-x.xml diff --git a/libraryExtended/utils/ZUGFeRD-Validierer-kriterien.pdf b/validator/utils/ZUGFeRD-Validierer-kriterien.pdf similarity index 100% rename from libraryExtended/utils/ZUGFeRD-Validierer-kriterien.pdf rename to validator/utils/ZUGFeRD-Validierer-kriterien.pdf