summaryrefslogtreecommitdiffstats
path: root/java/vaadin/build.xml
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2017-03-14 21:55:12 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2017-03-14 21:55:12 +0100
commit0eca1f730f8c325415a4e63f2fb2a445f69620a7 (patch)
treeb111abde0d215e027b540332652df8682cf879cd /java/vaadin/build.xml
parent11b939cb0627944971613e9059e4ae3e0415fb09 (diff)
downloadshare-0eca1f730f8c325415a4e63f2fb2a445f69620a7.zip
share-0eca1f730f8c325415a4e63f2fb2a445f69620a7.tar.gz
java : vaadin : add target run using jetty
Diffstat (limited to 'java/vaadin/build.xml')
-rw-r--r--java/vaadin/build.xml32
1 files changed, 32 insertions, 0 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">