zoukankan      html  css  js  c++  java
  • hudson通过ant自动编译、启动、停止java的jar

    set ANT_PATH=E:\soft\apache_ant\bin
    e:
    cd E:\data\codex\server\trunk\server
    svn up

    @echo.
    @echo.
    @echo "====================================================> build codex-core.jar <===================================================="
    cd codex-core
    %ANT_PATH%\ant rebuild

    @echo.
    @echo.
    @echo.
    @echo.
    @echo "====================================================> build codex-db.jar <====================================================="
    set ANT_PATH=E:\soft\apache_ant\bin
    e:
    cd E:\data\codex\server\trunk\server

    cd codex-db
    %ANT_PATH%\ant rebuild

    @echo.
    @echo.
    @echo.
    @echo.
    @echo "====================================================> build codex-battle.jar <===================================================="
    set ANT_PATH=E:\soft\apache_ant\bin
    e:
    cd E:\data\codex\server\trunk\server

    cd codex-battle
    %ANT_PATH%\ant rebuild

    @echo.
    @echo.
    @echo.
    @echo.
    @echo "====================================================> build codex-game.jar <====================================================="
    set ANT_PATH=E:\soft\apache_ant\bin
    e:
    cd E:\data\codex\server\trunk\server

    cd codex-game
    %ANT_PATH%\ant rebuild

    @echo.
    @echo.
    @echo.
    @echo.
    @echo "====================================================> run codex-game.jar <====================================================="
    e:
    cd E:\data\codex\server\trunk\server

    cd codex-game\deploy

    start java -Xbootclasspath/a:../deploy -Dfile.encoding=UTF-8 -jar codex-game.jar

    @echo.
    @echo.
    @echo.
    @echo.
    @echo "====================================================> stop codex-game.jar <====================================================="
    e:
    cd E:\data\codex\server\trunk\server

    set port=7007
    for /f "tokens=1-5" %%i in ('netstat -ano^|findstr ":%port%"') do (
    taskkill /pid %%m
    )
    set port=7008
    for /f "tokens=1-5" %%i in ('netstat -ano^|findstr ":%port%"') do (
    taskkill /pid %%m
    )
    set port=7009
    for /f "tokens=1-5" %%i in ('netstat -ano^|findstr ":%port%"') do (
    taskkill /pid %%m
    )

  • 相关阅读:
    day5 -常用模块
    day4装饰器-迭代器&&生成器
    h5 canvas 图片上传操作
    Tomcat上传文件报错:returned a response status of 403 Forbidden
    $.each遍历json对象
    Java求字符串中出现次数最多的字符
    线程池原理
    谈谈你对Hibernate的理解
    为什么要用 ORM? 和 JDBC 有何不一样?
    多线程有几种实现方法?同步有几种实现方法?(被问到)
  • 原文地址:https://www.cnblogs.com/xingchong/p/8278696.html
Copyright © 2011-2022 走看看