ant打包部署web工程
<?xml version="1.0"?>
<project name="userSystem project" default="all" basedir=".">
<!-- 定義目錄變數 -->
<property name="src.dir" value="${basedir}/src" />
<property name="classes.dir" value="WebRoot/WEB-INF/classes" />
<property name="lib.dir" value="WebRoot/WEB-INF/lib" />
<property name="WebRoot.dir" value="WebRoot" />
<!--用於輸出的臨時資料夾與打包的資料夾-->
<property name="temp.dir" value="D:\temp" />
<!--對於不同環境的war包,使用不同的配置檔案-->
<tstamp>
<format property="now.time" pattern="yyyy-MM-dd" locale="zh"/>
</tstamp>
<!-- 定義classpath -->
<path id="master-classpath">
<fileset file="${lib.dir}/*.jar" />
<pathelement path="${classes.dir}" />
</path>
<target name="clean">
<delete dir="${temp.dir}" />
<delete dir="${classes.dir}" />
<delete file="${temp.dir}/開發/ROOT.war"/>
</target>
<!-- 初始化任務 -->
<target name="init" depends="clean">
</target>
<!-- 編譯 -->
<target name="compile" depends="init" description="compile the source files">
<mkdir dir="${temp.dir}/${now.time}開發" />
<mkdir dir="${classes.dir}" />
<javac srcdir="${src.dir}" destdir="${classes.dir}" debug="true" encoding="GB2312">
<classpath refid="master-classpath" />
</javac>
<copy todir="${temp.dir}/${now.time}開發" overwrite="true">
<fileset dir="${WebRoot.dir}">
<include name="**/**" />
</fileset>
<fileset dir="${src.dir}" excludes="**/*.java">
</fileset>
</copy>
</target>
<!--打包-->
<target name="war" depends="compile">
<mkdir dir="${temp.dir}/${now.time}開發" />
<jar jarfile="${temp.dir}/${now.time}-ROOT.war">
<fileset dir="${temp.dir}/${now.time}開發">
<include name="**/*" />
</fileset>
</jar>
</target>
<target name="all" depends="war">
<delete dir="${classes.dir}" />
</target>
</project>
相關文章
- SpringBoot簡單打包部署(附工程)Spring Boot
- simple go web application & 二維碼生成 & 打包部署GoWebAPP
- ant打包出現null returned: 1報錯Null
- 記錄一次vue-cli工程打包部署過程Vue
- 【前端打包部署】談一談我在SPA專案打包=>部署的處理前端
- 【前端打包部署】談一談我在SPA專案打包=>部署的處理(上)前端
- flutter打包釋出web端FlutterWeb
- python web 部署PythonWeb
- 8、Ktor學習-部署之打包;
- Vue專案打包到django部署VueDjango
- NodeJS 後端工程 Docker 打包優化NodeJS後端Docker優化
- 如何打包部署一個tomcat專案Tomcat
- 8.Spring Boot 打包與熱部署Spring Boot熱部署
- WEB PC 管理端打包詳細教程Web
- IDEA建立Java WEB工程IdeaJavaWeb
- iOS自動化打包部署踩坑記iOS
- springboot3+vue3(九)打包部署(windows)Spring BootVueWindows
- SpringBoot專案如何打包部署到tomcat中去Spring BootTomcat
- jenkins將打包的jar包部署到nexusJenkinsJAR
- uniapp H5 打包並部署到 nginxAPPH5Nginx
- vue3.x從打包、部署到上線Vue
- linux web環境部署LinuxWeb
- Flutter Web 開發部署FlutterWeb
- ant
- IDEA 配合 Dockerfile 部署 SpringBoot 工程IdeaDockerSpring Boot
- 使用HBuilder將web專案打包成appUIWebAPP
- .NET進行客戶端Web開發又一利器 - Ant Design Blazor客戶端WebBlazor
- 基於node實現Vue打包部署指令碼Vue指令碼
- Spring Boot(十二):Spring Boot 如何測試打包部署Spring Boot
- Web總結:部署和安全Web
- Windows 部署 Stable Diffusion web UIWindowsWebUI
- Flask web專案 gunicorn部署FlaskWeb
- Tomcat部署web專案流程TomcatWeb
- python3.6 使用pyinstaller 打包web程式的方法PythonWeb
- 【HTML+CSS】web前端工程師HTMLCSSWeb前端工程師
- web前端工程師必備技能Web前端工程師
- 利用1panel部署前後端分離專案 Java程式碼打包 前端打包後端Java前端
- jenkins+git+maven+tomcat 實現自動打包部署JenkinsGitMavenTomcat
- 前端使用docker+jenkins實現自動打包部署前端DockerJenkins