Skip to content

Commit c078b33

Browse files
committed
Fix EclipseHelper regression
EclipseHelper needs to fix the problem that Eclipse fails to run annotation processors when compiling its classes. It not only needs to do that when running inside Eclipse, unfortunately: When Eclipse compiled the classes and Maven detects that it does not need to compile any .java files, no annotation processors are run, either. Therefore, the EclipseHelper needs to try harder even when we detect that it is running from inside the maven-surefire-plugin instead of Eclipse. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
1 parent c7cfc91 commit c078b33

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main/java/org/scijava/annotations/EclipseHelper.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,9 @@ public static void updateAnnotationIndex(final ClassLoader loader) {
133133
for (final URL url : ((URLClassLoader) loader).getURLs()) {
134134
debug("Checking URL: " + url);
135135
if (first) {
136-
if (!"file".equals(url.getProtocol()) || !url.getPath().endsWith("/")) {
136+
if (!"file".equals(url.getProtocol()) ||
137+
(!url.getPath().endsWith("/") && !url.getPath().contains("surefire")))
138+
{
137139
debug("Not Eclipse because first entry is: " + url);
138140
return;
139141
}

0 commit comments

Comments
 (0)