eclipse export war file silently
I have a project in eclipse which is created using below options.
File --> New --> Dynamic web application project..
I have linked the src folder to local GitHub synced folder.
Whenever there is a change in GitHub source files, I need to clean the project (only clean , not clean and build)
Once the clean is completed, I will export the complete project as war file (right click on project folder in eclipse and export --> war )
Is there any command line options in eclipse or any other alternative to automate this.
1 Comment
[ + ] Show comment
-
Can anyone give suggestions on how to include external jar files and export to war file the gwt project - ur00361883 8 years ago
Answers (1)
Please log in to answer
Posted by:
ur00361883
8 years ago
I am able to do this one with Ant and below is the XML file I am using for that.
<?xml version="1.0"?><project name="MartServer" basedir="." default="build"> <property name="src.dir" value="src"/> <property name="web.dir" value="WebContent"/> <property name="build.dir" value="WebContent/WEB-INF/classes"/> <property name="name" value="MartServer"/> <path id="master-classpath"> <fileset dir="${web.dir}/WEB-INF/lib"> <include name="*.jar"/> </fileset> <pathelement path="${build.dir}"/> </path> <target name="clean" description="Clean output directories"> <mkdir dir="${build.dir}"/> <javac destdir="${build.dir}" source="1.8" target="1.8"> <src path="${src.dir}"/> <classpath refid="master-classpath"/> </javac> <war destfile="MartServer.war" webxml="${web.dir}/WEB-INF/web.xml"> <fileset dir="${web.dir}"> <include name="**/*.*"/> </fileset> </war> </target> </project>