diff options
Diffstat (limited to 'java')
-rw-r--r-- | java/vaadin/build.xml | 32 | ||||
-rw-r--r-- | java/vaadin/ivy.xml | 2 | ||||
-rw-r--r-- | java/vaadin/ivysettings.xml | 4 | ||||
-rw-r--r-- | java/vaadin/src/run/java/ch/asynk/Main.java | 11 |
4 files changed, 47 insertions, 2 deletions
diff --git a/java/vaadin/build.xml b/java/vaadin/build.xml index f7024ce..f0f297e 100644 --- a/java/vaadin/build.xml +++ b/java/vaadin/build.xml @@ -8,6 +8,7 @@ <property file="${basedir}/src/main/resources/Application.properties"/> <property name="main.dir" value="${basedir}/src/main" /> + <property name="run.dir" value="${basedir}/src/run" /> <property name="build.dir" value="${basedir}/build"/> <property name="dist.dir" value="${basedir}/dist"/> @@ -18,6 +19,7 @@ <property name="lib.dir" value="${build.dir}/WEB-INF/lib"/> <property name="war.name" value="${app.name}-${app.version}.war"/> + <property name="run.name" value="ch.asynk.Main"/> <property name="compile.debug" value="true"/> <property name="compile.deprecation" value="false"/> @@ -33,6 +35,9 @@ </fileset> </path> <taskdef classpathref="cp.tomcat" resource="org/apache/catalina/ant/catalina.tasks" /> + <path id="cp.build"> + <dirset dir="${classes.dir}" /> + </path> </target> @@ -40,6 +45,7 @@ <ivy:resolve file="ivy.xml" log="download-only"/> <ivy:cachepath pathid="ivy.deps.server-side" conf="server-side" /> <ivy:cachepath pathid="ivy.deps.themes" conf="themes" /> + <ivy:cachepath pathid="ivy.deps.run" conf="run" /> <ivy:cachefileset setid="ivy.deps.server-side.fileset" conf="server-side"/> </target> @@ -55,6 +61,7 @@ <delete file="ivy-report.css" /> <delete> <fileset dir="${basedir}" includes="ch.asynk-${app.name}-*"/> + <fileset dir="${basedir}" includes="**/*.cache"/> </delete> </target> @@ -146,6 +153,31 @@ </war> </target> + <target name="run.compile" depends="configure,resolve"> + <mkdir dir="${classes.dir}/test" /> + <javac srcdir="${run.dir}" + destdir="${classes.dir}/test" + debug="${compile.debug}" + deprecation="${compile.deprecation}" + optimize="${compile.optimize}" + includeantruntime="false"> + <classpath refid="cp.build"/> + <classpath refid="ivy.deps.run"/> + <compilerarg value="-Xlint:all"/> + <compilerarg value="-Xlint:-path"/> + <compilerarg value="-Xlint:-processing"/> + <compilerarg value="-Xmaxerrs"/> + <compilerarg value="10"/> + </javac> + </target> + + <target name="run" depends="compile-server-side,run.compile"> + <java classname="${run.name}" fork="true"> + <classpath refid="cp.build"/> + <classpath refid="ivy.deps.run"/> + </java> + </target> + <!-- tomcat specific targets --> <target name="remove" depends="configure" description="remove application on servlet container"> diff --git a/java/vaadin/ivy.xml b/java/vaadin/ivy.xml index 57d71d3..ad13fce 100644 --- a/java/vaadin/ivy.xml +++ b/java/vaadin/ivy.xml @@ -11,6 +11,7 @@ <configurations> <conf name="server-side" description="only needed for server side classes compilation"/> <conf name="themes" extends="server-side" description="needed for theme compilation"/> + <conf name="run" extends="server-side" description="to run locally using jetty"/> </configurations> <dependencies defaultconf="server-side" defaultconfmapping="server-side->default"> @@ -20,5 +21,6 @@ <dependency org="ch.qos.logback" name="logback-classic" rev="1.2.1"/> <dependency org="org.codehaus.janino" name="janino" rev="3.0.6"/> <dependency org="com.yahoo.platform.yui" name="yuicompressor" rev="2.4.8" conf="themes->default"/> + <dependency org="org.vaadin.jetty" name="jetty-vaadin" rev="2.0" conf="run->default"/> </dependencies> </ivy-module> diff --git a/java/vaadin/ivysettings.xml b/java/vaadin/ivysettings.xml index e5fc415..86ff132 100644 --- a/java/vaadin/ivysettings.xml +++ b/java/vaadin/ivysettings.xml @@ -9,8 +9,8 @@ <chain name="default"> <ibiblio name="maven2" m2compatible="true"/> <ibiblio name="maven" m2compatible="true" usepoms="false"/> - <!-- <ibiblio name="vaadin-addons" usepoms="true" m2compatible="true" --> - <!-- root="http://maven.vaadin.com/vaadin-addons" /> --> + <ibiblio name="vaadin-addons" usepoms="true" m2compatible="true" + root="http://maven.vaadin.com/vaadin-addons" /> <!-- <ibiblio name="vaadin-prereleases" usepoms="true" m2compatible="true" --> <!-- root="http://maven.vaadin.com/vaadin-prereleases" /> --> <filesystem name="local"> diff --git a/java/vaadin/src/run/java/ch/asynk/Main.java b/java/vaadin/src/run/java/ch/asynk/Main.java new file mode 100644 index 0000000..5686ecc --- /dev/null +++ b/java/vaadin/src/run/java/ch/asynk/Main.java @@ -0,0 +1,11 @@ +package ch.asynk; + +import org.vaadin.jetty.VaadinJettyServer; + +public class Main +{ + public static void main(String[] args) throws Exception + { + new VaadinJettyServer(8080, HelloWorld.class, "./src/main/WebContent/").start(); + } +} |