elek opened a new pull request #1576:
URL: https://github.com/apache/ozone/pull/1576


   ## What changes were proposed in this pull request?
   
   `./hadoop-ozone/dev-support/checks/findbugs.sh` – which is a short-cut to 
execute the CI findbugs check locally – couldn't be executed locally after a 
full build:
   
   ```
   ./hadoop-ozone/dev-support/checks/findbugs.sh
   ....
   [INFO] 
------------------------------------------------------------------------
   [INFO] BUILD FAILURE
   [INFO] 
------------------------------------------------------------------------
   [INFO] Total time:  3.451 s
   [INFO] Finished at: 2020-11-11T11:42:40+01:00
   [INFO] 
------------------------------------------------------------------------
   [ERROR] Failed to execute goal 
com.github.spotbugs:spotbugs-maven-plugin:3.1.12:spotbugs (spotbugs) on project 
hadoop-hdds: Execution spotbugs of goal 
com.github.spotbugs:spotbugs-maven-plugin:3.1.12:spotbugs failed: Java 
returned: 1 -> [Help 1]
   [ERROR] 
   ```
   
   The problem:
   
   `target/classes` directory should be either empty/missing or it should 
contain java classes to make spotbugs work.
   
   On github it works well as an empty checkout is tested. But locally it's 
possible that a dummy classpath file is created under 
`hadoop-hdds/target/classes` which breaks spotbug local execution.
   
   The solution is easy: execute the classpath descriptor generation only if 
`src/main/java` dir exists.
   
   
   ## What is the link to the Apache JIRA
   
   https://issues.apache.org/jira/browse/HDDS-4452
   
   ## How was this patch tested?
   
   ```
   mvn clean install -DskipTests
   ./hadoop-ozone/dev-support/checks/findbugs.sh
   ```
   
   Without the patch it fails as there is a classpath file under 
`hadoop-hdds/target/classes`


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to