Changeset c1ac1f6b in vaadin


Ignore:
Timestamp:
Dec 2, 2011 1:05:24 PM (3 years ago)
Author:
Mikael Vappula <mikael@…>
Branches:
master, 7.0, 7.1, 7.2, 7.3, 8d8ba6f438f61d2e1d26fe9e23ddd58296e5f193
Children:
98ec1415
Parents:
c7af8ee7
Message:

Cleaned up Ivy configuration

Targets related to Ivy configuration are now in separate common.xml file
which is imported to main build files.

Files:
1 added
6 edited

Legend:

Unmodified
Added
Removed
  • build/build.xml

    r46309c47 rc1ac1f6b  
    77         basedir="../" default="package-all"> 
    88 
     9    <!-- Import common targets  --> 
     10    <import file="./common.xml" /> 
     11 
    912    <!--Call one of package-* targets unless you understand what you are doing. --> 
    1013    <target name="package-all" depends="clean-all, init, build, javadoc, internal-package-war, internal-package-liferay, differences" description="Build public packages."> 
     
    2023    </target> 
    2124         
    22     <property name="ivy.install.version" value="2.2.0"/> 
    23     <property name="ivy.jar.name" value="ivy-${ivy.install.version}.jar"/> 
    24     <property name="ivy.jar.dir" value="${user.home}/.ant/lib" /> 
    25     <property name="ivy.jar.file" value="${ivy.jar.dir}/${ivy.jar.name}" /> 
    26      
    27     <target name="check-ivy-installed"> 
    28             <available property="ivy.installed" file="${ivy.jar.file}"/> 
    29             <available property="ivy.installed" classname="org.apache.ivy.ant.IvyConfigure"  />  
    30             <antcall target="ivy-download" /> 
    31         </target> 
    32  
    33     <target name="ivy-download" unless="ivy.installed"> 
    34         <mkdir dir="${ivy.jar.dir}"/> 
    35         <get src="http://repo2.maven.org/maven2/org/apache/ivy/ivy/${ivy.install.version}/ivy-${ivy.install.version}.jar" dest="${ivy.jar.file}" usetimestamp="true"/> 
    36     </target> 
    37  
    38     <target name="ivy-configure" depends="check-ivy-installed" unless="ivy.resolved"> 
    39          <!-- Ivy task definitions --> 
    40         <taskdef resource="org/apache/ivy/ant/antlib.xml" uri="antlib:org.apache.ivy.ant" classpath="${ivy.jar.file}" /> 
    41             <!-- Ivy settings --> 
    42             <property name="ivy.settings.file" value="build/ivy/ivysettings.xml" /> 
    43         <ivy:configure /> 
    44         </target> 
    45          
    46     <target name="ivy-resolve" depends="ivy-configure" unless="ivy.resolved"> 
     25    <target name="init-deps" depends="common.init-deps" > 
    4726        <property name="ivy.resolved" value="1" /> 
    48         <ivy:resolve file="build/ivy/ivy.xml" resolveid="common"/> 
    49         <ivy:cachepath pathid="compile.classpath" conf="compile"/> 
    50         <ivy:cachepath pathid="client-side.compile.classpath" conf="client-side.compile"/> 
    51         <ivy:cachepath pathid="test.runtime.classpath" conf="test.runtime"/> 
    52         <ivy:cachepath pathid="taskdefs.classpath" conf="ant-tasks"/> 
    53     </target> 
    54          
    55         <target name="init-taskdefs" depends="ivy-resolve"> 
    56                 <echo>Loading Ant tasks</echo> 
    57                  
    58                 <taskdef resource="emma_ant.properties" classpathref="taskdefs.classpath" />     
    59                  
    60             <!-- ant contrib required for flow control (for loop, if, property override)   --> 
    61             <!-- Note that we have to use a namespace to avoid clash when running sub-ant. --> 
    62                 <taskdef uri="antlib:net.sf.antcontrib" resource="net/sf/antcontrib/antlib.xml" 
    63                         classpathref="taskdefs.classpath" /> 
    64                  
    65                 <!-- ant contrib for Maven integration -->         
    66             <taskdef resource="org/apache/maven/artifact/ant/antlib.xml" 
    67                      uri="antlib:org.apache.maven.artifact.ant" classpathref="taskdefs.classpath" />         
    68         </target> 
    69    
    70     
     27        <ivy:resolve file="build/ivy/ivy.xml" resolveid="common" conf="ss.compile, cs.compile, ss.test.runtime"/> 
     28        <ivy:cachepath pathid="compile.classpath" conf="ss.compile"/> 
     29        <ivy:cachepath pathid="client-side.compile.classpath" conf="cs.compile"/> 
     30        <ivy:cachepath pathid="test.runtime.classpath" conf="ss.test.runtime"/> 
     31    </target> 
     32 
    7133    <!-- Clean results - - - - - - - - - - - - - - - - - - - - - - - - - --> 
    7234    <target name="clean-result" depends=""> 
     
    10062    <!-- ================================================================== --> 
    10163 
    102      <target name="init" depends="init-taskdefs"> 
     64     <target name="init" depends="init-deps"> 
    10365        <!-- Current timestamp in different formats. --> 
    10466        <tstamp> 
     
    474436    <target name="compile-widgetset-generator" depends="init, preprocess-src, compile-java"/> 
    475437     
    476     <target name="compile-widgetset" description="Compiles the widgetset given as the first parameter" depends="ivy-resolve"> 
     438    <target name="compile-widgetset" depends="init-deps" description="Compiles the widgetset given as the first parameter"> 
    477439        <fail unless="widgetset" message="No widgetset parameter set"/> 
    478440        <echo>Compiling widgetset ${widgetset}. Output directory: ${widgetsets-output-dir}</echo> 
     
    934896     
    935897    <!-- Assumes java classes have been compiled but depends does not work out well as this is run from a <parallel> task--> 
    936     <target name="server-side-tests" depends="init-taskdefs" unless="tests.serverside.skip">             
     898    <target name="server-side-tests" depends="init-deps" unless="tests.serverside.skip">         
    937899                <emma enabled="${emma.enabled}" > 
    938900                        <instr instrpath="${result-path}/classes" 
     
    978940 
    979941    <!-- Assumes java classes have been compiled but depends does not work out well as this is run from a <parallel> task--> 
    980     <target name="testbench-tests" depends="init" unless="tests.testbench.skip"> 
     942    <target name="testbench-tests" unless="tests.testbench.skip"> 
    981943        <fail unless="product-file" message="The 'product-file' property must be defined."/> 
    982944        <fail unless="version" message="The 'version' property must be defined."/> 
     
    1031993 
    1032994    <!-- Assumes java classes have been compiled but depends does not work out well as this is run from a <parallel> task--> 
    1033     <target name="integration-tests" depends="init-taskdefs" unless="tests.integration.skip"> 
     995    <target name="integration-tests" depends="init-deps" unless="tests.integration.skip"> 
    1034996        <!-- Parameters for the test.xml script. --> 
    1035997        <fail unless="com.vaadin.testbench.tester.host" message="The 'com.vaadin.testbench.tester.host' property must be defined."/> 
  • build/ivy/ivy.xml

    rc7af8ee7 rc1ac1f6b  
    55    <info organisation="com.vaadin" module="vaadin"/> 
    66    <configurations > 
    7                 <conf name="compile" extends="client-side.compile" description="Server side compilation dependencies" visibility="private"/> 
    8                 <conf name="client-side.compile" description="Client side compilation dependencies" visibility="private"/> 
    9                 <conf name="test.runtime" description="Test runtime dependencies" visibility="private"/> 
    10                 <conf name="ant-tasks" description="Ant task definitions" visibility="private" /> 
    11                 <conf name="emma" description="Emma code coverage" visibility="private" /> 
     7                <conf name="ss.compile" extends="cs.compile" description="Server side compilation dependencies" visibility="private"/> 
     8                <conf name="cs.compile" description="Client side compilation dependencies" visibility="private"/> 
     9                <conf name="ss.test.runtime" description="Test runtime dependencies" visibility="private"/> 
     10                <conf name="taskdefs" description="Ant task definitions" visibility="private" /> 
    1211        </configurations> 
    1312    <publications />         
    14         <dependencies defaultconf="compile" defaultconfmapping="compile->master"> 
    15          
    16         <!-- Servlet 2.3 API--> 
    17         <!--   
    18         <dependency org="javax.servlet" name="servlet-api" rev="2.3" /> 
    19         -->              
     13        <dependencies defaultconf="ss.compile" defaultconfmapping="ss.compile->master"> 
     14 
    2015                <!-- Liferay Portal Service --> 
    2116                <dependency org="com.liferay.portal" name="portal-service" rev="6.0.2" /> 
     
    2621      
    2722        <!-- GWT user with dependencies (validation-api) --> 
    28         <dependency org="com.google.gwt" name="gwt-user" rev="2.4.0" conf="client-side.compile->master" /> 
    29         <dependency org="javax.validation" name="validation-api" rev="1.0.0.GA" conf="client-side.compile->master,sources" /> 
     23        <dependency org="com.google.gwt" name="gwt-user" rev="2.4.0" conf="cs.compile->master" /> 
     24        <dependency org="javax.validation" name="validation-api" rev="1.0.0.GA" conf="cs.compile->master,sources" /> 
    3025        <!-- GWT dev (incl. servlet-api 2.4 classes) -->          
    31         <dependency org="com.google.gwt" name="gwt-dev" rev="2.4.0" conf="client-side.compile->master" /> 
     26        <dependency org="com.google.gwt" name="gwt-dev" rev="2.4.0" conf="cs.compile->master" /> 
    3227          
    3328                <!-- Test frameworks & related --> 
    34                 <dependency org="junit" name="junit" rev="4.5" conf="test.runtime -> master"/> 
    35                 <dependency org="org.easymock" name="easymock" rev="3.0" conf="test.runtime -> master, runtime(*)"/>   
    36                 <dependency org="org.hsqldb" name="hsqldb" rev="2.2.6" conf="test.runtime -> master, runtime(*)"/>   
     29                <dependency org="junit" name="junit" rev="4.5" conf="ss.test.runtime -> master"/> 
     30                <dependency org="org.easymock" name="easymock" rev="3.0" conf="ss.test.runtime -> master, runtime(*)"/>   
     31                <dependency org="org.hsqldb" name="hsqldb" rev="2.2.6" conf="ss.test.runtime -> master, runtime(*)"/>   
    3732                                 
    3833                <!-- Ant tasks -->       
    39                 <dependency org="ant-contrib" name="ant-contrib" rev="1.0b3" conf="ant-tasks ->master"/> 
    40                 <dependency org="org.apache.maven" name="maven-ant-tasks" rev="2.0.10" conf="ant-tasks ->master"/> 
     34                <dependency org="ant-contrib" name="ant-contrib" rev="1.0b3" conf="taskdefs ->master"/> 
     35                <dependency org="org.apache.maven" name="maven-ant-tasks" rev="2.0.10" conf="taskdefs ->master"/> 
    4136                                 
    4237                <!-- Emma --> 
    43                 <dependency org="emma" name="emma_ant" rev="2.0.5312" conf="test.runtime,ant-tasks ->master"/> 
    44                 <dependency org="emma" name="emma" rev="2.0.5312-patched" conf="test.runtime,ant-tasks,emma ->*"/> 
     38                <dependency org="emma" name="emma_ant" rev="2.0.5312" conf="ss.test.runtime,taskdefs ->master"/> 
     39                <dependency org="emma" name="emma" rev="2.0.5312-patched" conf="ss.test.runtime,taskdefs ->*"/> 
    4540 
    4641        </dependencies> 
  • tests/integration_tests.xml

    re578248b rc1ac1f6b  
    22 
    33<project name="Vaadin Integration Tests" basedir="." default="integration-test-all"> 
     4 
     5    <!-- Import common targets  --> 
     6    <import file="../build/common.xml" /> 
    47 
    58        <!-- Target deploying demo.war --> 
     
    2831        <property name="user" value="${test.integration.user}" /> 
    2932        <property name="passphrase" value="" /> 
    30          
    31         <!-- add ant contrib --> 
    32         <taskdef resource="net/sf/antcontrib/antcontrib.properties"> 
    33                 <classpath> 
    34                         <pathelement location="../build/lib/ant-contrib-1.0b3.jar"/> 
    35                 </classpath> 
    36         </taskdef> 
    37          
     33 
    3834        <!-- Upload war to deploy to ssh host --> 
    3935        <target name="integration-test-upload-demo"> 
     
    262258                         
    263259        <!-- Upload demo, clean error screenshots and test deployment on all servers --> 
    264         <target name="integration-test-all"> 
     260        <target name="integration-test-all" depends="common.init-deps"> 
    265261                 
    266262                <parallel> 
  • tests/ivy.xml

    r46309c47 rc1ac1f6b  
    44     
    55    <info organisation="com.vaadin" module="tests"/> 
    6     <configurations defaultconfmapping="*->jetty"> 
     6    <configurations> 
    77                <conf name="jetty" visibility="private" /> 
     8                <conf name="emma" visibility="private" /> 
     9                <conf name="server" visibility="private" /> 
    810        </configurations> 
    911    <publications />         
    1012        <dependencies> 
    11                 <dependency org="org.mortbay.jetty" name="jetty" rev="6.1.7" conf="jetty->default(*)" />                 
     13                <dependency org="org.mortbay.jetty" name="jetty" rev="6.1.7" conf="server,jetty->default(*)" /> 
     14        <dependency org="emma" name="emma" rev="2.0.5312-patched" conf="server,emma -> default(*)"/>             
    1215        </dependencies> 
    1316</ivy-module> 
  • tests/test.xml

    r46309c47 rc1ac1f6b  
    33        xmlns:ivy="antlib:org.apache.ivy.ant" 
    44    name="Run Vaadin Testbench Tests" basedir="." default="run-and-clean-up"> 
     5         
     6        <!-- Import common targets  --> 
     7        <import file="../build/common.xml" /> 
     8        <!-- Import targets for server management  --> 
     9        <import file="vaadin-server.xml" as="server"/> 
     10         
    511        <!-- ================================================================== --> 
    612        <!-- Configuration                                                      --> 
     
    2935         
    3036        <!-- Temporary output directory, created and removed by this script --> 
    31         <!-- <property name="test-output-dir" value="../build/test-output" /> --> 
    32         <fail unless="test-output-dir" message="The 'test-output-dir' property must be defined." /> 
    33  
    34         <!-- Include targets for server management  --> 
    35         <include file="vaadin-server.xml" as="server"/> 
     37        <fail unless="test-output-dir" message="The 'test-output-dir' property must be defined." />      
    3638         
    3739        <property name="class-dir" value="${test-output-dir}/classes" /> 
    3840 
    39         <!-- classpath must include test bench jar and its dependencies --> 
    40         <!-- TODO emma--> 
    41         <path id="classpath"> 
    42                 <fileset dir="${com.vaadin.testbench.lib.dir}" includes="**/*.jar" /> 
    43                 <fileset dir="../build/lib" includes="emma*.jar" /> 
    44         </path> 
     41    <target name="initialize" depends="common.init-deps"> 
     42        <ivy:resolve conf="emma"/> 
     43        <ivy:cachepath pathid="emma.lib" conf="emma" /> 
     44        <!-- classpath must include test bench jar and its dependencies --> 
     45        <path id="classpath"> 
     46                <fileset dir="${com.vaadin.testbench.lib.dir}" includes="**/*.jar" /> 
     47                <path refid="emma.lib" /> 
     48        </path> 
     49    </target> 
    4550 
    4651        <!-- fileset containing all TestBench tests to run --> 
     
    98103                                <antcall target="execute-tests"> 
    99104                                        <param name="target" value="@{target}" /> 
     105                                        <reference refid="classpath" /> 
    100106                                </antcall> 
    101107                        </sequential> 
     
    160166 
    161167        <!-- The default target. --> 
    162         <target name="run-and-clean-up" depends="check-parameters,remove-error-screens,run-tests"> 
    163         </target> 
     168        <target name="run-and-clean-up" depends="check-parameters,remove-error-screens,run-tests" /> 
    164169 
    165170        <!-- Also starts the server. --> 
     
    167172        <parallel> 
    168173                <daemons> 
    169                         <antcall inheritall="true" inheritrefs="true" target="server.deploy-and-start" /> 
     174                        <ant antfile="vaadin-server.xml" inheritall="true" inheritrefs="true" target="deploy-and-start" /> 
    170175                </daemons> 
    171176                <sequential>                             
  • tests/vaadin-server.xml

    r46309c47 rc1ac1f6b  
    33    xmlns:ivy="antlib:org.apache.ivy.ant" 
    44    name="vaadin-server"  
    5         default="deploy-and-start"> 
     5        default="deploy-and-start" basedir="."> 
     6     
     7         <!-- Import common targets  --> 
     8        <import file="../build/common.xml" /> 
    69 
    710        <target name="check-params"> 
     
    1215                <property name="webroot" value="${testing.testarea}/${package.name}/WebContent" />               
    1316        </target> 
    14  
    15     <target name="ivy-resolve"> 
    16         <ivy:resolve file="ivy.xml" resolveid="tests"/> 
    17         <ivy:cachepath pathid="jetty.lib" conf="jetty" resolveid="tests" /> 
    18         <!-- Emma libs from "common" resolve --> 
    19         <ivy:cachepath pathid="emma.lib" conf="emma" resolveid="common"/> 
    20     </target> 
    2117         
    2218    <target name="prepare-testing-area" depends="check-params"> 
     
    3228    </target> 
    3329 
    34     <target name="deploy-and-start" depends="ivy-resolve, prepare-testing-area"> 
     30    <target name="deploy-and-start" depends="init-deps, prepare-testing-area"> 
    3531        <property name="webroot" value="${testing.testarea}/${package.name}/WebContent"></property> 
     32         
     33        <ivy:resolve file="ivy.xml"/> 
     34        <ivy:cachepath pathid="server" conf="server" /> 
    3635        <java classname="com.vaadin.launcher.DemoLauncher" fork="yes" dir="${testing.testarea}/${package.name}" resultproperty="server.start.result"> 
    3736            <arg value="--nogui=1" /> 
     
    3938                <path location="${webroot}/WEB-INF/classes" /> 
    4039                <fileset dir="${webroot}/WEB-INF/lib/" includes="*.jar" />                             
    41                 <path refid="jetty.lib" /> 
    42                 <path refid="emma.lib" /> 
     40                <path refid="server" /> 
    4341            </classpath> 
    4442            <jvmarg value="-Demma.coverage.out.file=${testing.testarea}/${package.name}/war.ec"/> 
     
    4947    <target name="wait-for-startup"> 
    5048        <echo>Waiting for Servlet Container to start up.</echo> 
    51         <waitfor maxwait="30" maxwaitunit="second" checkevery="1" checkeveryunit="second" timeoutproperty="server.start.failed"> 
     49        <waitfor maxwait="30" maxwaitunit="second" checkevery="3" checkeveryunit="second" timeoutproperty="server.start.failed"> 
    5250            <http url="http://localhost:8888"/> 
    5351        </waitfor> 
Note: See TracChangeset for help on using the changeset viewer.