[Yanel-commits] rev 47046 - in public/yanel/trunk/src:
build/resource-types contributions/resources/policymanager
contributions/resources/policymanager/htdocs
contributions/resources/policymanager/src/build
guillaume at wyona.com
guillaume at wyona.com
Thu Jan 14 10:25:17 CET 2010
Author: guillaume
Date: 2010-01-14 10:25:17 +0100 (Thu, 14 Jan 2010)
New Revision: 47046
Added:
public/yanel/trunk/src/build/resource-types/GWT-RT.build.xml
public/yanel/trunk/src/contributions/resources/policymanager/src/build/GWT.build.properties
Modified:
public/yanel/trunk/src/build/resource-types/
public/yanel/trunk/src/contributions/resources/policymanager/
public/yanel/trunk/src/contributions/resources/policymanager/build.xml
public/yanel/trunk/src/contributions/resources/policymanager/htdocs/
public/yanel/trunk/src/contributions/resources/policymanager/src/build/
Log:
Added support for Google Web Toolkit (GWT) direct from Yanel resource-types:
- downloading the GWT SDK is no longer required just to compile a GWT module
for all three Linux/Mac/Windows supported platforms
- added GWT 2 support without using the deprecated GWT 1 dev tools
(unfortunately I could not get dev mode to work yet)
- GWT 1 should still work (although hsoted mode does not work out of the box anynore
on recent Linux distributions where libstdc++5 is no longer available)
Also applied this to the policy manager, but only for compilation:
the complied GWT module which Yanel uses is still the old committed one.
Property changes on: public/yanel/trunk/src/build/resource-types
___________________________________________________________________
Name: svn:externals
+ GWT-src-core-java -r32477 http://svn.wyona.com/repos/public/yanel/contributions/ajax-components/src/core/java
Copied: public/yanel/trunk/src/build/resource-types/GWT-RT.build.xml (from rev 47031, public/yanel/contributions/ajax-components/build.xml)
===================================================================
--- public/yanel/trunk/src/build/resource-types/GWT-RT.build.xml (rev 0)
+++ public/yanel/trunk/src/build/resource-types/GWT-RT.build.xml 2010-01-14 09:25:17 UTC (rev 47046)
@@ -0,0 +1,137 @@
+<?xml version="1.0"?>
+
+<!-- Everything common to resource types using Google Web Toolkit. -->
+<!--XXX maybe allow handling more than one GWT module per resource-type? -->
+
+<project name="yanel-GWT-resource-type"
+ xmlns:artifact="antlib:org.apache.maven.artifact.ant"
+>
+
+ <property name="yanel.home" value="${yanel.source.home}"/>
+ <import file="${yanel.home}/src/build/resource-types/resource-type.build.xml"/>
+
+ <property file="${resource.home.dir}/src/build/GWT.local.build.properties"/>
+ <property file="${resource.home.dir}/src/build/GWT.build.properties"/>
+ <property name="component.home.dir" value="${resource.home.dir}/src-gwt"/>
+
+ <condition property="platform" value="mac">
+ <os family="mac"/>
+ </condition>
+ <condition property="platform" value="windows" else="linux">
+ <os family="winnt"/>
+ </condition>
+
+ <condition property="gwt1">
+ <matches pattern="^1\." string="${gwt.version}"/>
+ </condition>
+
+ <condition property="gwt.outputdir.argname" value="out" else="war">
+ <istrue value="${gwt1}"/>
+ </condition>
+
+ <target name="gwt:dependencies" depends="dependencies" unless="gwt1">
+ <artifact:remoteRepository id="wyona.remote.repository" url="${maven.url}"/>
+
+ <artifact:dependencies pathId="gwt.compile.classpath" filesetId="gwt.compile.fileset">
+ <remoteRepository refid="wyona.remote.repository"/>
+ <dependency groupId="com.google.gwt" artifactId="gwt-user" version="${gwt.version}"/>
+ <dependency groupId="com.google.gwt" artifactId="gwt-dev" version="${gwt.version}"/>
+ </artifact:dependencies>
+ </target>
+
+ <target name="gwt1:dependencies" depends="dependencies" if="gwt1">
+ <artifact:remoteRepository id="wyona.remote.repository" url="${maven.url}"/>
+
+ <artifact:dependencies pathId="gwt.compile.classpath" filesetId="gwt.compile.fileset">
+ <remoteRepository refid="wyona.remote.repository"/>
+ <dependency groupId="com.google.gwt" artifactId="gwt-user" version="${gwt.version}"/>
+ <dependency groupId="com.google.gwt" artifactId="gwt-dev" version="${gwt.version}" classifier="${platform}"/>
+ </artifact:dependencies>
+ </target>
+
+ <!-- Initialize build properties -->
+ <target name="init" depends="gwt1:dependencies, gwt:dependencies, yanel-resource-type.init">
+ <!-- Read module and class name from component specific build.properties -->
+ <property file="${component.home.dir}/build.properties"/>
+
+ <property name="component.build.dir" value="${resource.home.dir}/htdocs"/>
+ <!--property name="component.resources.build.dir" value="${component.build.dir}"/--><!--/resources-->
+ <property name="component.java.dir" value="${component.home.dir}/java"/>
+
+ <path id="google.compile.classpath">
+ <fileset refid="gwt.compile.fileset"/>
+ <pathelement path="${yanel.home}/src/build/resource-types/GWT-src-core-java" /><!--XXX HACK: handle submodules properly! -->
+ <pathelement path="${component.java.dir}/" />
+ <!-- TODO: make this configurable per project -->
+ <!--pathelement location="src/navigation-tree/lib/gwtext.jar"/-->
+ </path>
+ </target>
+
+ <target name="clean" depends="yanel-resource-type.clean, init" description="Remove previous build">
+ <delete dir="${component.build.dir}/${module.name}"/>
+ </target>
+
+ <target name="compile" depends="yanel-resource-type.compile, gwt:compile" description="Compile Java classes and GWT files"/>
+
+ <target name="gwt:compile" depends="clean" description="Compile GWT files">
+
+ <echo>Module name: ${module.name}</echo>
+ <echo>Component build directory: ${component.build.dir}</echo>
+
+ <condition property="gwt.compiler.classname" value="com.google.gwt.dev.GWTCompiler" else="com.google.gwt.dev.Compiler">
+ <istrue value="${gwt1}"/>
+ </condition>
+
+ <java classname="${gwt.compiler.classname}" fork="yes">
+ <classpath refid="google.compile.classpath" />
+ <jvmarg value="-Xmx256M"/>
+
+ <arg value="-${gwt.outputdir.argname}" />
+ <arg value="${component.build.dir}" />
+
+ <arg value="-style" />
+ <arg value="OBF" />
+ <!--arg value="PRETTY" /-->
+ <!--arg value="DETAILED" /-->
+
+ <arg value="${module.name}" />
+
+ <!--arg value="-help"/-->
+ </java>
+ </target>
+
+ <!--target name="gwt.jar" depends="init" description="Package compiled Javascript">
+ <jar destfile="${component.build.dir}/gwt-${gwt.version}-${module.name}-resources.jar"
+ basedir="${component.resources.build.dir}"
+ />
+ </target-->
+
+ <target name="gwt:hostmode" description="Opens your component in the gwt host mode browser"><!-- depends="clean"-->
+ <fail unless="hostmode.hostpage.name">
+ Could not read property "hostmode.hostpage.name".
+ If you want to use gwt.hostedmode set its value in your component's build.properties.
+ e.g. in ${component.home.dir}/build.properties add: hostmode.hostpage.name=NameOfYourTestFile.html
+ </fail>
+ <fail unless="gwt.home">
+ Could not read property "gwt.home".
+ If you want to use gwt.hostedmode set its value in your build.properties.
+ e.g. in build.properties add: gwt.home=/path/to/gwt-dir
+ </fail>
+ <condition property="gwt.runner.classname" value="com.google.gwt.dev.GWTShell" else="com.google.gwt.dev.DevMode">
+ <istrue value="${gwt1}"/>
+ </condition>
+ <java classname="${gwt.runner.classname}"
+ fork="true">
+ <classpath>
+ <fileset dir="${gwt.home}">
+ <include name="gwt-user.jar" />
+ <include name="gwt-dev-${platform}.jar" />
+ </fileset>
+ <path refid="gwt.compile.classpath" />
+ </classpath>
+ <arg line="-${gwt.outputdir.argname} ./www"/>
+ <arg line="${module.name}/${hostmode.hostpage.name}"/>
+ <!--arg value="-help"/-->
+ </java>
+ </target>
+</project>
Property changes on: public/yanel/trunk/src/contributions/resources/policymanager
___________________________________________________________________
Name: svn:externals
+ src-gwt -r47031 http://svn.wyona.com/repos/public/yanel/contributions/ajax-components/src/access-policy-editor
Modified: public/yanel/trunk/src/contributions/resources/policymanager/build.xml
===================================================================
--- public/yanel/trunk/src/contributions/resources/policymanager/build.xml 2010-01-14 09:24:38 UTC (rev 47045)
+++ public/yanel/trunk/src/contributions/resources/policymanager/build.xml 2010-01-14 09:25:17 UTC (rev 47046)
@@ -1,5 +1,3 @@
-<?xml version="1.0"?>
-
-<project name="yanel-policymanager-resource" default="deploy-jar">
- <import file="${yanel.source.home}/src/build/resource-types/resource-type.build.xml"/>
+<project name="yanel-policymanager-RT" default="deploy-jar">
+ <import file="${yanel.source.home}/src/build/resource-types/GWT-RT.build.xml"/>
</project>
Property changes on: public/yanel/trunk/src/contributions/resources/policymanager/htdocs
___________________________________________________________________
Name: svn:ignore
+ org.wyona.security.gwt.accesspolicyeditor.AccessPolicyEditor
Property changes on: public/yanel/trunk/src/contributions/resources/policymanager/src/build
___________________________________________________________________
Name: svn:ignore
+ GWT.local.build.properties
Copied: public/yanel/trunk/src/contributions/resources/policymanager/src/build/GWT.build.properties (from rev 47032, public/yanel/contributions/ajax-components/build.properties)
===================================================================
--- public/yanel/trunk/src/contributions/resources/policymanager/src/build/GWT.build.properties (rev 0)
+++ public/yanel/trunk/src/contributions/resources/policymanager/src/build/GWT.build.properties 2010-01-14 09:25:17 UTC (rev 47046)
@@ -0,0 +1,12 @@
+# Path to GWT package (only needed in hosted mode)
+#gwt.home=/Users/michaelwechner/local/gwt-mac-1.7.1
+#gwt.home=/home/michi/local/gwt-linux-1.4.62
+#gwt.home=C:/JAVA_LIB/gwt-windows-1.4.62
+#gwt.home=/home/guillaume/Applications/gwt-2.0.0
+
+# GWT version
+# 1.62 is the first version available with dev tools from the Maven central repo
+gwt.version=1.4.62
+# 1.7.1 is the last 1.x version ATM
+#gwt.version=1.7.1
+#gwt.version=2.0.0
More information about the Yanel-commits
mailing list