Share a batch of war package scripts

Source: Internet
Author: User
Tags echo date

Of course you have to compile the class file before you play the war package, and be careful to check that the configuration file is consistent with the production or test environment.

@echo ===========================================
@echo Description: Packaging script
@echo Author: Ban
@echo Date: 2011-07-22
@ echo ===========================================
shows @echo @rem line wrap
.

@rem temporary directory
@set web_temp=d:\web_temp\
@rem sourcedir: Engineering WEB directory, do not follow the slash
@set sourcedir=e:\workspace55\sc\ Web
@rem War Package storage directory
@set targetdir=%systemdrive%%homepath%\ desktop \
@rem War package filename
@set filename= Xsqd.war

@set jar_cmd= "%java_home%\bin\jar.exe"

@rem Echo Deletes an existing temporary directory
@rd/S/q%web_temp%
@echo Create temporary directory
@md%web_temp%
@echo copying Files
... @rem does not copy hidden files by default, to exclude. svn files
@xcopy%sourcedir%%web_temp%/e/r/I 
@echo Copy the file, packing ...
@rem The working directory to the temporary directory
@pushd%web_temp% 
@%jar_cmd% cvf "%targetdir%%filename%" *

@echo.
@echo package is complete.
@pause


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.