[Yanel-commits] rev 31318 -
public/yanel/contributions/ajax-components
michi at wyona.com
michi at wyona.com
Wed Feb 6 15:37:31 CET 2008
Author: michi
Date: 2008-02-06 15:37:30 +0100 (Wed, 06 Feb 2008)
New Revision: 31318
Modified:
public/yanel/contributions/ajax-components/README.txt
public/yanel/contributions/ajax-components/build.xml
Log:
generic build file finished
Modified: public/yanel/contributions/ajax-components/README.txt
===================================================================
--- public/yanel/contributions/ajax-components/README.txt 2008-02-06 14:37:00 UTC (rev 31317)
+++ public/yanel/contributions/ajax-components/README.txt 2008-02-06 14:37:30 UTC (rev 31318)
@@ -4,10 +4,14 @@
--------------------------------------------------
0) Download and install Apache Ant
+
1) Download GWT from http://code.google.com/webtoolkit/download.html
+
2) Copy build.properties to local.build.properties and reconfigure
- the path to the downloaded (and unpacked) GWT package
- the operating system specific gwt dev lib name
within local.build.properties
- 5) Start building components (e.g. change directory to upload and run ant. A build directory should be created.)
- 6) Test components (e.g. open a browser and open one of the test files, for example" ..../ajax-components/upload/build/org.wyona.yanel.gwt.Upload/Upload.html)
+
+ 5) Start building components (e.g. "ant -Dcomponent.home.dir=src/hello-world". A build directory should be created within the component directory, e.g. src/hello-world/build)
+
+ 6) Test components (e.g. open a browser and open one of the test files, for example src/hello-world/build/org.wyona.yanel.gwt.helloworld.HelloWorld/TestHelloWorld.html)
Modified: public/yanel/contributions/ajax-components/build.xml
===================================================================
--- public/yanel/contributions/ajax-components/build.xml 2008-02-06 14:37:00 UTC (rev 31317)
+++ public/yanel/contributions/ajax-components/build.xml 2008-02-06 14:37:30 UTC (rev 31318)
@@ -1,7 +1,45 @@
<?xml version="1.0"?>
-<project default="info" basedir=".">
- <target name="info">
- <echo>Please for now use build.xml of a component you need</echo>
- </target>
+<project default="google.compile" name="AJAX components">
+
+ <target name="init" description="Initialize build properties">
+ <echo>Initializing build</echo>
+
+ <property file="local.build.properties"/>
+ <property file="build.properties"/>
+
+ <!-- ant -Dcomponent.home.dir=src/hello-world -->
+ <property name="component.home.dir" value="src/hello-world"/>
+ <echo>Component home directory: ${component.home.dir}</echo>
+
+ <property name="component.build.dir" value="${component.home.dir}/build"/>
+ <property name="component.java.dir" value="${component.home.dir}/java"/>
+
+ <path id="google.compile.classpath">
+ <fileset dir="${gwt.home}">
+ <include name="gwt-user.jar" />
+ <include name="${gwt.dev.lib}" />
+ </fileset>
+ <pathelement path="core/src/java" />
+ <pathelement path="${component.java.dir}/" />
+ </path>
+ </target>
+
+ <target name="clean" depends="init" description="Remove previous build">
+ <delete dir="${component.build.dir}"/>
+ </target>
+
+ <target name="google.compile" depends="clean" description="Compiles Java classes and transforms into Javascript">
+ <!-- Read module name from component specific build.properties -->
+ <property file="${component.home.dir}/build.properties"/>
+
+ <java classname="com.google.gwt.dev.GWTCompiler" fork="yes">
+ <classpath refid="google.compile.classpath" />
+ <arg value="-out" />
+ <arg value="${component.build.dir}" />
+ <arg value="-style" />
+ <arg value="OBF" />
+ <arg value="${module.name}" />
+ </java>
+ </target>
</project>
More information about the Yanel-commits
mailing list