Newer
Older
adjustgpx-core / importPicture / build.xml
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE configuration>
<project name="AdjustTime" default="all" basedir=".">

	<target name="all" depends="release">
		
	</target>

	<!--
	ソース以外にビルドに必要なライブラリ
	-->
	<tstamp>
		<format property="verdate" pattern="yyyyMMdd"/>
	</tstamp>
    <property name="src" value="${basedir}/src" />
    <property name="classes" value="${basedir}/classes" />
	<property name="deploy" value="${basedir}/deploy" />
	<property name="appname" value="AdjustTime2"></property>
	<property name="version" value="${verdate}"></property>
	
    <property name="commons-imaging" value="${basedir}/lib/commons-imaging-1.0-20150518.202342-66.jar" />


	<!--
	Java Doc
	-->
	<target name="javadoc">
	  <javadoc sourcepath="src"
	    encoding="UTF-8"
	    packagenames="*"
	    Windowtitle="${appname}"
	    doctitle="${appname}"
	    docencoding="UTF-8"
	    bottom=""
	    Author="true"
	    destdir="api">
	    	<classpath>
				<pathelement path="${src}"/>
			</classpath>
	  	</javadoc>
	</target>

	<!--
	[STEP 1] クリーンナップ
	 -->
	<target name="clean" description="前回作成したclassファイルを削除する">
		<delete dir="${classes}"></delete>
		<delete dir="${deploy}" />
		<delete>
			<fileset dir="${src}" includes="**/*.class" />
		</delete>
		<mkdir dir="${classes}"/>
		<mkdir dir="${deploy}"/>
	</target>

	<!--
	[STEP 2] コンパイル
	 -->
	<target name="compile_src" depends="clean" description="コンパイル src">
	    <javac 	debug="on" srcdir="${src}" destdir="${classes}" encoding="UTF-8" includeantruntime="false" target="1.8" source="1.8">
			<include name="**" />
	    	<exclude name="**/*.smap" />
	    	<classpath>
				<pathelement path="${src}"/>
	    		<pathelement path="${commons-imaging}"/>
			</classpath>
		</javac>
	</target>

	<!--
	[STEP 3] リンク
	 -->
    <target name="create_run_jar" depends="compile_src" description="'${appname}.jar'を作成する">
		<tstamp>
			<format property="ts" pattern="yyyy-MM-dd-HH:mm:ss-z"/>
		</tstamp>
		<jar destfile="${deploy}/${appname}.jar" >
			<manifest>
			  <attribute name="Main-Class" value="osm.jp.gpx.matchtime.gui.AdjustTime" />
			  <attribute name="Class-Path" value="${jar.runtime.classpath}" />
			  <attribute name="Implementation-Title"   value="${appname}" />
			  <attribute name="Implementation-Version" value="${ts}" />
			  <attribute name="Implementation-Vendor"  value="${hayashi}" />
			  <attribute name="Build-Id" value="${ts} (${user.name} [${os.name} ${os.version} ${os.arch}])" />
			</manifest>
			<zipfileset dir="${classes}"/>
			<zipfileset dir="${src}"/>
        </jar>
    </target>


	<!--
	[STEP 4] Deployment
	 -->
    <target name="deploy" depends="create_run_jar" description="各ファイルを'./${deploy}/'に配置する">
    	<copy preservelastmodified="true" todir="${deploy}">
    		<fileset dir="." includes="${appname}.jar"/>
    		<fileset dir="${src}" includes="README.jp.txt"/>
    		<fileset dir="${src}" includes="LICENSE.txt"/>
    		<fileset dir="${src}" includes="${appname}.bat"/>
    		<fileset dir="${src}" includes="${appname}.sh"/>
		</copy>
    	<copy preservelastmodified="true" file="${commons-imaging}" tofile="${deploy}/commons-imaging-1.0-SNAPSHOT.jar"/>
    </target>

	<!--
	[STEP 5] release
	 -->
    <target name="release" depends="deploy" description="'./${appname}.zip'を作成する">
    	<zip destfile="${appname}_${verdate}.zip">
    		<fileset dir="${deploy}" includes="**.*"/>
		</zip>
    </target>
</project>