if (pathInJar.startsWith("/")) {
pathInJar = pathInJar.substring(1);
}
if (pathInJar.length() > 0) {
final PatternSet patternSet = new PatternSet();
patternSet.createInclude().setName(pathInJar + "**");
expandTask.addPatternset(patternSet);
target = new File(outputDir, pathInJar.replace('/', File.separatorChar));
}
expandTask.setDest(outputDir);
expandTask.perform();