Switch to Ant lib for tar/zip tasks

The commons wrapper we were using didn't support executable files
so Ant seems like the best choice ultimately, even if it has a
lot of features we don't use or need.
This commit is contained in:
Dave Syer
2017-02-20 11:20:09 +00:00
committed by Stephane Nicoll
parent 09fc98ef96
commit 06f314dc8c
11 changed files with 131 additions and 58 deletions

0
initializr-generator/src/main/resources/project/gradle/gradlew.bat vendored Normal file → Executable file
View File

0
initializr-generator/src/main/resources/project/gradle3/gradlew.bat vendored Normal file → Executable file
View File

0
initializr-generator/src/main/resources/project/maven/mvnw vendored Normal file → Executable file
View File

0
initializr-generator/src/main/resources/project/maven/mvnw.cmd vendored Normal file → Executable file
View File

View File

@@ -217,6 +217,13 @@ public class ProjectAssert {
return this;
}
public ProjectAssert hasExecutableFile(String... localPaths) {
for (String localPath : localPaths) {
assertFile(localPath, true);
}
return this;
}
public ProjectAssert hasNoFile(String... localPaths) {
for (String localPath : localPaths) {
assertFile(localPath, false);
@@ -231,6 +238,13 @@ public class ProjectAssert {
return this;
}
public ProjectAssert assertExecutableFile(String localPath, boolean executable) {
File candidate = file(localPath);
assertEquals("Invalid (\"" + executable + "\") for " + localPath, executable,
candidate.exists() && candidate.canExecute());
return this;
}
private File file(String localPath) {
return new File(dir, localPath);
}