Jump to content

User:Thinknote

From Wikipedia, the free encyclopedia

테스트 페이지


<?php
    $v = "string";    // sample initialization
?>
html text
<?
    echo $v;         // end of php code
?>


<?php
    $v = "string";    // sample initialization
?>
html text
<?
    echo $v;         // end of php code
?>


Ant Build 설정

[edit]

- 기본 경로 : ${PROWORKS_HOME}/config/svms/build/모듈명
- 기본적으로 프로젝트관리에서 모듈 생성을 하면 각 모듈명으로 build 파일이 생성되나
서버 구성이나 프로젝트 특성에 맞게 build 파일 수정을 해야한다.

  • EDU_SRC 모듈의 Ant build 파일
    • files.xml - 기본적으로 '파일'클릭시 사용
    • filesDefault.xml - JAVA 파일이 아닌 경우 사용(xml , property 파일 등..)
    • filesHandler.xml - Handler 파일인 경우 사용
    • foundFiles.xml - 파일검색을 통한 컴파일시 사용
    • plugin.xml - Eclipse를 통해 CVS commit 하는 경우 사용.
  • EDU_WWW 모듈의 Ant build 파일
    • filesDefault.xml - HTML 성 파일이 아닌 경우 사용(xml 파일 등..)
    • filesHTML.xml - HTML / JSP / XSL 등 파일인 경우 사용
    • foundFilesHTML.xml - 파일 검색을 통한 컴파일시 사용
    • plugin.xml - Eclipse를 통해 CVS commit 하는 경우 사용.
  • EDU_XDA 모듈의 Ant build 파일
    • xda.xml - XDA 컴파일시에만 사용
  • Multicopy / FTP 일 때 build 내용
    • Multicopy
<?xml version="1.0" encoding="EUC-KR"?>
<project name="class_compile" default="clean">
    <description>
        java class Build file
    </description>
    <property name="build" value="${src}/build"/>

    <target name="init">
        <taskdef name="inswavexmlproperty" classname="com.inswave.tool.ant.taskdefs.INSWAVEXmlProperty" classpath="${java.class.path}"/>
        <inswavexmlproperty file="${com.inswave.configuration.xml}"/>
        <!-- Create the time stamp -->
        <tstamp/>
        <delete dir="${build}" includeEmptyDirs="true"/>
        <!-- Make ${build} directory -->
        <mkdir dir="${build}"/>
        <!-- Copy source code from ${src} into ${build} -->
        <copy todir="${build}">
            <fileset dir="${src}" includes="${file}"/>
        </copy>
    </target>

    <target name="generate" depends="init">
        <taskdef name="inswavejavadoc" classname="com.inswave.tool.ant.taskdefs.INSWAVEJavadoc" classpath="${java.class.path}"/>
        <!-- Generate Handler/Msg -->
        <inswavejavadoc additionalparam="-J-Dsrc=${src} -J-DPROWORKS_HOME=${PROWORKS_HOME} -J-Dcom.inswave.configuration.xml=${com.inswave.configuration.xml} -J-Dcom.inswave.configuration.xml.ancestor=${com.inswave.configuration.xml.ancestor} -J-DEncoding=${file.encoding}">
            <fileset dir="${build}" defaultexcludes="yes">
                <include name="*.java"/>
                <exclude name="*/*.java"/>
            </fileset>
            <doclet name="com.inswave.tool.doclet.MsgDoclet" path="${java.class.path}"/>
            <classpath>
                <pathelement path="${classpath}"/>
            </classpath>
        </inswavejavadoc>
    </target>
    <target name="compile" depends="generate" description="compile the source">
        <!-- Compile the java code from ${build} into ${build} -->
        <javac deprecation="on" srcdir="${build}" destdir="${build}" debug="on" debuglevel="lines,vars,source" includeAntRuntime="no" encoding="${file.encoding}">
            <classpath>
                <pathelement path="${classpath}"/>
            </classpath>
        </javac>
    </target>

    <target name="commit" depends="compile" description="commit compiled sources">
        <!-- Commit changed sources to source repository -->
        <cvs dest="${src}" command="${cmdCVS}"/>
    </target>

    <target name="copy" depends="commit" description="copy to serverclasses directory">
        <taskdef name="multitargetcopy" classname="com.inswave.tool.ant.taskdefs.MultiTargetCopy" classpath="${java.class.path}"/>
        <!--  copy to serverclasses directory -->
        <multitargetcopy todirs="${proworks.SVMS.builder.destination.EDU_SRC.classes(value)}${path.separator}${referencePath}" overwrite="true">
            <fileset dir="${build}">
                <exclude name="**/*.java"/>
            </fileset>
        </multitargetcopy>
    </target>

    <target name="clean" depends="copy" description="clean up">
        <!-- Delete the ${build} directory trees -->
        <delete dir="${build}" includeEmptyDirs="true"/>
    </target>

