The caches are not all cleaned when deleting the local repository, fixes #312

This commit is contained in:
Guillaume Nodet
2021-01-13 11:36:37 +01:00
parent 123ee63d0d
commit b10af9fe15
16 changed files with 1066 additions and 529 deletions

View File

@@ -30,6 +30,7 @@ import org.mvndaemon.mvnd.client.Client;
import org.mvndaemon.mvnd.client.DaemonParameters;
import org.mvndaemon.mvnd.common.Message;
import org.mvndaemon.mvnd.junit.MvndNativeTest;
import org.mvndaemon.mvnd.junit.TestUtils;
@MvndNativeTest(projectDir = "src/test/projects/single-module")
public class SingleModuleNativeIT {
@@ -81,6 +82,20 @@ public class SingleModuleNativeIT {
}
@Test
void buildDeleteRepoAndRebuild() throws IOException, InterruptedException {
final Path localMavenRepo = parameters.mavenRepoLocal();
TestUtils.deleteDir(localMavenRepo);
final TestClientOutput o1 = new TestClientOutput();
client.execute(o1, "clean", "install", "-e", "-B").assertSuccess();
TestUtils.deleteDir(localMavenRepo);
final TestClientOutput o2 = new TestClientOutput();
client.execute(o2, "clean", "install", "-e", "-B").assertSuccess();
}
protected void assertJVM(TestClientOutput o, Properties props) {
/* implemented in the subclass */
}