Skip to content

Commit 2bf3489

Browse files
laeubiHannesWell
authored andcommitted
Only consider existing artifacts for the classpath
Currently only if the artifact file is null it is not considered but if the file does not exits JDT complains. It even seems there was once in a time such a check but it is disabled, this is an attempt to check if we can reenable it again.
1 parent 94fa546 commit 2bf3489

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

org.eclipse.m2e.jdt/src/org/eclipse/m2e/jdt/internal/DefaultClasspathManagerDelegate.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ void addClasspathEntries(IClasspathDescriptor classpath, IMavenProjectFacade fac
137137

138138
} else {
139139
File artifactFile = a.getFile();
140-
if(artifactFile != null /*&& artifactFile.canRead()*/) {
140+
if(artifactFile != null && artifactFile.exists()) {
141141
entry = classpath.addLibraryEntry(IPath.fromOSString(artifactFile.getAbsolutePath()));
142142
entry.setClasspathAttribute(IClasspathManager.TEST_ATTRIBUTE, addTestFlag ? "true" : null);
143143
}

0 commit comments

Comments
 (0)