void () { String file = createFile("src/A.java", "public class A {}"); String excludedFile = createFile("src/excluded.java", "public class excluded {}"); JpsModule m = addModule("m"); m.addSourceRoot(JpsPathUtil.pathToUrl(PathUtil.getParentPath(file)), JavaSourceRootType.SOURCE); JpsJavaExtensionService.getInstance().getCompilerConfiguration(myProject).getCompilerExcludes().addExcludedFile( "file://" + FileUtil.toSystemIndependentName(excludedFile) ); rebuildAllModules(); assertOutput(m, fs().file("A.class")); }