use of org.jetbrains.jps.model.artifact.JpsArtifact in project intellij-community by JetBrains.
the class ArtifactBuilderTest method testDir.
public void testDir() {
final JpsArtifact a = addArtifact(root().fileCopy(createFile("abc.txt")).dir("dir").fileCopy(createFile("xxx.txt", "bar")));
buildAll();
assertOutput(a, fs().file("abc.txt").dir("dir").file("xxx.txt", "bar"));
}
use of org.jetbrains.jps.model.artifact.JpsArtifact in project intellij-community by JetBrains.
the class ArtifactBuilderTest method testCircularInclusion.
public void testCircularInclusion() {
final JpsArtifact a = addArtifact("a", root());
final JpsArtifact b = addArtifact("b", root());
LayoutElementTestUtil.addArtifactToLayout(a, b);
LayoutElementTestUtil.addArtifactToLayout(b, a);
assertBuildFailed(a);
assertBuildFailed(b);
}
use of org.jetbrains.jps.model.artifact.JpsArtifact in project intellij-community by JetBrains.
the class ArtifactBuilderTest method testCopyResourcesFromModuleOutput.
public void testCopyResourcesFromModuleOutput() {
String file = createFile("src/a.xml", "");
JpsJavaExtensionService.getInstance().getOrCreateCompilerConfiguration(myProject).addResourcePattern("*.xml");
JpsModule module = addModule("a", PathUtil.getParentPath(file));
JpsArtifact artifact = addArtifact(root().module(module));
buildArtifacts(artifact);
assertOutput(artifact, fs().file("a.xml"));
}
use of org.jetbrains.jps.model.artifact.JpsArtifact in project intellij-community by JetBrains.
the class ArtifactBuilderTest method testClearOutputOnRebuild.
public void testClearOutputOnRebuild() throws IOException {
String file = createFile("d/a.txt");
JpsArtifact a = addArtifact(root().parentDirCopy(file));
buildAll();
createFileInArtifactOutput(a, "b.txt");
buildAllAndAssertUpToDate();
assertOutput(a, fs().file("a.txt").file("b.txt"));
rebuildAllModulesAndArtifacts();
assertOutput(a, fs().file("a.txt").file("b.txt"));
}
use of org.jetbrains.jps.model.artifact.JpsArtifact in project intellij-community by JetBrains.
the class ArtifactBuilderTest method testIgnoredFile.
public void testIgnoredFile() {
final String file = createFile("a/.svn/a.txt");
createFile("a/svn/b.txt");
final JpsArtifact a = addArtifact(root().parentDirCopy(PathUtil.getParentPath(file)));
buildAll();
assertOutput(a, fs().dir("svn").file("b.txt"));
}
Aggregations