view langtools/make/intellij/build.xml @ 25697:b71804e27eb1

8049234: Add support for running/debugging bootstrap tools in IntelliJ Summary: Add support for bootstrap tools; overhaul ant logger Reviewed-by: vromero
author mcimadamore
date Tue, 22 Jul 2014 17:47:45 +0100
parents d49c47cad9f0
children d3f506b108e5
line wrap: on
line source
<!-- importing.xml -->
<project name="langtools" basedir="..">

    <script language="javascript" classpath=".idea/classes">
        var ideaListener = project.getBuildListeners().firstElement();            
        var LangtoolsLogger = Java.type("idea.LangtoolsIdeaAntLogger");
        project.removeBuildListener(ideaListener)
        project.addBuildListener(new LangtoolsLogger(ideaListener))
    </script>

    <import file="../make/build.xml"/>

    <macrodef name="exec-target">
        <attribute name="antfile" default="${ant.file}" />
        <attribute name="target" />
        <sequential>
            <java classname="org.apache.tools.ant.Main" fork="true" spawn="true">
                <arg value="-f"/>
                <arg value="@{antfile}"/>  
                <arg value="-Dboot.java.home=${boot.java.home}"/>
                <arg value="-Dtarget.java.home=${target.java.home}"/>
                <arg value="-Djtreg.home=${jtreg.home}"/>
                <arg value="-Djtreg.tests=${jtreg.tests}"/>
                <arg value="-Djtreg.jpda.jvmargs=${jtreg.jpda.jvmargs}"/>
                <arg value="@{target}"/>
                <classpath>           
                    <pathelement path="${java.class.path}"/>
                </classpath>
            </java>
        </sequential>
    </macrodef>

    <target name="post-make" depends="build-all-tools"/>

    <target name="jtreg-debug" depends="build-all-tools,-def-jtreg">
        <exec-target target="jtreg-debug-internal"/>
    </target>

    <target name="jtreg-debug-internal" depends="-def-jtreg">
        <jtreg-tool name="all" tests="${jtreg.tests}" jpda.jvmargs="${jtreg.jpda.jvmargs}"/>
    </target>
</project>