Is it possible to have Ant print out the classpath for a particular target? If so, how?

后端 未结 2 1652
攒了一身酷
攒了一身酷 2020-12-13 01:48

I\'m trying to get a target to build that has quite a long list of and

相关标签:
2条回答
  • 2020-12-13 02:03

    This is even easier with versions of Ant > 1.6

    <echo>${toString:classpath}</echo>
    

    See http://ant.apache.org/manual/using.html#pathshortcut for more information

    0 讨论(0)
  • 2020-12-13 02:19

    Use the pathconvert task to convert a path to a property

    <path id="classpath">
    ....
    </path>
    
    <pathconvert property="classpathProp" refid="classpath"/>
    
    <echo>Classpath is ${classpathProp}</echo>
    

    Docs for pathconvert.

    0 讨论(0)
提交回复
热议问题