[
https://issues.apache.org/jira/browse/HCATALOG-447?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Travis Crawford updated HCATALOG-447:
-------------------------------------
Attachment: HCATALOG-447_fix_findbugs.1.patch
This patch fixes findbugs to work for subprojects.
I chose to move the findbugs stuff into {{ant/findbugs.xml}} for a couple
reasons. Primarily, I find the ginormous {{build.xml}} file hard to reason
about, and hopefully this is more maintainable. It also lets us easily use it
from the main build, as well as subprojects.
Fails with a useful message if you don't specify where findbugs is:
{code}
TW-MBP13-TCrawford:hcatalog travis$ ant findbugs
Buildfile: /Users/travis/src/hcatalog/build.xml
init-findbugs:
BUILD FAILED
/Users/travis/src/hcatalog/ant/findbugs.xml:58: 'findbugs.home' is not defined.
Please pass -Dfindbugs.home=<base of Findbugs installation> to Ant on the
command-line.
Total time: 0 seconds
TW-MBP13-TCrawford:hcatalog travis$
{code}
Interesting parts from running findbugs:
{code}
findbugs:
[mkdir] Created dir: /Users/travis/src/hcatalog/build/test/findbugs
[findbugs] Executing findbugs from ant task
[findbugs] Running FindBugs...
[findbugs] The following classes needed for analysis were missing:
[findbugs] org.apache.hadoop.hive.service.HiveClient
[findbugs] jline.Completor
[findbugs] jline.ArgumentCompletor$ArgumentDelimiter
[findbugs] jline.ArgumentCompletor
[findbugs] org.apache.hadoop.hive.service.HiveServerException
[findbugs] jline.SimpleCompletor
[findbugs] jline.ArgumentCompletor$AbstractArgumentDelimiter
[findbugs] jline.ConsoleReader
[findbugs] jline.History
[findbugs] Warnings generated: 31
[findbugs] Missing classes: 6
[findbugs] Calculating exit code...
[findbugs] Setting 'missing class' flag (2)
[findbugs] Setting 'bugs found' flag (1)
[findbugs] Exit code set to: 3
[findbugs] Java Result: 3
[findbugs] Classes needed for analysis were missing
[findbugs] Output saved to
/Users/travis/src/hcatalog/build/test/findbugs/hcat-findbugs-report.xml
[xslt] Processing
/Users/travis/src/hcatalog/build/test/findbugs/hcat-findbugs-report.xml to
/Users/travis/src/hcatalog/build/test/findbugs/hcat-findbugs-report.html
[xslt] Loading stylesheet /usr/local/findbugs-2.0.1-rc4/src/xsl/default.xsl
findbugs:
[echo] hcatalog-pig-adapter
[mkdir] Created dir:
/Users/travis/src/hcatalog/hcatalog-pig-adapter/build/test/findbugs
[findbugs] Executing findbugs from ant task
[findbugs] Running FindBugs...
[findbugs] Warnings generated: 2
[findbugs] Calculating exit code...
[findbugs] Setting 'bugs found' flag (1)
[findbugs] Exit code set to: 1
[findbugs] Java Result: 1
[findbugs] Output saved to
/Users/travis/src/hcatalog/hcatalog-pig-adapter/build/test/findbugs/hcat-findbugs-report.xml
[xslt] Processing
/Users/travis/src/hcatalog/hcatalog-pig-adapter/build/test/findbugs/hcat-findbugs-report.xml
to
/Users/travis/src/hcatalog/hcatalog-pig-adapter/build/test/findbugs/hcat-findbugs-report.html
[xslt] Loading stylesheet /usr/local/findbugs-2.0.1-rc4/src/xsl/default.xsl
{code}
> findbugs target doesn't work in trunk
> -------------------------------------
>
> Key: HCATALOG-447
> URL: https://issues.apache.org/jira/browse/HCATALOG-447
> Project: HCatalog
> Issue Type: Bug
> Components: build
> Affects Versions: 0.5
> Reporter: Alan Gates
> Assignee: Travis Crawford
> Fix For: 0.5
>
> Attachments: HCATALOG-447_fix_findbugs.1.patch
>
>
> Doing "ant findbugs" results in:
> {code}
> findbugs:
> [mkdir] Created dir: /Users/gates/src/hcat/top/trunk/build/test/findbugs
> BUILD FAILED
> /Users/gates/src/hcat/top/trunk/build.xml:477: findbugs doesn't support the
> nested "fileset" element.
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira