瀏覽代碼

Module for compiled client side (#9299)

tags/7.0.0.beta1
Artur Signell 11 年之前
父節點
當前提交
557acfb6c4
共有 7 個文件被更改,包括 146 次插入12 次删除
  1. 3
    3
      build.xml
  2. 100
    0
      client-compiled/build.xml
  3. 26
    0
      client-compiled/ivy.xml
  4. 12
    4
      client-compiler/build.xml
  5. 0
    0
      client-compiler/ivy.xml
  6. 4
    4
      common.xml
  7. 1
    1
      server/ivy.xml

+ 3
- 3
build.xml 查看文件

<?xml version="1.0"?> <?xml version="1.0"?>


<project name="vaadin" basedir="." default="all" xmlns:ivy="antlib:org.apache.ivy.ant">
<project name="vaadin" basedir="." default="package" xmlns:ivy="antlib:org.apache.ivy.ant">
<include file="common.xml" as="common" /> <include file="common.xml" as="common" />


<path id="vaadin.buildhelpers.classpath" location="${vaadin.basedir}/buildhelpers/result/classes" /> <path id="vaadin.buildhelpers.classpath" location="${vaadin.basedir}/buildhelpers/result/classes" />
target: all target: all
================================= --> ================================= -->
<!--<target name="all" description="Compiles all parts of the project" depends="buildhelpers,theme-compiler,shared,server,client">--> <!--<target name="all" description="Compiles all parts of the project" depends="buildhelpers,theme-compiler,shared,server,client">-->
<target name="all" description="Compiles all parts of the project" depends="buildorder">
<subant buildpathref="build-path">
<target name="package" description="Compiles and packages all modules in the project" depends="buildorder">
<subant buildpathref="build-path" target="publish-local">
</subant> </subant>
</target> </target>



+ 100
- 0
client-compiled/build.xml 查看文件

<?xml version="1.0"?>

<project name="vaadin-client-compiler" basedir="." default="publish-local" xmlns:ivy="antlib:org.apache.ivy.ant">
<description>
Compiled (JS+HTML) version of client side
</description>

<include file="../common.xml" as="common" />
<include file="../build.xml" as="vaadin" />
<include file="../gwt-files.xml" as="gwtfiles" />

<!-- global properties -->
<property name="module.name" value="vaadin-client-compiled" />
<property name="result.dir" value="result" />

<target name="default-widgetset">
<antcall target="compile-module">
<param name="module" value="com.vaadin.DefaultWidgetSet" />
</antcall>
</target>


<target name="compile-module">
<fail unless="module" message="You must give the module to compile in the 'module' parameter" />
<property name="result.dir" location="result" />
<property name="style" value="OBF" />
<property name="localWorkers" value="2" />
<property name="extraParams" value="" />
<property name="module.output.dir" location="${result.dir}/VAADIN/widgetsets" />

<ivy:resolve resolveid="common" conf="build" />
<ivy:cachepath pathid="classpath.compile.widgetset" conf="build" />

<echo>Compiling ${module} to ${module.output.dir}</echo>
<mkdir dir="${module.output.dir}" />

<!-- Disabled to reduce JAR size: precompile the widgetset to a .gwtar file -->
<!--
<java classname="com.google.gwt.dev.CompileModule" classpathref="compile.classpath.widgetset" failonerror="yes" fork="yes" maxmemory="512m">
<arg value="-out" />
<arg value="${result-precompiled-widgetsets}" />
<arg value="-strict" />
<arg value="${widgetset}" />

<jvmarg value="-Xss8M"/>
<jvmarg value="-XX:MaxPermSize=256M"/>
<jvmarg value="-Djava.awt.headless=true"/>
</java>
-->

<!-- compile the widgetset -->
<java classname="com.google.gwt.dev.Compiler" classpathref="classpath.compile.widgetset" failonerror="yes" fork="yes" maxmemory="512m">
<arg value="-war" />
<arg value="${module.output.dir}" />
<arg value="-style" />
<arg value="${style}" />
<arg value="-localWorkers" />
<arg value="${localWorkers}" />
<arg value="-strict" />
<arg line="${extraParams}" />
<arg value="${module}" />

<sysproperty key="vFailIfNotSerializable" value="true" />

<jvmarg value="-Xss8M" />
<jvmarg value="-XX:MaxPermSize=256M" />
<jvmarg value="-Djava.awt.headless=true" />
</java>

<!--<antcall target="remove-gwt-tmp" />-->

<echo>Compiled ${module}</echo>
</target>


<target name="jar" depends="default-widgetset">
<property name="result.jar" location="${result.dir}/lib/${module.name}-${vaadin.version}.jar" />
<property name="module.output.dir" location="${result.dir}/VAADIN/widgetsets" />

<jar file="${result.jar}" compress="true">
<fileset dir="${module.output.dir}">
</fileset>
<fileset refid="common.files.for.all.jars" />
</jar>
</target>

<target name="publish-local" depends="jar">
<antcall target="common.publish-local" />
</target>

<target name="clean">
<antcall target="common.clean" />
</target>

<target name="tests">
<!--<antcall target="common.tests.run" />-->
<echo>WHAT? No tests for ${module.name}!</echo>
</target>

</project>

+ 26
- 0
client-compiled/ivy.xml 查看文件

<?xml version="1.0" encoding="UTF-8"?>
<ivy-module version="2.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ant.apache.org/ivy/schemas/ivy.xsd">

<info organisation="com.vaadin" module="vaadin-client-compiled"
revision="${vaadin.version}" />

<configurations>
<conf name="build" />
</configurations>
<publications>
<artifact type="jar"></artifact>
</publications>
<dependencies defaultconfmapping="*->build">
<dependency org="com.vaadin" name="vaadin-server"
rev="${vaadin.version}" />
<dependency org="com.vaadin" name="vaadin-client"
rev="${vaadin.version}" />
<dependency org="com.vaadin" name="vaadin-client-compiler"
rev="${vaadin.version}" />
<dependency org="javax.validation" name="validation-api"
rev="1.0.0.GA" conf="build-> default,sources" />
</dependencies>

</ivy-module>

+ 12
- 4
client-compiler/build.xml 查看文件

<property name="module.name" value="vaadin-client-compiler" /> <property name="module.name" value="vaadin-client-compiler" />
<property name="result.dir" value="result" /> <property name="result.dir" value="result" />
<path id="classpath.compile.custom"> <path id="classpath.compile.custom">
<fileset file="${gwt.dev.jar}"/>
<fileset file="${gwt.dev.jar}" />
</path> </path>


<union id="compiler.includes">
<union refid="client-compiler.gwt.includes" />
<fileset dir="${result.dir}">
<include name="com/google/gwt/dev/About.properties" />
</fileset>
</union>

<target name="jar"> <target name="jar">
<echo file="${result.dir}/com/google/gwt/dev/About.properties">gwt.version=${vaadin.version}</echo>

<antcall target="common.jar"> <antcall target="common.jar">
<reference refid="client-compiler.gwt.includes" torefid="extra.jar.includes" />
<reference refid="compiler.includes" torefid="extra.jar.includes" />
</antcall> </antcall>

</target> </target>


<target name="publish-local" depends="jar"> <target name="publish-local" depends="jar">
<target name="clean"> <target name="clean">
<antcall target="common.clean" /> <antcall target="common.clean" />
</target> </target>
<target name="tests"> <target name="tests">
<!--<antcall target="common.tests.run" />--> <!--<antcall target="common.tests.run" />-->
<echo>WHAT? No tests for ${module.name}!</echo> <echo>WHAT? No tests for ${module.name}!</echo>

+ 0
- 0
client-compiler/ivy.xml 查看文件


+ 4
- 4
common.xml 查看文件

<fail unless="module.name" message="No module.name parameter given" /> <fail unless="module.name" message="No module.name parameter given" />
<fail unless="src" message="No src directory parameter given" /> <fail unless="src" message="No src directory parameter given" />


<property name="sources.jar" location="${result.dir}/${module.name}-${vaadin.version}-sources.jar" />
<property name="sources.jar" location="${result.dir}/lib/${module.name}-${vaadin.version}-sources.jar" />


<jar file="${sources.jar}" compress="true"> <jar file="${sources.jar}" compress="true">
<fileset dir="${src}"> <fileset dir="${src}">
<target name="javadoc.jar" depends="dependencies"> <target name="javadoc.jar" depends="dependencies">
<fail unless="result.dir" message="No result.dir parameter given" /> <fail unless="result.dir" message="No result.dir parameter given" />
<fail unless="module.name" message="No module.name parameter given" /> <fail unless="module.name" message="No module.name parameter given" />
<fail unless="src" message="No src directory parameter given" />
<property name="src" location="{$result.dir}/../src" />
<property name="javadoc.dir" value="${result.dir}/javadoc" /> <property name="javadoc.dir" value="${result.dir}/javadoc" />
<property name="javadoc.jar" location="${result.dir}/${module.name}-${vaadin.version}-javadoc.jar" />
<property name="javadoc.jar" location="${result.dir}/lib/${module.name}-${vaadin.version}-javadoc.jar" />


<javadoc destdir="${javadoc.dir}" author="true" version="true" use="true" windowtitle="${module.name}"> <javadoc destdir="${javadoc.dir}" author="true" version="true" use="true" windowtitle="${module.name}">
<packageset dir="${src}" excludes="${classes.exclude}" /> <packageset dir="${src}" excludes="${classes.exclude}" />
<fail unless="result.dir" message="No result.dir parameter given" /> <fail unless="result.dir" message="No result.dir parameter given" />


<ivy:resolve /> <ivy:resolve />
<ivy:publish resolver="build-temp" overwrite="true">
<ivy:publish resolver="build-temp" overwrite="true" forcedeliver="true">
<!-- <artifacts pattern="${result.dir}/[artifact]-[revision].[ext]" />--> <!-- <artifacts pattern="${result.dir}/[artifact]-[revision].[ext]" />-->
<artifacts pattern="${result.dir}/lib/[artifact]-[revision](-[classifier]).[ext]" /> <artifacts pattern="${result.dir}/lib/[artifact]-[revision](-[classifier]).[ext]" />



+ 1
- 1
server/ivy.xml 查看文件

<dependency org="commons-io" name="commons-io" rev="1.4" <dependency org="commons-io" name="commons-io" rev="1.4"
conf="tests->default" /> conf="tests->default" />
<dependency org="commons-lang" name="commons-lang" <dependency org="commons-lang" name="commons-lang"
rev="2.3" conf="tests->default" />
rev="2.3" conf="tests,ide->default" />


</dependencies> </dependencies>



Loading…
取消
儲存