Hi Carlos, I deploy the war to jetty then in a separate directory on the server and use an ant task to replace my configs and web.xml file depending on the server.
However i do read the files from the war. E On Wed, May 18, 2011 at 8:35 AM, Carlos <[email protected]> wrote: > thanks for you advice, > i have another issue now!!!! > i have a property file which i want it to be outside the war so that > the i can't modify it without being obliged to recreate the war file > any suggestions please???? > > On 17 mai, 14:22, nacho <[email protected]> wrote: >> You can create an ant task to compile your gwt app and create a war. >> >> Try with something like this: >> >> <?xml version="1.0" encoding="utf-8" ?> >> <project name="MyProject" default="war" basedir="."> >> <!-- Configure path to GWT SDK --> >> <property name="gwt.sdk" location="/path/to/gwt-sdk" /> >> >> <!-- SWT on Mac requires the -XstartOFirstThreadFlag. --> >> <condition property=" >> XstartOnFirstThreadFlag" value="-XstartOnFirstThread" >> else="-Dgwt.dummy.arg1="> >> <os family="mac"/> >> </condition> >> >> <!-- SWT on Mac requires the -d32 flag if the VM is 64-bit. --> >> <condition property="d32Flag" value="-d32" else="-Dgwt.dummy.arg2="> >> <and> >> <os family="mac"/> >> <equals arg1="${sun.arch.data.model}" arg2="64"/> >> </and> >> </condition> >> >> <path id="project.class.path"> >> <pathelement location="war/WEB-INF/classes"/> >> <pathelement location="${gwt.sdk}/gwt-user.jar"/> >> <fileset dir="${gwt.sdk}" includes="gwt-dev*.jar"/> >> <!-- Add any additional non-server libs (such as JUnit) --> >> <fileset dir="war/WEB-INF/lib" includes="**/*.jar"/> >> </path> >> >> <target name="libs" description="Copy libs to WEB-INF/lib"> >> <mkdir dir="war/WEB-INF/lib" /> >> <copy todir="war/WEB-INF/lib" file="${gwt.sdk}/gwt-servlet.jar" /> >> <!-- Add any additional server libs that need to be copied --> >> </target> >> >> <target name="javac" depends="libs" description="Compile java source"> >> <mkdir dir="war/WEB-INF/classes"/> >> <javac srcdir="src" includes="**" encoding="utf-8" >> destdir="war/WEB-INF/classes" >> source="1.5" target="1.5" nowarn="true" >> debug="true" debuglevel="lines,vars,source"> >> <classpath refid="project.class.path"/> >> </javac> >> <copy todir="war/WEB-INF/classes"> >> <fileset dir="src" excludes="**/*.java"/> >> </copy> >> </target> >> >> <target name="gwtc" depends="javac" description="GWT compile to >> JavaScript"> >> <java failonerror="true" fork="true" >> classname="com.google.gwt.dev.Compiler"> >> <classpath> >> <pathelement location="src"/> >> <path refid="project.class.path"/> >> </classpath> >> <!-- add jvmarg -Xss16M or similar if you see a StackOverflowError --> >> <jvmarg value="-Xmx256M"/> >> <jvmarg value="${XstartOnFirstThreadFlag}"/> >> <jvmarg value="${d32Flag}"/> >> <!-- Additional arguments like -styzle PRETTY or -logLevel DEBUG --> >> <arg line="-style PRETTY"/> >> <arg value="com.mypackage.myproject.MyEntryPoint"/> >> </java> >> </target> >> >> <target name="hosted" depends="javac" description="Run hosted mode"> >> <java failonerror="true" fork="true" >> classname="com.google.gwt.dev.HostedMode"> >> <classpath> >> <pathelement location="src"/> >> <path refid="project.class.path"/> >> </classpath> >> <jvmarg value="-Xmx256M"/> >> <jvmarg value="${XstartOnFirstThreadFlag}"/> >> <jvmarg value="${d32Flag}"/> >> <arg value="-startupUrl"/> >> <arg value="MyEntryPoint.html"/> >> <!-- Additional arguments like -style PRETTY or -logLevel DEBUG --> >> <arg value="com.mypackage.myproject.MyEntryPoint"/> >> </java> >> </target> >> >> <target name="build" depends="gwtc" description="Build this project" /> >> >> <target name="war" depends="build" description="Create a war file"> >> <zip destfile="/path/to/place/the/war/Project.war" basedir="war"/> >> </target> >> >> <target name="clean" description="Cleans this project"> >> <delete dir="war/WEB-INF/classes" failonerror="false" /> >> <delete dir="war/mymodule" failonerror="false" /> >> </target> >> >> </project> > > -- > You received this message because you are subscribed to the Google Groups > "Google Web Toolkit" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/google-web-toolkit?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
