Extract version number from pom.xml to reduce duplication of the version number
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
package org.mustangproject.ZUGFeRD;
|
||||
|
||||
public final class Version {
|
||||
public static final String VERSION = "${project.version}";
|
||||
}
|
||||
@@ -237,7 +237,6 @@ public class ZUGFeRDExporter implements Closeable {
|
||||
|
||||
// // MAIN CLASS
|
||||
private PDFAConformanceLevel conformanceLevel = PDFAConformanceLevel.UNICODE;
|
||||
private String versionStr = "1.4.1";
|
||||
|
||||
// BASIC, COMFORT etc - may be set from outside.
|
||||
private ZUGFeRDConformanceLevel zUGFeRDConformanceLevel = ZUGFeRDConformanceLevel.EXTENDED;
|
||||
@@ -466,7 +465,7 @@ public class ZUGFeRDExporter implements Closeable {
|
||||
String creator, boolean attachZugferdHeaders) throws IOException,
|
||||
TransformerException {
|
||||
String fullProducer = producer + " (via mustangproject.org "
|
||||
+ versionStr + ")";
|
||||
+ Version.VERSION + ")";
|
||||
|
||||
PDDocumentCatalog cat = doc.getDocumentCatalog();
|
||||
PDMetadata metadata = new PDMetadata(doc);
|
||||
|
||||
@@ -29,8 +29,6 @@ import java.io.InputStream;
|
||||
import java.util.GregorianCalendar;
|
||||
|
||||
public class ZUGFeRDExporterFromA1Factory {
|
||||
private static final String VERSION_STR = "1.4.0";
|
||||
|
||||
private boolean ignoreA1Errors = false;
|
||||
private ZUGFeRDConformanceLevel zugferdConformanceLevel = ZUGFeRDConformanceLevel.EXTENDED;
|
||||
private PDFAConformanceLevel conformanceLevel = PDFAConformanceLevel.U;
|
||||
@@ -89,7 +87,7 @@ public class ZUGFeRDExporterFromA1Factory {
|
||||
}
|
||||
|
||||
private void makePDFA3compliant(PDDocument doc) throws IOException {
|
||||
String fullProducer = producer + " (via mustangproject.org " + VERSION_STR + ")";
|
||||
String fullProducer = producer + " (via mustangproject.org " + Version.VERSION + ")";
|
||||
|
||||
PDDocumentCatalog cat = doc.getDocumentCatalog();
|
||||
PDMetadata metadata = new PDMetadata(doc);
|
||||
|
||||
Reference in New Issue
Block a user