kriegaex commented on code in PR #125: URL: https://github.com/apache/xalan-java/pull/125#discussion_r1400040696
########## serializer/src/main/java/org/apache/xml/serializer/Version.java: ########## @@ -20,33 +20,97 @@ */ package org.apache.xml.serializer; + +import java.io.FileInputStream; +import java.io.IOException; +import java.io.InputStream; +import java.util.Properties; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + /** * Administrative class to keep track of the version number of * the Serializer release. * <P>This class implements the upcoming standard of having - * org.apache.project-name.Version.getVersion() be a standard way - * to get version information.</P> + * org.apache.project-name.Version.getVersion() be a standard way + * to get version information.</P> * @xsl.usage general */ public final class Version { + private static final String POM_PROPERTIES_JAR = "org/apache/xml/serializer/version.properties"; + private static final String POM_PROPERTIES_FILE_SYSTEM = "serializer/target/classes" + POM_PROPERTIES_JAR; + private static final String VERSION_NUMBER_PATTERN = "^(\\d+)[.](\\d+)[.](D)?(\\d+)(-SNAPSHOT)?$"; + private static final String NO_VERSION = "0.0.0"; + + private static String version = NO_VERSION; + private static int majorVersionNum; + private static int releaseVersionNum; + private static int maintenanceVersionNum; + private static int developmentVersionNum; + + private static boolean snapshot; Review Comment: @kubycsolutions, @vlsi, do you think these version classes justify creating an extra module `xalan-commons` or so at this point, just to get rid of duplicate code for those non-essential classes? If you both say "yes", I shall of course follow your advice and add one such module. But it seems to be out of scope of this PR, which is meant to migrate an existing Ant solution to a Maven one with a different approach. OTOH, it is never too early to apply the DRY principle. Up to you, but you have to both agree for me to change it. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@xalan.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@xalan.apache.org For additional commands, e-mail: dev-h...@xalan.apache.org