use of org.jetbrains.jps.model.artifact.JpsArtifact in project intellij-community by JetBrains.
the class ArtifactBuilderOverwriteTest method testFileOrder.
public void testFileOrder() {
final String firstFile = createFile("d1/xxx.txt", "first");
final String secondFile = createFile("d2/xxx.txt", "second");
final String fooFile = createFile("d3/xxx.txt", "foo");
final JpsArtifact a = addArtifact(root().dir("ddd").dirCopy(PathUtil.getParentPath(firstFile)).dirCopy(PathUtil.getParentPath(fooFile)).parentDirCopy(secondFile).end());
buildAll();
assertOutput(a, fs().dir("ddd").file("xxx.txt", "first"));
buildAllAndAssertUpToDate();
change(firstFile, "first2");
buildAll();
assertDeletedAndCopied("out/artifacts/a/ddd/xxx.txt", "d1/xxx.txt");
assertOutput(a, fs().dir("ddd").file("xxx.txt", "first2"));
buildAllAndAssertUpToDate();
change(secondFile);
buildAllAndAssertUpToDate();
change(fooFile);
buildAllAndAssertUpToDate();
delete(fooFile);
buildAllAndAssertUpToDate();
delete(secondFile);
buildAllAndAssertUpToDate();
}
use of org.jetbrains.jps.model.artifact.JpsArtifact in project intellij-community by JetBrains.
the class ArtifactBuilderTest method testFileCopy.
public void testFileCopy() {
final JpsArtifact a = addArtifact(root().fileCopy(createFile("file.txt", "foo")));
buildAll();
assertOutput(a, fs().file("file.txt", "foo"));
}
use of org.jetbrains.jps.model.artifact.JpsArtifact in project intellij-community by JetBrains.
the class ArtifactBuilderTest method testRepackNonExistentJarFile.
public void testRepackNonExistentJarFile() {
JpsArtifact a = addArtifact(archive("a.jar").extractedDir("this-file-does-not-exist.jar", "/").fileCopy(createFile("a.txt")));
buildAll();
assertOutput(a, fs().archive("a.jar").file("a.txt"));
}
use of org.jetbrains.jps.model.artifact.JpsArtifact in project intellij-community by JetBrains.
the class ArtifactBuilderTest method testArtifactContainingSelfIncludingArtifactWithoutOutput.
public void testArtifactContainingSelfIncludingArtifactWithoutOutput() {
final JpsArtifact a = addArtifact("a", root());
LayoutElementTestUtil.addArtifactToLayout(a, a);
final JpsArtifact b = addArtifact("b", root().artifact(a));
a.setOutputPath(null);
assertBuildFailed(b);
}
use of org.jetbrains.jps.model.artifact.JpsArtifact in project intellij-community by JetBrains.
the class ArtifactBuilderTest method testArchiveInArchive.
public void testArchiveInArchive() {
final JpsArtifact a = addArtifact(root().archive("a.jar").archive("b.jar").fileCopy(createFile("xxx.txt", "foo")));
buildAll();
assertOutput(a, fs().archive("a.jar").archive("b.jar").file("xxx.txt", "foo"));
}
Aggregations