guluo created AMBARI-26275:
------------------------------

             Summary: NoClassesFoundToAnalyzeException when compiling ambari 
with jdk17
                 Key: AMBARI-26275
                 URL: https://issues.apache.org/jira/browse/AMBARI-26275
             Project: Ambari
          Issue Type: Bug
          Components: ambari-sever
            Reporter: guluo


We can compile ambari with jdk17 after AMBARI-26142
However we would get the following error when compiling ambari with jdk17. 

Exception in thread "main" 
edu.umd.cs.findbugs.NoClassesFoundToAnalyzeException: No classes found to 
analyze
...

[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal 
org.codehaus.mojo:findbugs-maven-plugin:3.0.5:findbugs (findbugs) on project 
ambari-server: Execution findbugs of goal 
org.codehaus.mojo:findbugs-maven-plugin:3.0.5:findbugs failed: Java returned: 1 
-> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal 
org.codehaus.mojo:findbugs-maven-plugin:3.0.5:findbugs (findbugs) on project 
ambari-server: Execution findbugs of goal 
org.codehaus.mojo:findbugs-maven-plugin:3.0.5:findbugs failed: Java returned: 1
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 
(MojoExecutor.java:333)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute 
(MojoExecutor.java:316)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute 
(MojoExecutor.java:212)


The Reason:
Ambari uses the `findbugs` plugin  for  

Ambari uses the `findBugs` plugin to perform static analysis to look for bugs, 
But `FindBugs` is no longer being updated, and it doesnot work with java 9+.
Now, we use `SpotBugs` plugin instead of it 
[java - Findbugs NoClassesFoundToAnalyze Exception - Stack 
Overflow](https://stackoverflow.com/questions/22028918/findbugs-noclassesfoundtoanalyze-exception)




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

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

Reply via email to