summaryrefslogtreecommitdiffstats
path: root/common.xml
diff options
context:
space:
mode:
authorArtur Signell <artur@vaadin.com>2012-09-06 19:09:29 +0300
committerArtur Signell <artur@vaadin.com>2012-09-09 11:23:48 +0300
commit07b4b903163b4c196972c13e25cdd83af27e2ef6 (patch)
treea2d2f7ca6cea34dcfa0a358c3cda41a2f13a0b93 /common.xml
parent94b1759e67c07fbca4c7371b374da97feb0fe7e7 (diff)
downloadvaadin-framework-07b4b903163b4c196972c13e25cdd83af27e2ef6.tar.gz
vaadin-framework-07b4b903163b4c196972c13e25cdd83af27e2ef6.zip
Filter webcontent files for @version@ and more (#9299)
Diffstat (limited to 'common.xml')
-rw-r--r--common.xml44
1 files changed, 41 insertions, 3 deletions
diff --git a/common.xml b/common.xml
index d2c6d7142a..db56cee10d 100644
--- a/common.xml
+++ b/common.xml
@@ -1,6 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="common" basedir="." default="" xmlns:ivy="antlib:org.apache.ivy.ant" xmlns:antcontrib="antlib:net.sf.antcontrib">
+ <tstamp>
+ <format property="build.date" pattern="yyyy-MM-dd" />
+ </tstamp>
+
<dirname property="vaadin.basedir" file="${ant.file.common}" />
<property file="${vaadin.basedir}/build.properties" />
@@ -21,8 +25,42 @@
<union id="empty.reference" />
- <!-- TODO Preprocess @version@ and more -->
- <fileset dir="${vaadin.basedir}/WebContent" id="common.files.for.all.jars">
+ <property name="filtered.webcontent.dir" location="${vaadin.basedir}/result/filteredWebContent" />
+
+ <target name="filter.webcontent" unless="webcontent.filtered">
+ <property name="webcontent.filtered" value="true" />
+
+ <delete dir="${filtered.webcontent.dir}" />
+ <copy todir="${filtered.webcontent.dir}">
+ <fileset dir="${vaadin.basedir}/WebContent">
+ <include name="img/**" />
+ </fileset>
+ </copy>
+ <copy todir="${filtered.webcontent.dir}">
+ <fileset dir="${vaadin.basedir}/WebContent">
+ <patternset>
+ <include name="release-notes.html" />
+ <include name="license.html" />
+ <include name="css/**" />
+ </patternset>
+ </fileset>
+ <filterchain>
+ <expandproperties />
+ <replacetokens begintoken="@" endtoken="@">
+ <token key="version" value="${vaadin.version}" />
+ </replacetokens>
+ <replacetokens begintoken="@" endtoken="@">
+ <token key="version-minor" value="${vaadin.version.major}.${vaadin.version.minor}" />
+ </replacetokens>
+ <replacetokens begintoken="@" endtoken="@">
+ <token key="builddate" value="${build.date}" />
+ </replacetokens>
+ </filterchain>
+ </copy>
+
+
+ </target>
+ <fileset dir="${filtered.webcontent.dir}" id="common.files.for.all.jars">
<patternset>
<include name="release-notes.html" />
<include name="license.html" />
@@ -225,7 +263,7 @@
</copy>
</target>
- <target name="dependencies" description="Resolves dependencies needed by this module">
+ <target name="dependencies" description="Resolves dependencies needed by this module" depends="filter.webcontent">
<ivy:resolve resolveid="common" conf="build, build-provided" />
<ivy:cachepath pathid="classpath.compile.dependencies" conf="build, build-provided" />
</target>