package io.tesla.maven.plugins.test;

import io.takari.maven.testing.executor.MavenExecutionResult;
import io.takari.maven.testing.executor.MavenRuntime.MavenRuntimeBuilder;

import java.io.File;

import org.junit.Assert;
import org.junit.Test;

public class MultimoduleSkipInstallDeployTest extends AbstractIntegrationTest {

  public MultimoduleSkipInstallDeployTest(MavenRuntimeBuilder verifierBuilder) throws Exception {
    super(verifierBuilder);
  }

  @Test
  public void testBasic() throws Exception {
    File basedir = resources.getBasedir("multimodule-skip-install-deploy");

    File remoterepo = new File(basedir, "remoterepo");
    Assert.assertTrue(remoterepo.mkdirs());

    MavenExecutionResult result = verifier.forProject(basedir) //
        .withCliOption("-Drepopath=" + remoterepo.getCanonicalPath()) //
        .execute("deploy");

    result.assertErrorFreeLog();

    File group = new File(remoterepo, "io/takari/lifecycle/its/multimodule-skip-install-deploy");
    Assert.assertTrue(new File(group, "parent/1.0/parent-1.0.pom").canRead());
    Assert.assertTrue(new File(group, "modulea/1.0/modulea-1.0.pom").canRead());
    Assert.assertTrue(new File(group, "modulea/1.0/modulea-1.0.jar").canRead());

    Assert.assertFalse(new File(group, "moduleb/1.0/modulea-1.0.pom").canRead());
    Assert.assertFalse(new File(group, "moduleb/1.0/modulea-1.0.jar").canRead());
  }

}

@@ -31,16 +31,87 @@
 .test;%0A%0A
+import java.io.File;%0A%0Aimport org.junit.Assert;%0Aimport org.junit.Test;%0A%0A
 import i
@@ -243,79 +243,8 @@
 r;%0A%0A
-import java.io.File;%0A%0Aimport org.junit.Assert;%0Aimport org.junit.Test;%0A%0A
 publ
@@ -1273,33 +1273,33 @@
 duleb/1.0/module
-a
+b
 -1.0.pom%22).canRe
@@ -1355,33 +1355,33 @@
 duleb/1.0/module
-a
+b
 -1.0.jar%22).canRe

Fix MultimoduleSkipInstallDeployTest