나중에 필요할지도 몰라 메모해 놓음
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<project name="MyProject" basedir="." xmlns:artifact="antlib:org.apache.maven.artifact.ant"> | |
<path id="maven-ant-tasks.classpath" path="D:\ant\lib\maven-ant-tasks-2.1.3.jar" /> | |
<typedef resource="org/apache/maven/artifact/ant/antlib.xml" uri="antlib:org.apache.maven.artifact.ant" classpathref="maven-ant-tasks.classpath" /> | |
<property name="ssh_user" value="user"/> | |
<property name="ssh_pw" value="1111"/> | |
<!-- ======================================================== --> | |
<!-- app 배포 --> | |
<!-- ======================================================== --> | |
<target name="DEV_PAYMENT_RELEASE" depends="dev_ssh_host, set_property_payment, release" /> | |
<target name="DEV_JSP_RELEASE" depends="dev_ssh_host, set_property_payment, jsp_release" /> | |
<target name="dev_ssh_host"><property name="ssh_host" value="172.18.0.33"/></target> | |
<target name="set_property_payment"><property name="app_name" value="Payment"/></target> | |
<!-- ======================================================== --> | |
<!-- release --> | |
<!-- ======================================================== --> | |
<taskdef name="ssh" classname="com.sshtools.ant.Ssh" /> | |
<target name="release"> | |
<ssh host="${ssh_host}" port="22" username="${ssh_user}" password="${ssh_pw}" version="2"> | |
<sftp action="put" remotedir="/home/nklee/${app_name}/webapps" verbose="true"> | |
<fileset file="target/ROOT.war" /> | |
</sftp> | |
<exec cmd="rm -rf /home/nklee/${app_name}/webapps/ROOT" /> | |
<exec cmd="mkdir /home/nklee/${app_name}/webapps/ROOT" /> | |
<exec cmd="cd /home/nklee/${app_name}/webapps" /> | |
<exec cmd="ps -ef | grep ${app_name}/ | grep -v grep | awk '{ print$2}' | xargs kill" /> | |
<exec cmd="unzip -o ROOT.war -d ./ROOT" /> | |
<exec cmd="cd /home/nklee/${app_name}/tomcat/bin" /> | |
<exec cmd="./startup.sh" /> | |
</ssh> | |
</target> | |
<target name="jsp_release"> | |
<ssh host="${ssh_host}" port="22" username="${ssh_user}" password="${ssh_pw}" version="2"> | |
<sftp action="put" remotedir="/home/nklee/${app_name}/tomcat/webapps/ROOT/WEB-INF/view" verbose="true"> | |
<fileset dir="WebContent/WEB-INF/view" /> | |
</sftp> | |
</ssh> | |
</target> | |
</project> |
'개발툴' 카테고리의 다른 글
윈도우에서 리눅스 명령어 사용 (Gow) (0) | 2016.05.24 |
---|---|
GitHub에서 fork된 repository 삭제하기 (3) | 2016.05.18 |
엘리먼트에 등록되어 있는 이벤트 감지 Visual Event Tool (0) | 2016.03.15 |
CDATA 섹션에서 부적합한 XML 문자(유니코드: 0xb)가 발견되었습니다 (0) | 2016.03.09 |
SQLyog 테이블 데이터 refresh 관련 (0) | 2015.11.17 |
배포툴 Rundeck (0) | 2015.09.02 |
MariaDB의 max connection 에 따른 애플리케이션 connection pool 설정 주의 사항 (0) | 2015.07.21 |
Fiddler HTTPS 데이터 확인 (0) | 2015.05.14 |