2
는 그래서 하나의 디렉토리에 파일이 들어있는 파일 세트가 있습니다은 파일 이름을 파일 세트 삭제하지만, 다른 디렉토리에
<fileset id="modules" dir="${modules.dir}">
<include name="core*.jar"/>
<include name="fileset*.jar"/>
<include name="upgrader*.jar"/>
<include name="hello*.jar"/>
</fileset>
그러나 이러한 파일은 $ {lib.dir}에 복사, 즉, $ {LIB를 .dir}에는 core * .jar, fileset * .jar 등의 사본이 들어 있습니다. 복사 된 파일을 어떻게 삭제합니까?
또한 ant-contrib와 같은 외부 라이브러리를 사용할 수 없습니다.
을 $ {lib 디렉토리에있는 파일 세트를 생성하는 것입니다 다음 단계를 가정. dir}이 module.patterns 패턴 세트와 일치하면 작동하지 않습니다. 이것은 $ {lib.dir}에 $ {modules.dir}에없는 다른 코어 * .jar 파일이 있고 (복사되지 않았기 때문에) 이것도 삭제하고 싶지 않기 때문입니다. – Amil
업데이트 해 주셔서 감사합니다. – Amil
이 답변도 도움이 될 수 있습니다. http://stackoverflow.com/questions/13290555/ant-how-to-delete-files-that-are-not-present-in-another-directory – satur9nine