</project>
    • FTP
<?xml version="1.0" encoding="EUC-KR"?>
<project name="class_compile" default="clean">
    <description>
        java class Build file
    </description>
    <property name="build" value="${target}"/>

    <target name="init">
        <taskdef name="inswavexmlproperty" classname="com.inswave.tool.ant.taskdefs.INSWAVEXmlProperty" classpath="${java.class.path}"/>
        <inswavexmlproperty file="${com.inswave.configuration.xml}"/>
        <!-- Create the time stamp -->
        <tstamp/>
        <delete dir="${build}" includeEmptyDirs="true"/>
        <!-- Make ${build} directory -->
        <mkdir dir="${build}"/>
        <!-- Copy source code from ${src} into ${build} -->
        <copy todir="${build}">
            <fileset dir="${src}" includes="${file}"/>
        </copy>
    </target>

    <target name="generate" depends="init">
        <taskdef name="inswavejavadoc" classname="com.inswave.tool.ant.taskdefs.INSWAVEJavadoc" classpath="${java.class.path}"/>
        <!-- Generate Handler/Msg -->
        <inswavejavadoc additionalparam="-J-Ddeploy=true -J-Dsrc=${src} -J-DPROWORKS_HOME=${PROWORKS_HOME} -J-Dcom.inswave.configuration.xml=${com.inswave.configuration.xml} -J-Dcom.inswave.configuration.xml.ancestor=${com.inswave.configuration.xml.ancestor} -J-DEncoding=${file.encoding}">
            <fileset dir="${build}" defaultexcludes="yes">
                <include name="**/*.java"/>
            </fileset>
            <doclet name="com.inswave.tool.doclet.MsgDoclet" path="${java.class.path}"/>
            <classpath>
                <pathelement path="${classpath}"/>
            </classpath>
        </inswavejavadoc>
    </target>

    <target name="compile" depends="generate" description="compile the source">
        <!-- Compile the java code from ${build} into ${build} -->
        <javac deprecation="on" srcdir="${build}" destdir="${build}" debug="on" debuglevel="lines,vars,source" includeAntRuntime="no" encoding="${file.encoding}">
            <classpath>
                <pathelement path="${classpath}"/>
            </classpath>
        </javac>
    </target>

    <target name="commit" depends="compile" description="commit compiled sources">
        <!-- Commit changed sources to source repository -->
        <cvs dest="${src}" command="${cmdCVS}"/>
    </target>

    <target name="copy" depends="commit" description="copy to serverclasses directory">
	<!-- Use FTP for copying source code from ${src} into EDU_SRC -->
	<ftp server="${proworks.SVMS.builder.destination.EDU_SRC(server)}"
		userid="${proworks.SVMS.builder.destination.EDU_SRC(userid)}"
		password="${proworks.SVMS.builder.destination.EDU_SRC(password)}"
		separator="${proworks.SVMS.builder.destination.EDU_SRC(separator)}"
		verbose="${proworks.SVMS.builder.destination.EDU_SRC(verbose)}"
		remotedir="${proworks.SVMS.builder.destination.EDU_SRC.classes(value)}"
		ignoreNoncriticalErrors="true"
	>
		<fileset dir="${build}">
			<exclude name="**/*.java"/>
		</fileset>
	</ftp>
        <taskdef name="multitargetcopy" classname="com.inswave.tool.ant.taskdefs.MultiTargetCopy" classpath="${java.class.path}"/>
        <!--  copy to serverclasses directory -->
        <multitargetcopy todirs="${referencePath}" overwrite="true">
            <fileset dir="${build}">
                <exclude name="**/*.java"/>
            </fileset>
        </multitargetcopy>
    </target>

    <target name="clean" depends="copy" description="clean up">
        <!-- Delete the ${build} directory trees -->
        <delete dir="${build}" includeEmptyDirs="true"/>
    </target>
