Skip to content

Compilation error in forked mode has column shifted by -1 #1043

@unv-unv

Description

@unv-unv

Affected version

3.15.0

Bug description

Java file with compilation error on line 5:

package com.test;

public class Test {
String foo() {
 null;
}
}

Javac output:

C:\Projects\maven-test\src\main\java\com\test>javac Test.java
Test.java:5: error: not a statement
 null;
 ^
1 error

maven-compiler-plugin output without fork (correct):

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.15.0:compile (default-compile) on project test: Compilation failure
[ERROR] /C:/Projects/Consulo/.archive/maven-test/src/main/java/com/test/Test.java:[5,2] not a statement

maven-compiler-plugin output with fork (column shifted by -1):

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.15.0:compile (default-compile) on project test: Compilation failure
[ERROR] C:\Projects\Consulo\.archive\maven-test\src\main\java\com\test\Test.java:[5,1] not a statement

Archive with example project:
maven-test.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions