Gabor Somogyi created FLINK-37181:
-------------------------------------

             Summary: Failed to validate Maven wrapper SHA-256 on MacOS with 
mvnw
                 Key: FLINK-37181
                 URL: https://issues.apache.org/jira/browse/FLINK-37181
             Project: Flink
          Issue Type: Bug
          Components: Build System
    Affects Versions: 2.0-preview
            Reporter: Gabor Somogyi


The maven command is failing in the following way due to a wrongly working 
MacOS tool called sha256sum:
{code:java}
Running `/Users/gaborsomogyi/flink/mvnw`...
Error: Failed to validate Maven wrapper SHA-256, your Maven wrapper might be 
compromised.
Investigate or delete /Users/gaborsomogyi/flink/.mvn/wrapper/maven-wrapper.jar 
to attempt a clean download.
If you updated your Maven version, you need to update the specified 
wrapperSha256Sum property.
{code}

The issue is that sha256sum is not working as described in the manual:
{code:java}
In all cases, each file listed on the command line is processed separately.  If 
no files are listed on the command line, or a file name is given as -, input is 
taken from stdin instead.
{code}

Manual test:
{code:java}
$ echo '3d8f20ce6103913be8b52aef6d994e0c54705fb527324ceb9b835b338739c7a8  
/Users/gaborsomogyi/flink/.mvn/wrapper/maven-wrapper.jar' | sha256sum -c    
usage: sha256sum [-bctwz] [files ...]
$ echo '3d8f20ce6103913be8b52aef6d994e0c54705fb527324ceb9b835b338739c7a8  
/Users/gaborsomogyi/flink/.mvn/wrapper/maven-wrapper.jar' | sha256sum -c -  
/Users/gaborsomogyi/flink/.mvn/wrapper/maven-wrapper.jar: OK
{code}

In short sha256sum works only when file name is given as -.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to