You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Joseph Walton (Jira)" <ji...@apache.org> on 2020/04/03 14:29:00 UTC

[jira] [Commented] (MNG-6875) mvn test keeps failing after changes removed

    [ https://issues.apache.org/jira/browse/MNG-6875?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17074625#comment-17074625 ] 

Joseph Walton commented on MNG-6875:
------------------------------------

The reported error is from [https://github.com/revelc/formatter-maven-plugin]. It [uses a cache|https://github.com/revelc/formatter-maven-plugin/blob/c24af2ed4ce71367fce92d2938cbf56ded1e9fe1/src/main/java/net/revelc/code/formatter/FormatterMojo.java#L82] stored in the filesystem; it may be worth reporting a bug against that mojo.

> mvn test keeps failing after changes removed
> --------------------------------------------
>
>                 Key: MNG-6875
>                 URL: https://issues.apache.org/jira/browse/MNG-6875
>             Project: Maven
>          Issue Type: Bug
>            Reporter: Grigoriy Mikhalkin
>            Priority: Major
>
> Maven version: 3.6.0
> Problem: 
> After i created new branch and did few changes to code, i ran `mvn test` and got formatting error:
>  
> {code:java}
> somefile has not been previously formatted. Please format file and commit before running validation!{code}
>  
>  
> I stashed changes, so `git status` didn't displayed any changes between master and branch, and ran `mvn test` again - still got same error.
>  
> Then i switched to master and ran `mvn test` - no errors. Switched to new branch again - still having errors. Just in case, i tried to close my IDE and log out/in - nothing helps.
>  
> From what i understand, even if there some changes in files, that git is not tracking, `mvn test` should return identical results in both cases(as code in master and branch are same). But in reality it's not the case. Probably, maven stores some metadata about git branches, that can cause such behavior?
>  
> Btw, not sure if this is really problem with maven. Maybe someone can point to right places to look at.
>   



--
This message was sent by Atlassian Jira
(v8.3.4#803005)