从AppEngine部署中删除不需要的上传 [英] Removing unwanted uploads from AppEngine deployment
问题描述
有没有办法从上传中排除这些文件? Eclipse中的一个设置是惊人的,但是当然,appengine-web.xml中的一个条目也可以这样做。
您可以使用Ant完成此操作,并通过让您的类受到刺激而提供的性能优势。
1)从eclipse运行gwt编译
2)运行类似下面的ant任务(使用Ant视图轻松完成eclipse):
< property name =staging.dirvalue =war/>
< property name =classes.dirvalue =$ {staging.dir} / WEB-INF / classes/>
< target name =jarClasses>
< delete file =$ {staging.dir} /WEB-INF/lib/classes.jar/>
< echo> $ {staging.dir} /WEB-INF/lib/classes.jar DELETED< / echo>
< jar destfile =$ {staging.dir} /WEB-INF/lib/classes.jarbasedir =$ {classes.dir}
excludes =$ {classes.dir} /projectpackage/client/*.*\"/>
< echo> $ {staging.dir} /WEB-INF/lib/classes.jar JARRED< / echo>
< delete dir =$ {classes.dir}/>
< echo> $ {classes.dir} DELETED< / echo>
< / target>
3)使用appcfg.sh(或Windows版本)进行上传
I am working on a GWT/AppEngine project and noticed that all my GWT java classes end up in compiled form in the WEB-INF/classes/projectpackage/client/ folder of the appcfg staging directory. Not only does this create a bunch of unwanted upload-data for every deploy, but I also really would rather not share these files with the world.
Is there a way to exclude these files from the upload? A setting in Eclipse would be amazing, but, of course, an entry in appengine-web.xml would do the trick just as well...
You can accomplish this using Ant with the added performance benefit given by having your classes jarred.
1) run a gwt compile from eclipse
2) run something like the ant task below (easily done with eclipse using the Ant view):
<property name="staging.dir" value="war" />
<property name="classes.dir" value="${staging.dir}/WEB-INF/classes" />
<target name="jarClasses">
<delete file="${staging.dir}/WEB-INF/lib/classes.jar" />
<echo> ${staging.dir}/WEB-INF/lib/classes.jar DELETED </echo>
<jar destfile="${staging.dir}/WEB-INF/lib/classes.jar" basedir="${classes.dir}"
excludes="${classes.dir}/projectpackage/client/*.*"/>
<echo> ${staging.dir}/WEB-INF/lib/classes.jar JARRED </echo>
<delete dir="${classes.dir}" />
<echo> ${classes.dir} DELETED </echo>
</target>
3) do the upload using appcfg.sh (or windows version)
这篇关于从AppEngine部署中删除不需要的上传的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!