use of org.jetbrains.jps.model.artifact.JpsArtifact in project intellij-community by JetBrains.
the class ArtifactBuilderTest method testCopyExcludedFolder.
public void testCopyExcludedFolder() {
//explicitly added excluded files should be copied (e.g. compile output)
final String file = createFile("xxx/excluded/a.txt");
createFile("xxx/excluded/CVS");
final String excluded = PathUtil.getParentPath(file);
final String dir = PathUtil.getParentPath(excluded);
final JpsModule module = addModule("myModule");
module.getContentRootsList().addUrl(JpsPathUtil.pathToUrl(dir));
module.getExcludeRootsList().addUrl(JpsPathUtil.pathToUrl(excluded));
final JpsArtifact a = addArtifact(root().dirCopy(excluded));
buildAll();
assertOutput(a, fs().file("a.txt"));
}
use of org.jetbrains.jps.model.artifact.JpsArtifact in project intellij-community by JetBrains.
the class ArtifactBuilderTest method testCopyLibrary.
public void testCopyLibrary() {
final JpsLibrary library = addProjectLibrary("lib", getJUnitJarPath());
final JpsArtifact a = addArtifact(root().lib(library));
buildAll();
assertOutput(a, fs().file("junit.jar"));
}
use of org.jetbrains.jps.model.artifact.JpsArtifact in project intellij-community by JetBrains.
the class ArtifactBuilderTest method testPackExtractedDirectory.
public void testPackExtractedDirectory() {
final JpsArtifact a = addArtifact("a", root().archive("a.jar").extractedDir(getJUnitJarPath(), "/junit/textui/"));
buildAll();
assertOutput(a, fs().archive("a.jar").file("ResultPrinter.class").file("TestRunner.class"));
}
use of org.jetbrains.jps.model.artifact.JpsArtifact in project intellij-community by JetBrains.
the class ArtifactBuilderTest method testDoNotCreateEmptyArchiveInsideArchive.
public void testDoNotCreateEmptyArchiveInsideArchive() {
String file = createFile("dir/a.txt");
JpsArtifact a = addArtifact(archive("a.jar").archive("inner.jar").parentDirCopy(file));
delete(file);
buildAll();
assertEmptyOutput(a);
}
use of org.jetbrains.jps.model.artifact.JpsArtifact in project intellij-community by JetBrains.
the class ArtifactBuilderTest method testArchive.
public void testArchive() {
final JpsArtifact a = addArtifact(root().archive("xxx.zip").fileCopy(createFile("X.class", "data")).dir("dir").fileCopy(createFile("Y.class")));
buildAll();
assertOutput(a, fs().archive("xxx.zip").file("X.class", "data").dir("dir").file("Y.class"));
}
Aggregations