view spring-ltw-ant.xml @ 357:ab7103f0c154

try some more maven publishing items
author Marc Davis <marc.davis@mcoecn.org>
date Tue, 05 Sep 2023 15:40:13 -0400
parents a9d9befd8dd2
children
line wrap: on
line source
<?xml version="1.0" encoding="UTF-8"?>
<project name="spring-ltw-ant"  basedir="." 
    xmlns:ivy="antlib:fr.jayasoft.ivy.ant"
    xmlns:ssdt="http://www.ssdt-ohio.org/ant/common"
    xmlns:ssdtant="antlib:org.ssdt_ohio.tools.ant">


    <ssdtant:add-dependency target="-post-init" depends="-spring-ltw-init"/>

    <target name="-spring-ltw-init" depends="-spring-ltw-retrieve" unless="spring.ltw.disabled"> 
      
        <var name="runmain.jvmargs.spring" value="${runmain.jvmargs}"/>
        <var name="runmain.jvmargs" value="${spring.agent.arg} ${runmain.jvmargs.spring}"/>  
        <var name="runmain.jvmargs.spring" unset="true"/>
        
        <var name="run.jvmargs.spring" value="${run.jvmargs}"/>
        <var name="run.jvmargs" value="${spring.agent.arg} ${run.jvmargs.spring}"/>  
        <var name="run.jvmargs.spring" unset="true"/>
        <echo message="enabled spring java agent: ${spring.agent.arg}"/>
            
    </target>
    
    <target name="-spring-ltw-retrieve" unless="spring.ltw.disabled">
        <property name="spring.agent.org" value="org.springframework"/>
        <property name="spring.agent.module" value="org.springframework.instrument"/>
        <property name="spring.agent.revision" value="3.0.5.RELEASE"/>
        <ivy:resolve resolveId="springagentid"
                     organisation="${spring.agent.org}"
                     module="${spring.agent.module}"
                     revision="${spring.agent.revision}"
                     type="jar"
                     inline="true"
                     keep="true"
                     log="quiet"/>
        <ivy:retrieve
            resolveid="springagentid"
            pattern="${basedir}/${build.dir}/${lib.dir}/spring-agent.[ext]"
            type="jar"
            log="quiet"/>
            
        <property name="spring.agent.arg" value="-javaagent:${build.dir}/${lib.dir}/spring-agent.jar"/>
    </target>

    

</project>