void () { String file = createFile("res/A.java", "xxx"); String excludedFile = createFile("res/excluded.java", "XXX"); JpsModule m = addModule("m"); m.addSourceRoot(JpsPathUtil.pathToUrl(PathUtil.getParentPath(file)), JavaResourceRootType.RESOURCE); JpsJavaExtensionService.getInstance().getCompilerConfiguration(myProject).getCompilerExcludes().addExcludedFile( "file://" + FileUtil.toSystemIndependentName(excludedFile) ); rebuildAllModules(); assertOutput(m, fs().file("A.java", "xxx")); }