</project>
    • JAR 생성 후 FTP 전달시 예제(대한주택보증 build 파일)
<?xml version="1.0" encoding="EUC-KR"?>
<project name="class_compile" default="clean">
	<description>
		java class Build file
	</description>
	<property name="build" value="${src}/build"/>

	<target name="init">
		<taskdef name="inswavexmlproperty" classname="com.inswave.tool.ant.taskdefs.INSWAVEXmlProperty" classpath="${java.class.path}"/>
		<inswavexmlproperty file="${com.inswave.configuration.xml}" />
		<!-- Create the time stamp -->
		<tstamp/>
		<delete dir="${build}" includeEmptyDirs="true"/>
		<!-- Make ${build} directory -->
		<mkdir dir="${build}"/>
		<!-- Copy source code from ${src} into ${build} -->
		<copy todir="${build}">
			<fileset dir="${src}" includes="${file}"/>
		</copy>
	</target>

	<target name="generate" depends="init">
		<taskdef name="inswavejavadoc" classname="com.inswave.tool.ant.taskdefs.INSWAVEJavadoc" classpath="${java.class.path}"/>
		<!-- Generate Handler/Msg -->
		<inswavejavadoc additionalparam="-J-Dsrc=${src} -J-DPROWORKS_HOME=${PROWORKS_HOME} -J-Dcom.inswave.configuration.xml=${com.inswave.configuration.xml} -J-Dcom.inswave.configuration.xml.ancestor=${com.inswave.configuration.xml.ancestor}">
			<fileset dir="${build}" defaultexcludes="yes">
				<include name="*.java" />
				<exclude name="*/*.java" />
			</fileset>
			<doclet name="com.inswave.tool.doclet.MsgDoclet" path="${java.class.path}"/>
			<classpath>
				<pathelement path="${classpath}"/>
			</classpath>
		</inswavejavadoc>
	</target>
	<target name="compile" depends="generate" description="compile the source " >
		<!-- Compile the java code from ${build} into ${build} -->
		<javac deprecation="on" srcdir="${build}" destdir="${build}" debug="on" debuglevel="lines,vars,source" includeAntRuntime="no">
			<classpath>
				<pathelement path="${classpath}"/>
			</classpath>
		</javac>
	</target>

	<target name="commit" depends="compile" description="commit compiled sources " >
		<!-- Commit changed sources to source repository -->
		<cvs command="${cmdCVS}" />
	</target>
	<target name="copy" depends="commit" description="copy to serverclasses directory" >
		
		<taskdef name="multitargetcopy" classname="com.inswave.tool.ant.taskdefs.MultiTargetCopy" classpath="${java.class.path}"/>
		<!--  copy to serverclasses directory -->
		<multitargetcopy todirs="${referencePath}" overwrite="true">
			<fileset dir="${build}">
				<exclude name="**/*.java"/>
			</fileset>
		</multitargetcopy>
		<multitargetcopy todirs="${PROWORKS_HOME}/simulator/classes" overwrite="true">
			<fileset dir="${build}">
				<exclude name="**/*.java"/>
			</fileset>
		</multitargetcopy>
		<multitargetcopy todirs="${referencePath}/../temp_src_source" overwrite="true">
			<fileset dir="${build}">
				<include name="**/*.java"/>
			</fileset>
		</multitargetcopy>
	</target>
	
	<target name="makeJAR" depends="copy" description="Make JAR file">
		<!--<inswavexmlproperty file="${referencePath}/com/inswave/system/framework/Version.xml"/>-->
		<jar destfile="${referencePath}/../KHGC_SRC.jar" update="false" basedir="${referencePath}"/>
		
	</target>
	
	
	<!--Jennifer lwst Patch를 위한 Copy-->
	<target name="copyJAR" depends="makeJAR" description="Copy JAR to Dev Server">
		
		<taskdef name="multitargetcopy" classname="com.inswave.tool.ant.taskdefs.MultiTargetCopy" classpath="${java.class.path}"/>
		<multitargetcopy todirs="${referencePath}\..\jennifer" overwrite="true">
			<fileset dir="${referencePath}/../">
				<include name="KHGC_SRC.jar"/>
			</fileset>
		</multitargetcopy>

	</target>
	
	<target name="makeJenniferJar" depends="copyJAR">
		<exec dir="./jennifer" executable="java">
			<arg line="-Dpackall=true -cp ./jennifer.lwst.setup.jar com.javaservice.lwst.setup.Batch lwstb.conf"/>
		</exec>
	</target>
	
	<target name="ftpToDevServer" depends="makeJenniferJar" description="AS400으로 카피한다">
	
		<ftp server="${proworks.SVMS.builder.destination.KHGC_SRC(server)}"
				userid="${proworks.SVMS.builder.destination.KHGC_SRC(userid)}"
				password="${proworks.SVMS.builder.destination.KHGC_SRC(password)}"
				verbose="${proworks.SVMS.builder.destination.KHGC_SRC(verbose)}"
				remotedir="${proworks.SVMS.builder.destination.KHGC_SRC.classes(value)}"
				ignoreNoncriticalErrors="true">
			<fileset dir="${referencePath}/../">
				<include name="KHGC_SRC.jar"/>
			</fileset>
		</ftp>
		<ftp server="${proworks.SVMS.builder.destination.KHGC_SRC(server)}"
				userid="${proworks.SVMS.builder.destination.KHGC_SRC(userid)}"
				password="${proworks.SVMS.builder.destination.KHGC_SRC(password)}"
				verbose="${proworks.SVMS.builder.destination.KHGC_SRC(verbose)}"
				remotedir="${proworks.SVMS.builder.destination.KHGC_SRC.tmsclasses(value)}"
				ignoreNoncriticalErrors="true">
			<fileset dir="${build}">
				<exclude name="**/*.java"/>
			</fileset>
		</ftp>
		<ftp server="${proworks.SVMS.builder.destination.KHGC_SRC_129(server)}"
				userid="${proworks.SVMS.builder.destination.KHGC_SRC_129(userid)}"
				password="${proworks.SVMS.builder.destination.KHGC_SRC_129(password)}"
				verbose="${proworks.SVMS.builder.destination.KHGC_SRC_129(verbose)}"
				remotedir="${proworks.SVMS.builder.destination.KHGC_SRC_129.classes(value)}"
				ignoreNoncriticalErrors="true">
			<fileset dir="${referencePath}/../">
				<include name="KHGC_SRC.jar"/>
			</fileset>
		</ftp>
		<ftp server="${proworks.SVMS.builder.destination.KHGC_SRC_129(server)}"
				userid="${proworks.SVMS.builder.destination.KHGC_SRC_129(userid)}"
				password="${proworks.SVMS.builder.destination.KHGC_SRC_129(password)}"
				verbose="${proworks.SVMS.builder.destination.KHGC_SRC_129(verbose)}"
				remotedir="${proworks.SVMS.builder.destination.KHGC_SRC_129.tmsclasses(value)}"
				ignoreNoncriticalErrors="true">
			<fileset dir="${build}">
				<exclude name="**/*.java"/>
			</fileset>
		</ftp>
		
		<multitargetcopy todirs="${referencePath}\..\..\KHGC_FRAMEWORK_SRC" overwrite="true">
			<fileset dir="${referencePath}/../">
				<include name="KHGC_SRC.jar"/>
			</fileset>
		</multitargetcopy>
		
	</target>

	<target name="clean" depends="ftpToDevServer" description="clean up" >
		<!-- Delete the ${build} directory trees -->
		<delete dir="${build}" includeEmptyDirs="true"/>
	</target>
</project>