mirror of
https://gitee.com/dcren/initializr.git
synced 2025-11-28 09:22:41 +08:00
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:
committed by
Stephane Nicoll
parent
09fc98ef96
commit
06f314dc8c
0
initializr-generator/src/main/resources/project/gradle/gradlew.bat
vendored
Normal file → Executable file
0
initializr-generator/src/main/resources/project/gradle/gradlew.bat
vendored
Normal file → Executable file
0
initializr-generator/src/main/resources/project/gradle3/gradlew.bat
vendored
Normal file → Executable file
0
initializr-generator/src/main/resources/project/gradle3/gradlew.bat
vendored
Normal file → Executable file
0
initializr-generator/src/main/resources/project/maven/mvnw
vendored
Normal file → Executable file
0
initializr-generator/src/main/resources/project/maven/mvnw
vendored
Normal file → Executable file
0
initializr-generator/src/main/resources/project/maven/mvnw.cmd
vendored
Normal file → Executable file
0
initializr-generator/src/main/resources/project/maven/mvnw.cmd
vendored
Normal file → Executable 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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user