@@ -0,0 +1,1271 @@
+package org.onetwo.common.utils;%0A/**%0A * @author weishao zeng%0A * %3Cbr/%3E%0A */%0A%0Aimport java.io.File;%0Aimport java.util.Arrays;%0Aimport java.util.List;%0A%0Aimport org.junit.Test;%0A%0Apublic class ZipUtilsTest %7B%0A%0A%09@Test%0A%09public void testZipFile() %7B%0A%09%09String moduleList = %22bff-canteen,parent,app-client,base-common,cms-client,cms-service,comment-mall-client,comment-mall-service,%22%0A%09%09%09%09+ %22common-client,common-service,data-client,data-service,delivery-client,delivery-service,mall-client,mall-service,%22%0A%09%09%09%09+ %22order-client,order-service,pay-client,pay-service,tenant-client,tenant-service,uaa-client,uaa-service,%22%0A%09%09%09%09+ %22wechat-client,wechat-service,%22%0A%09%09%09%09+ %22bff-canteen-store,print-client,print-service,%22%0A%09%09%09%09+ %22bff-canteen-mgr,data-mgr,delivery-mgr,mall-canteen-mgr,mall-market-client,mall-market-mgr,mall-mgr,order-mgr,print-mgr,tcc-mgr,tenant-mgr%22;%0A%09%09String zipfile = %22canteen-src.zip%22;%0A%09%09String baseDir = %22D:%5C%5Cmydev%5C%5Cjava%5C%5Codysseus-branch%5C%5Codysseus%22;%0A%09%09List%3CString%3E subDirs = Arrays.asList(StringUtils.split(moduleList, %22,%22));%0A%09%09ZipUtils.zipfiles(zipfile, baseDir,%0A%09%09%09%09%09%09(file, subFileName) -%3E %7B%0A%09%09%09%09%09%09%09String%5B%5D paths = StringUtils.split(subFileName, File.separator);%0A%09%09%09%09%09%09%09return subDirs.contains(paths%5B0%5D) && (paths%5B1%5D.equals(%22src%22) %7C%7C paths%5B1%5D.equals(%22pom.xml%22));%0A%09%09%09%09%09%09%7D);%0A%09%7D%0A%7D%0A

add test