Merge pull request #26 from yankee42/version-from-pom
Use version from pom.xml instead java constant
This commit is contained in:
13
pom.xml
13
pom.xml
@@ -120,6 +120,19 @@
|
|||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
|
<artifactId>templating-maven-plugin</artifactId>
|
||||||
|
<version>1.0.0</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>filtering-java-templates</id>
|
||||||
|
<goals>
|
||||||
|
<goal>filter-sources</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
<mailingLists>
|
<mailingLists>
|
||||||
|
|||||||
@@ -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
|
// // MAIN CLASS
|
||||||
private PDFAConformanceLevel conformanceLevel = PDFAConformanceLevel.UNICODE;
|
private PDFAConformanceLevel conformanceLevel = PDFAConformanceLevel.UNICODE;
|
||||||
private String versionStr = "1.4.1";
|
|
||||||
|
|
||||||
// BASIC, COMFORT etc - may be set from outside.
|
// BASIC, COMFORT etc - may be set from outside.
|
||||||
private ZUGFeRDConformanceLevel zUGFeRDConformanceLevel = ZUGFeRDConformanceLevel.EXTENDED;
|
private ZUGFeRDConformanceLevel zUGFeRDConformanceLevel = ZUGFeRDConformanceLevel.EXTENDED;
|
||||||
@@ -466,7 +465,7 @@ public class ZUGFeRDExporter implements Closeable {
|
|||||||
String creator, boolean attachZugferdHeaders) throws IOException,
|
String creator, boolean attachZugferdHeaders) throws IOException,
|
||||||
TransformerException {
|
TransformerException {
|
||||||
String fullProducer = producer + " (via mustangproject.org "
|
String fullProducer = producer + " (via mustangproject.org "
|
||||||
+ versionStr + ")";
|
+ Version.VERSION + ")";
|
||||||
|
|
||||||
PDDocumentCatalog cat = doc.getDocumentCatalog();
|
PDDocumentCatalog cat = doc.getDocumentCatalog();
|
||||||
PDMetadata metadata = new PDMetadata(doc);
|
PDMetadata metadata = new PDMetadata(doc);
|
||||||
|
|||||||
@@ -29,8 +29,6 @@ import java.io.InputStream;
|
|||||||
import java.util.GregorianCalendar;
|
import java.util.GregorianCalendar;
|
||||||
|
|
||||||
public class ZUGFeRDExporterFromA1Factory {
|
public class ZUGFeRDExporterFromA1Factory {
|
||||||
private static final String VERSION_STR = "1.4.0";
|
|
||||||
|
|
||||||
private boolean ignoreA1Errors = false;
|
private boolean ignoreA1Errors = false;
|
||||||
private ZUGFeRDConformanceLevel zugferdConformanceLevel = ZUGFeRDConformanceLevel.EXTENDED;
|
private ZUGFeRDConformanceLevel zugferdConformanceLevel = ZUGFeRDConformanceLevel.EXTENDED;
|
||||||
private PDFAConformanceLevel conformanceLevel = PDFAConformanceLevel.U;
|
private PDFAConformanceLevel conformanceLevel = PDFAConformanceLevel.U;
|
||||||
@@ -89,7 +87,7 @@ public class ZUGFeRDExporterFromA1Factory {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void makePDFA3compliant(PDDocument doc) throws IOException {
|
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();
|
PDDocumentCatalog cat = doc.getDocumentCatalog();
|
||||||
PDMetadata metadata = new PDMetadata(doc);
|
PDMetadata metadata = new PDMetadata(doc);
|
||||||
|
|||||||
Reference in New Issue
Block a user