java的build.bat文件和build.xml<2>

本文详细介绍了Top Eng-CSP系统构建工具的使用方法,包括初始化、获取源代码、编译、打包等关键步骤及各目标的依赖关系。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

<!-- ====================================================================== -->
<!-- to declare the project all targets -->
<!-- ====================================================================== -->
<target name="usage">
<echo>This is help infomation of the TopEng-CSP System build tool </echo>
<echo>usage: ant [target] </echo>
<echo>target description dependence </echo>
<echo>usage to display this help infomation N/A </echo>
<echo>clear to delete some directories and files before will build N/A </echo>
<echo>init to initialize,make some necessary directories N/A </echo>
<echo>ccget to get all source code from clearcase with specified path init </echo>
<echo>i18n to encode source code ccget </echo>
<echo>compile to compile source code ccget </echo>
<echo>resource to collect necessary resource files N/A </echo>
<echo>jar to run jar-command with source code compile/encoding </echo>
<echo>test to run test suits jar </echo>
<echo>javadoc to create javadoc ccget </echo>
<echo>jsp to pre-compile jsp files,and check error ccget </echo>
<echo>war to create war file jsp </echo>
<echo>dest to pack all project file jar/war/javadoc/test </echo>
<echo>ccupdate to check in the latest package files to clearcase server dest </echo>
<echo>deploy to deploy in the latest package files to to app server dest </echo>
</target>

<target name="init">
<delete dir="${dest.dir}" />
<mkdir dir="${dest.dir}" />
<mkdir dir="${dest.dir}/classes" />
<mkdir dir="${dest.dir}/WebRoot/WEB-INF/classes" />
<mkdir dir="${dest.dir}/WebRoot/WEB-INF/lib" />
</target>

<target name="ccget" description="get/update src from ClearCase ">
<ccupdate viewpath="${cc.viewpath}/java/bc1/${module.name}" graphical="false" overwrite="true" currenttime="true" rename="false" />
</target>

<target name="i18n">
<native2ascii encoding="UTF-8" src="${project.home}/WebRoot/WEB-INF/i18n" dest="${project.home}/WebRoot/WEB-INF/i18n" includes="**/chd_zh_CN.orgin" ext=".properties" />
</target>

<target name="compile" depends="init">
<javac destdir="${dest.dir}/classes" bootclasspathref="class.path" encoding="utf-8" debug="false" deprecation="false" nowarn="on" source="1.5" target="1.5"
fork="true" memoryInitialSize="256m" memoryMaximumSize="1024m">
<src path="${project.home}" />

<include name="c_pics_src/**/*.java" />

</javac>
</target>


<target name="jar" depends="compile">

<copy todir="${dest.dir}/classes">
<fileset dir="${project.home}/c_pics_src">
<include name="**/**/*.*" />
<exclude name="**/*.java"/>
<exclude name="**/test"/>
<exclude name="**/test/**/*.*"/>
</fileset>
</copy>

<jar destfile="${dest.dir}/csp-c-bsf-ha.jar">
<fileset dir="${dest.dir}/classes" includes="com/huawei/csp/customization/bsf/**/*.*" excludes="test/**/*.*" />
</jar>

<jar destfile="${dest.dir}/csp-c-pics-ha.jar">
<fileset dir="${dest.dir}/classes" includes="com/huawei/csp/customization/pics/**/*.*" excludes="test/**/*.*" />
</jar>
</target>
<%@ page contentType="text/html;charset=UTF-8" language="java" %> <!DOCTYPE html> <html> <head> <title> 淘!我喜欢</title> <link rel="stylesheet" href="css/style.css"> </head> <body> <!-- 顶部导航栏 --> <div class="top-nav"> <div class="container"> <a href="#">亲,请登录</a> <a href="#">免费注册</a> <a href="#">我的订单</a> <a href="#">购物车</a> </div> </div> <!-- 搜索区域 --> <div class="search-area"> <div class="container"> <img src="images/logo.png" alt="logo" class="logo"> <div class="search-box"> <input type="text" placeholder="请输入搜索关键词"> <button>搜索</button> </div> </div> </div> <!-- 商品分类导航 --> <div class="category-nav"> <div class="container"> <a href="#">女装</a> <a href="#">男装</a> <a href="#">数码</a> <a href="#">家电</a> <a href="#">美妆</a> <a href="#">食品</a> </div> </div> <!-- 轮播广告 --> <div class="banner"> <img src="images/banner1.jpg" alt="促销广告"> </div> <!-- 商品展示区 --> <div class="product-showcase"> <div class="container"> <h2>猜你喜欢</h2> <div class="products"> <%-- 动态商品数据示例 --%> <div class="product-item"> <img src="images/product1.jpg" alt="商品1"> <p class="title">夏季新款连衣裙</p> <p class="price">¥128.00</p> </div> <%-- 更多商品项... --%> </div> </div> </div> <!-- 页脚 --> <footer> <div class="container"> <p>© 2023 淘宝网</p> </div> </footer> <script src="js/main.js"></script> </body> </html> 将上代码改到jdk1.8版本下的
07-04
<?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.7.11</version> <relativePath/> </parent> <groupId>com.hw</groupId> <artifactId>asset</artifactId> <version>1.0.0</version> <name>asset</name> <description>asset</description> <packaging>war</packaging> <properties> <java.version>8</java.version> <mybatis-plus.version>3.5.3.1</mybatis-plus.version> </properties> <dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> <dependency> <groupId>org.projectlombok</groupId> <artifactId>lombok</artifactId> <optional>true</optional> </dependency> <!--数据源--> <dependency> <groupId>com.baomidou</groupId> <artifactId>dynamic-datasource-spring-boot-starter</artifactId> <version>3.6.1</version> </dependency> <dependency> <groupId>com.oracle.database.jdbc</groupId> <artifactId>ojdbc8</artifactId> <version>21.15.0.0</version> </dependency> <dependency> <groupId>org.postgresql</groupId> <artifactId>postgresql</artifactId> <version>42.6.0</version> </dependency> <dependency> <groupId>com.huawei.gauss</groupId> <artifactId>gaussdbv3</artifactId> <version>V300R001C00CP2075</version> <scope>system</scope> <systemPath>${project.basedir}/lib/gaussdbv3.jdbc-V300R001C00CP2075.jar</systemPath> </dependency> <dependency> <groupId>com.baomidou</groupId> <artifactId>mybatis-plus-boot-starter</artifactId> <version>${mybatis-plus.version}</version> </dependency> </dependencies> <profiles> <!-- 开发环境 --> <profile> <id>dev</id> <properties> <activatedProperties>dev</activatedProperties> </properties> <activation> <activeByDefault>true</activeByDefault> <!-- 默认激活 --> </activation> </profile> <!-- 测试环境 --> <profile> <id>test</id> <properties> <activatedProperties>test</activatedProperties> </properties> </profile> <!-- 生产环境 --> <profile> <id>prod</id> <properties> <activatedProperties>prod</activatedProperties> </properties> </profile> </profiles> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <configuration> </configuration> </plugin> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <configuration> <includeSystemScope>true</includeSystemScope> </configuration> </plugin> </plugins> </build> </project> 我的需求,我打包可以指定jar包也可以指定war包,但是正常打包class文件不能直接部署到tomcat上面,部署在tomcat有两个方式一个是class部署一个是war部署,我现在class文件缺少依赖,我想maven打包的时候war也可以用来部署class也可以直接用来部署
最新发布
07-17
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值