You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pivot.apache.org by gb...@apache.org on 2009/06/17 18:04:50 UTC
svn commit: r785695 - in /incubator/pivot/trunk: build.xml
demos/www/kitchen_sink.html demos/www/kitchen_sink.template.html
web/www/index.html web/www/index.template.html
Author: gbrown
Date: Wed Jun 17 16:04:49 2009
New Revision: 785695
URL: http://svn.apache.org/viewvc?rev=785695&view=rev
Log:
Use token replacement to inject version numbers into HTML files in deploy target.
Added:
incubator/pivot/trunk/demos/www/kitchen_sink.template.html
- copied, changed from r785694, incubator/pivot/trunk/demos/www/kitchen_sink.html
incubator/pivot/trunk/web/www/index.template.html
Removed:
incubator/pivot/trunk/demos/www/kitchen_sink.html
incubator/pivot/trunk/web/www/index.html
Modified:
incubator/pivot/trunk/build.xml
Modified: incubator/pivot/trunk/build.xml
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/build.xml?rev=785695&r1=785694&r2=785695&view=diff
==============================================================================
--- incubator/pivot/trunk/build.xml (original)
+++ incubator/pivot/trunk/build.xml Wed Jun 17 16:04:49 2009
@@ -111,12 +111,33 @@
<delete dir="${folder.lib}"/>
<delete dir="demos/www/lib"/>
+ <delete>
+ <fileset dir="demos/www">
+ <include name="*.html"/>
+ <exclude name="index.html"/>
+ <exclude name="*.template.html"/>
+ </fileset>
+ </delete>
<delete file="${folder.lib}/${ant.project.name}_demos.war"/>
<delete dir="tutorials/www/lib"/>
+ <delete>
+ <fileset dir="tutorials/www">
+ <include name="*.html"/>
+ <exclude name="index.html"/>
+ <exclude name="*.template.html"/>
+ </fileset>
+ </delete>
<delete file="${folder.lib}/${ant.project.name}_tutorials.war"/>
<delete dir="web/www/lib"/>
+ <delete>
+ <fileset dir="web/www">
+ <include name="*.html"/>
+ <exclude name="index.html"/>
+ <exclude name="*.template.html"/>
+ </fileset>
+ </delete>
<delete file="${folder.lib}/${ant.project.name}_web_test.war"/>
</target>
@@ -703,6 +724,10 @@
<delete dir="${folder.lib}/signed"/>
+ <!-- Define filters for processing HTML files -->
+ <filter token="project_name" value="${ant.project.name}"/>
+ <filter token="version" value="${version}"/>
+
<!-- Create demos WAR -->
<mkdir dir="demos/www/lib"/>
<copy todir="demos/www/lib">
@@ -712,8 +737,17 @@
</fileset>
</copy>
+ <copy todir="demos/www" filtering="true">
+ <fileset dir="demos/www">
+ <include name="*.template.html"/>
+ </fileset>
+ <mapper type="glob" from="*.template.html" to="*.html"/>
+ </copy>
+
<war destfile="${folder.lib}/${ant.project.name}_demos.war" webxml="demos/web.xml">
- <fileset dir="demos/www"/>
+ <fileset dir="demos/www">
+ <exclude name="*.template.html"/>
+ </fileset>
</war>
<!-- Create tutorials WAR -->
@@ -726,8 +760,17 @@
</fileset>
</copy>
+ <copy todir="tutorials/www" filtering="true">
+ <fileset dir="tutorials/www">
+ <include name="*.template.html"/>
+ </fileset>
+ <mapper type="glob" from="*.template.html" to="*.html"/>
+ </copy>
+
<war destfile="${folder.lib}/${ant.project.name}_tutorials.war" webxml="tutorials/web.xml">
- <fileset dir="tutorials/www"/>
+ <fileset dir="tutorials/www">
+ <exclude name="*.template.html"/>
+ </fileset>
</war>
<!-- Create web-test WAR -->
@@ -754,8 +797,17 @@
</fileset>
</copy>
+ <copy todir="web/www" filtering="true">
+ <fileset dir="web/www">
+ <include name="*.template.html"/>
+ </fileset>
+ <mapper type="glob" from="*.template.html" to="*.html"/>
+ </copy>
+
<war destfile="${folder.lib}/${ant.project.name}_web_test.war" webxml="web/web.xml">
- <fileset dir="web/www"/>
+ <fileset dir="web/www">
+ <exclude name="*.template.html"/>
+ </fileset>
<classes dir="web/${folder.bin}">
<include name="org/apache/pivot/web/test/server/**"/>
</classes>
Copied: incubator/pivot/trunk/demos/www/kitchen_sink.template.html (from r785694, incubator/pivot/trunk/demos/www/kitchen_sink.html)
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/demos/www/kitchen_sink.template.html?p2=incubator/pivot/trunk/demos/www/kitchen_sink.template.html&p1=incubator/pivot/trunk/demos/www/kitchen_sink.html&r1=785694&r2=785695&rev=785695&view=diff
==============================================================================
--- incubator/pivot/trunk/demos/www/kitchen_sink.html (original)
+++ incubator/pivot/trunk/demos/www/kitchen_sink.template.html Wed Jun 17 16:04:49 2009
@@ -21,7 +21,7 @@
</head>
<body style="margin:0px; padding:0px">
<applet code="org.apache.pivot.wtk.BrowserApplicationContext$HostApplet"
- archive="lib/pivot-core.jar,lib/pivot-wtk.jar,lib/pivot-wtk.terra.jar,lib/pivot-tutorials.jar"
+ archive="@project_name@-core-@version@.jar,@project_name@-wtk-@version@.jar,@project_name@-wtk-@version@.terra.jar,@project_name@-web-@version@.jar,@project_name@-tutorials-@version@.jar"
width="100%" height="100%">
<param name="applicationClassName" value="org.apache.pivot.tutorials.KitchenSink">
</applet>
Added: incubator/pivot/trunk/web/www/index.template.html
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/web/www/index.template.html?rev=785695&view=auto
==============================================================================
--- incubator/pivot/trunk/web/www/index.template.html (added)
+++ incubator/pivot/trunk/web/www/index.template.html Wed Jun 17 16:04:49 2009
@@ -0,0 +1,29 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to you under the Apache License,
+Version 2.0 (the "License"); you may not use this file except in
+compliance with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+<html>
+<head>
+<title>Web Query Test Client</title>
+</head>
+<body style="margin:0px; padding:0px">
+<applet code="org.apache.pivot.wtk.BrowserApplicationContext$HostApplet"
+ archive="@project_name@-core-@version@.jar,@project_name@-wtk-@version@.jar,@project_name@-wtk-@version@.terra.jar,@project_name@-web-@version@.jar,@project_name@-web-@version@.test.jar"
+ width="100%" height="100%">
+ <param name="applicationClassName" value="org.apache.pivot.web.test.WebQueryTestClient">
+</applet>
+</body>
+</html>