How can I exclude sources in a javac task in ant?

后端 未结 6 1077
予麋鹿
予麋鹿 2021-01-01 18:26

I have the following in my build.xml:


   
            


        
6条回答
  •  暗喜
    暗喜 (楼主)
    2021-01-01 18:56

    If you are trying to exclude Java classes but Ant is still trying to compile them then this may be due to references to these classes in your code.

    If A.java has a reference to B.java and you try to exclude B.java then compiling A.java will require that B.java is compiled too.

    This is one reason for interfaces in Java, so you can compile the interface without needing to compile the implementations.

提交回复
热议问题