Warning in compiler if annotations path does not exist.
This commit is contained in:
@@ -119,7 +119,7 @@ public class JetCoreEnvironment {
|
|||||||
addToClasspath(path);
|
addToClasspath(path);
|
||||||
}
|
}
|
||||||
for (File path : configuration.getList(JVMConfigurationKeys.ANNOTATIONS_PATH_KEY)) {
|
for (File path : configuration.getList(JVMConfigurationKeys.ANNOTATIONS_PATH_KEY)) {
|
||||||
addExternalAnnotationsRoot(PathUtil.jarFileOrDirectoryToVirtualFile(path));
|
addExternalAnnotationsRoot(path);
|
||||||
}
|
}
|
||||||
for (String path : configuration.getList(CommonConfigurationKeys.SOURCE_ROOTS_KEY)) {
|
for (String path : configuration.getList(CommonConfigurationKeys.SOURCE_ROOTS_KEY)) {
|
||||||
addSources(path);
|
addSources(path);
|
||||||
@@ -145,8 +145,12 @@ public class JetCoreEnvironment {
|
|||||||
return projectEnvironment.getProject();
|
return projectEnvironment.getProject();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void addExternalAnnotationsRoot(VirtualFile root) {
|
private void addExternalAnnotationsRoot(File path) {
|
||||||
annotationsManager.addExternalAnnotationsRoot(root);
|
if (!path.exists()) {
|
||||||
|
report(WARNING, "Annotations path entry points to a non-existent location: " + path);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
annotationsManager.addExternalAnnotationsRoot(PathUtil.jarFileOrDirectoryToVirtualFile(path));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void addSources(File file) {
|
private void addSources(File file) {
|
||||||
|
|||||||
Reference in New Issue
Block a user