1
다음과 같은 문제가 있습니다 : 1. 12345678.xml-out과 12345678.xml을 파일로 만들어야하고 12345로 압축해야합니다. .지퍼.Groovy/Ant : Ant에서 Groovy 루프로 두 파일 압축하기
<target>
<groovy>
import java.util.regex.Pattern
import java.util.regex.Matcher
(...)
f.eachFileMatch { it.split("\\.")[1].length()==7 } {
(.. do something and then zip)
def ant = new AntBuilder()
ant.zip(
destfile: "C:/temp.zip",
fileset: HERE I NEED A PATTERN MATCH with the GROOVY it variable...
)
}
</groovy>
</target>
2) 일반 질문 : 문제는 내가 그 디렉토리에 같은 쌍 하나 이상이있을 수 있기 때문에 루프가있는 antBuilder 객체에서 그루비 변수를 사용하는 가능성이 있나요?
위와 같이 대신 지퍼를 사용하면 될까요? http://commons.apache.org/compress/examples.html –