summaryrefslogtreecommitdiffstats
path: root/src/com/itmill/toolkit
diff options
context:
space:
mode:
authorJoonas Lehtinen <joonas.lehtinen@itmill.com>2006-12-28 11:58:18 +0000
committerJoonas Lehtinen <joonas.lehtinen@itmill.com>2006-12-28 11:58:18 +0000
commita9e7a7297fe2b428f76d14c85a36f0dfd1c06ff7 (patch)
tree0aeb38f1b047401a62169617e9118a5c5023e12e /src/com/itmill/toolkit
parent38a976b5a14d0cf87008c0fce0499e1e5fae8ca9 (diff)
downloadvaadin-framework-a9e7a7297fe2b428f76d14c85a36f0dfd1c06ff7.tar.gz
vaadin-framework-a9e7a7297fe2b428f76d14c85a36f0dfd1c06ff7.zip
Now version info is automatically included from build-system. Removed support for SNAPSHOT theme jars, as they are not needed anymore.
svn changeset:175/svn branch:toolkit
Diffstat (limited to 'src/com/itmill/toolkit')
-rw-r--r--src/com/itmill/toolkit/terminal/web/ApplicationServlet.java38
1 files changed, 22 insertions, 16 deletions
diff --git a/src/com/itmill/toolkit/terminal/web/ApplicationServlet.java b/src/com/itmill/toolkit/terminal/web/ApplicationServlet.java
index 9ea52999aa..4b924889ba 100644
--- a/src/com/itmill/toolkit/terminal/web/ApplicationServlet.java
+++ b/src/com/itmill/toolkit/terminal/web/ApplicationServlet.java
@@ -92,8 +92,7 @@ import com.itmill.toolkit.service.License.LicenseViolation;
* technologies.
*
* @author IT Mill Ltd.
- * @version
- * @VERSION@
+ * @version @VERSION@
* @since 3.0
*/
@@ -101,17 +100,29 @@ public class ApplicationServlet extends HttpServlet implements
Application.WindowAttachListener, Application.WindowDetachListener,
Paintable.RepaintRequestListener {
- // Versions
- // TODO AUTOUPDATE VERSION NUMBER FROM BUILDSCRIPT
- private static final int VERSION_MAJOR = 4;
+ // Version
+ public static final String VERSION;
- private static final int VERSION_MINOR = 0;
+ public static final int VERSION_MAJOR;
- private static final int VERSION_BUILD = 0;
+ public static final int VERSION_MINOR;
- private static final String VERSION = "" + VERSION_MAJOR + "."
- + VERSION_MINOR + "." + VERSION_BUILD;
+ public static final String VERSION_BUILD;
+ static {
+ if ("@VERSION@".equals("@"+"VERSION"+"@"))
+ VERSION = "4.0.0-INTERNAL-NONVERSIONED-DEBUG-BUILD";
+ else
+ VERSION = "@VERSION@";
+ String[] digits = VERSION.split("\\.");
+ VERSION_MAJOR = Integer.parseInt(digits[0]);
+ VERSION_MINOR= Integer.parseInt(digits[1]);
+ VERSION_BUILD = digits[2];
+
+ // TODO REMOVE DEBUG
+ System.out.println(VERSION + "," + VERSION_MAJOR + "," + VERSION_MINOR + "," + VERSION_BUILD);
+ }
+
// Configurable parameter names
private static final String PARAMETER_DEBUG = "Debug";
@@ -152,15 +163,11 @@ public class ApplicationServlet extends HttpServlet implements
private static String THEME_LISTING_FILE = THEME_DIRECTORY_PATH
+ "themes.txt";
- private static String DEFAULT_THEME_JAR_PREFIX = "itmill-toolkit-web-themes";
+ private static String DEFAULT_THEME_JAR_PREFIX = "itmill-toolkit-themes";
private static String DEFAULT_THEME_JAR = "WEB-INF/lib/"
+ DEFAULT_THEME_JAR_PREFIX + "-" + VERSION + ".jar";
- private static String DEFAULT_THEME_SNAPSHOT_JAR = "WEB-INF/lib/"
- + DEFAULT_THEME_JAR_PREFIX + "-" + VERSION_MAJOR + "."
- + VERSION_MINOR + "-SNAPSHOT.jar";
-
private static String DEFAULT_THEME_TEMP_FILE_PREFIX = "ITMILL_TMP_";
private static String SERVER_COMMAND_PARAM = "SERVER_COMMANDS";
@@ -279,8 +286,7 @@ public class ApplicationServlet extends HttpServlet implements
// Add the default theme source
String[] defaultThemeFiles = new String[] {
getApplicationOrSystemProperty(PARAMETER_DEFAULT_THEME_JAR,
- DEFAULT_THEME_JAR), DEFAULT_THEME_SNAPSHOT_JAR
-
+ DEFAULT_THEME_JAR)
};
File f = findDefaultThemeJar(defaultThemeFiles);
try {