Getting Ant to recognise a classpath

后端 未结 3 1017
-上瘾入骨i
-上瘾入骨i 2020-11-30 04:30

I have an Apache Ant build file with a command that requires four specific JARs to be on the build classpath. I\'ve tried to do this:

相关标签:
3条回答
  • 2020-11-30 04:59

    Here's an example from a project I am currently working on. I suspect you can modify it to work for your situation.

    <path id="master-classpath">
      <fileset dir="${web.dir}/WEB-INF/lib">
        <include name="*.jar"/>
      </fileset>
    
      <fileset dir="${appserver.lib}">
        <include name="servlet*.jar"/>
      </fileset>
    
      <pathelement path="${build.dir}"/>
    </path>
    
    ...
    
    <javac destdir="${build.dir}">
      <src path="${src.dir}"/>
      <classpath refid="master-classpath"/>
    </javac>
    
    0 讨论(0)
  • 2020-11-30 05:11

    Try

    <javac ... classpathref="TSA.classpath">
    

    or

    <javac ...>
        ...
        <classpath refid="TSA.classpath" />
    </javac>
    
    0 讨论(0)
  • 2020-11-30 05:12

    Try this:

     <classpath refid="TSA.classpath"/>
    
    0 讨论(0)
提交回复
热议问题