Created
September 20, 2018 11:58
-
-
Save kght6123/cf6b881011bd15b779df22c3c6aea13d to your computer and use it in GitHub Desktop.
java Inherit classpath. add vm option "-Dbuild.sysclasspath=last".
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
<macrodef name="single-task"> | |
<attribute name="application.name" default="AntTask" /> | |
<attribute name="vm.dir"/> | |
<attribute name="build.file"/> | |
<element name="build.tasks" /> | |
<sequential> | |
<echo message="start @{application.name}."/> | |
<!-- デバッグ情報の出力 --> | |
<property name="ant-class-path" refid="ant.class.path" /> | |
<echo message="classpath = ${ant-class-path}" /> | |
<echo message="tomcat.home = ${tomcat.home}" /> | |
<!-- javaタスクで、build.xmlを実行 --> | |
<java classname="org.apache.tools.ant.launch.Launcher" fork="true" dir="@{vm.dir}" failonerror="true"> | |
<sysproperty key="ant.home" value="${ant.home}"/> | |
<arg value="-buildfile" /> | |
<arg value="@{build.file}" /> | |
<build.tasks /> | |
<env key="TOMCAT_HOME" value="${tomcat.home}" /> | |
<!-- <java cloneVm="true" /> cloneVmは、"-buildfile"オプションが無効になる --> | |
<classpath refid="ant.class.path"/> | |
</java> | |
<echo message="complete @{application.name}."/> | |
</sequential> | |
</macrodef> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment