1

最近、ビルドとテストのプロセスにFindBugsを追加しましたが、@SuppressWarningアノテーションを使用しているときにビルドで問題が発生しました。

さらに興味深いことに、コードは3つの開発者のラップトップでコンパイルされますが、ビルドシステムではコンパイルされません。ただし、コードは同じであり、使用されているJavaコンパイラは同じです(1.5.0_22-32ビット)。

問題は次のとおりです。別のプロジェクトCommonLibraryに依存するプロジェクトHCSBeansがあります。CommonLibraryは@SuppressWarningを1回使用しますが、HCSBeansは使用しません。CommonLibraryはラップトップとビルドシステム上にビルドされますが、HCSBeansはビルドシステム上にビルドされません。この時点で、ビルドシステムとラップトップの違いを見つけることができません。

ビルドシステムからの詳細なAnt出力は次のとおりです(注:Mavenは使用していません)。

-do-compile:
    [mkdir] Created dir: C:\Documents and Settings\stephen\.hudson\jobs\ORC Trunk\workspace\orc\nb\HCSBeans\build\empty
    [javac] com\hcs\orc\ui\BindingHandler.java added as com\hcs\orc\ui\BindingHandler.class doesn't exist.
    [javac] com\hcs\orc\ui\JRadioButtonUpdatable.java added as com\hcs\orc\ui\JRadioButtonUpdatable.class doesn't exist.
    [javac] com\hcs\orc\ui\JTextAreaSizeFix.java added as com\hcs\orc\ui\JTextAreaSizeFix.class doesn't exist.
    [javac] com\hcs\orc\ui\ORCAssignmentPanel.java added as com\hcs\orc\ui\ORCAssignmentPanel.class doesn't exist.
    [javac] com\hcs\orc\ui\ORCCheckBox.java added as com\hcs\orc\ui\ORCCheckBox.class doesn't exist.
    [javac] com\hcs\orc\ui\ORCLabel.java added as com\hcs\orc\ui\ORCLabel.class doesn't exist.
    [javac] com\hcs\orc\ui\ORCLabelBeanInfo.java added as com\hcs\orc\ui\ORCLabelBeanInfo.class doesn't exist.
    [javac] com\hcs\orc\ui\ORCPanel.java added as com\hcs\orc\ui\ORCPanel.class doesn't exist.
    [javac] com\hcs\orc\ui\ORCPanelBeanInfo.java added as com\hcs\orc\ui\ORCPanelBeanInfo.class doesn't exist.
    [javac] com\hcs\orc\ui\ORCRadioButton.java added as com\hcs\orc\ui\ORCRadioButton.class doesn't exist.
    [javac] com\hcs\orc\ui\ORCRadioButtonBeanInfo.java added as com\hcs\orc\ui\ORCRadioButtonBeanInfo.class doesn't exist.
    [javac] com\hcs\orc\ui\ORCRadioButtonGroup.java added as com\hcs\orc\ui\ORCRadioButtonGroup.class doesn't exist.
    [javac] com\hcs\orc\ui\ORCRadioButtonGroupBeanInfo.java added as com\hcs\orc\ui\ORCRadioButtonGroupBeanInfo.class doesn't exist.
    [javac] com\hcs\orc\ui\ORCScrollPane.java added as com\hcs\orc\ui\ORCScrollPane.class doesn't exist.
    [javac] com\hcs\orc\ui\ORCScrollPaneBeanInfo.java added as com\hcs\orc\ui\ORCScrollPaneBeanInfo.class doesn't exist.
    [javac] com\hcs\orc\ui\ORCSeparator.java added as com\hcs\orc\ui\ORCSeparator.class doesn't exist.
    [javac] com\hcs\orc\ui\ORCSeparatorBeanInfo.java added as com\hcs\orc\ui\ORCSeparatorBeanInfo.class doesn't exist.
    [javac] com\hcs\orc\ui\ORCSplitPane.java added as com\hcs\orc\ui\ORCSplitPane.class doesn't exist.
    [javac] com\hcs\orc\ui\ORCSplitPaneBeanInfo.java added as com\hcs\orc\ui\ORCSplitPaneBeanInfo.class doesn't exist.
    [javac] com\hcs\orc\ui\ORCTabbedPane.java added as com\hcs\orc\ui\ORCTabbedPane.class doesn't exist.
    [javac] com\hcs\orc\ui\ORCTabbedPaneBeanInfo.java added as com\hcs\orc\ui\ORCTabbedPaneBeanInfo.class doesn't exist.
    [javac] com\hcs\orc\ui\ORCTable.java added as com\hcs\orc\ui\ORCTable.class doesn't exist.
    [javac] com\hcs\orc\ui\ORCTableBeanInfo.java added as com\hcs\orc\ui\ORCTableBeanInfo.class doesn't exist.
    [javac] com\hcs\orc\ui\ORCTextArea.java added as com\hcs\orc\ui\ORCTextArea.class doesn't exist.
    [javac] com\hcs\orc\ui\ORCTextAreaBeanInfo.java added as com\hcs\orc\ui\ORCTextAreaBeanInfo.class doesn't exist.
    [javac] com\hcs\orc\ui\ORCTextField.java added as com\hcs\orc\ui\ORCTextField.class doesn't exist.
    [javac] com\hcs\orc\ui\ORCTextFieldBeanInfo.java added as com\hcs\orc\ui\ORCTextFieldBeanInfo.class doesn't exist.
    [javac] com\hcs\orc\ui\ORCTextPane.java added as com\hcs\orc\ui\ORCTextPane.class doesn't exist.
    [javac] com\hcs\orc\ui\ORCTextPaneBeanInfo.java added as com\hcs\orc\ui\ORCTextPaneBeanInfo.class doesn't exist.
    [javac] com\hcs\orc\ui\RoundButtonBorder.java added as com\hcs\orc\ui\RoundButtonBorder.class doesn't exist.
    [javac] com\hcs\orc\ui\TextLabelUI.java added as com\hcs\orc\ui\TextLabelUI.class doesn't exist.
    [javac] com\hcs\orc\ui\TextTransfer.java added as com\hcs\orc\ui\TextTransfer.class doesn't exist.
    [javac] com\hcs\orc\ui\TouchButton.java added as com\hcs\orc\ui\TouchButton.class doesn't exist.
    [javac] com\hcs\orc\ui\TouchButtonUpdatable.java added as com\hcs\orc\ui\TouchButtonUpdatable.class doesn't exist.
    [javac] C:\Documents and Settings\stephen\.hudson\jobs\ORC Trunk\workspace\orc\nb\HCSBeans\src\com\hcs\orc\ui\resources\black_box.gif skipped - don't know how to handle it
    [javac] C:\Documents and Settings\stephen\.hudson\jobs\ORC Trunk\workspace\orc\nb\HCSBeans\src\com\hcs\orc\ui\resources\black_box_disabled.gif skipped - don't know how to handle it
    [javac] C:\Documents and Settings\stephen\.hudson\jobs\ORC Trunk\workspace\orc\nb\HCSBeans\src\com\hcs\orc\ui\resources\black_box_x.gif skipped - don't know how to handle it
    [javac] C:\Documents and Settings\stephen\.hudson\jobs\ORC Trunk\workspace\orc\nb\HCSBeans\src\com\hcs\orc\ui\resources\black_box_x_disabled.gif skipped - don't know how to handle it
    [javac] Compiling 34 source files to C:\Documents and Settings\stephen\.hudson\jobs\ORC Trunk\workspace\orc\nb\HCSBeans\build\classes
    [javac] Using external javac compiler
    [javac] Compilation arguments:
    [javac] '-d'
    [javac] 'C:\Documents and Settings\stephen\.hudson\jobs\ORC Trunk\workspace\orc\nb\HCSBeans\build\classes'
    [javac] '-classpath'
    [javac] 'C:\Documents and Settings\stephen\.hudson\jobs\ORC Trunk\workspace\orc\nb\HCSBeans\build\classes;C:\Documents and Settings\stephen\.hudson\jobs\ORC Trunk\workspace\orc\nb\CommonLibrary\dist\CommonLibrary.jar;C:\Documents and Settings\stephen\.hudson\jobs\ORC Trunk\workspace\orc\lib\swing-layout-1.0.4.jar'
    [javac] '-sourcepath'
    [javac] 'C:\Documents and Settings\stephen\.hudson\jobs\ORC Trunk\workspace\orc\nb\HCSBeans\build\empty'
    [javac] '-target'
    [javac] '1.5'
    [javac] '-encoding'
    [javac] 'windows-1252'
    [javac] '-g'
    [javac] '-source'
    [javac] '1.5'
    [javac]
    [javac] The ' characters around the executable and arguments are
    [javac] not part of the command.
    [javac] Files to be compiled:
    [javac]     C:\Documents and Settings\stephen\.hudson\jobs\ORC Trunk\workspace\orc\nb\HCSBeans\src\com\hcs\orc\ui\BindingHandler.java
    [javac]     C:\Documents and Settings\stephen\.hudson\jobs\ORC Trunk\workspace\orc\nb\HCSBeans\src\com\hcs\orc\ui\JRadioButtonUpdatable.java
    [javac]     C:\Documents and Settings\stephen\.hudson\jobs\ORC Trunk\workspace\orc\nb\HCSBeans\src\com\hcs\orc\ui\JTextAreaSizeFix.java
    [javac]     C:\Documents and Settings\stephen\.hudson\jobs\ORC Trunk\workspace\orc\nb\HCSBeans\src\com\hcs\orc\ui\ORCAssignmentPanel.java
    [javac]     C:\Documents and Settings\stephen\.hudson\jobs\ORC Trunk\workspace\orc\nb\HCSBeans\src\com\hcs\orc\ui\ORCCheckBox.java
    [javac]     C:\Documents and Settings\stephen\.hudson\jobs\ORC Trunk\workspace\orc\nb\HCSBeans\src\com\hcs\orc\ui\ORCLabel.java
    [javac]     C:\Documents and Settings\stephen\.hudson\jobs\ORC Trunk\workspace\orc\nb\HCSBeans\src\com\hcs\orc\ui\ORCLabelBeanInfo.java
    [javac]     C:\Documents and Settings\stephen\.hudson\jobs\ORC Trunk\workspace\orc\nb\HCSBeans\src\com\hcs\orc\ui\ORCPanel.java
    [javac]     C:\Documents and Settings\stephen\.hudson\jobs\ORC Trunk\workspace\orc\nb\HCSBeans\src\com\hcs\orc\ui\ORCPanelBeanInfo.java
    [javac]     C:\Documents and Settings\stephen\.hudson\jobs\ORC Trunk\workspace\orc\nb\HCSBeans\src\com\hcs\orc\ui\ORCRadioButton.java
    [javac]     C:\Documents and Settings\stephen\.hudson\jobs\ORC Trunk\workspace\orc\nb\HCSBeans\src\com\hcs\orc\ui\ORCRadioButtonBeanInfo.java
    [javac]     C:\Documents and Settings\stephen\.hudson\jobs\ORC Trunk\workspace\orc\nb\HCSBeans\src\com\hcs\orc\ui\ORCRadioButtonGroup.java
    [javac]     C:\Documents and Settings\stephen\.hudson\jobs\ORC Trunk\workspace\orc\nb\HCSBeans\src\com\hcs\orc\ui\ORCRadioButtonGroupBeanInfo.java
    [javac]     C:\Documents and Settings\stephen\.hudson\jobs\ORC Trunk\workspace\orc\nb\HCSBeans\src\com\hcs\orc\ui\ORCScrollPane.java
    [javac]     C:\Documents and Settings\stephen\.hudson\jobs\ORC Trunk\workspace\orc\nb\HCSBeans\src\com\hcs\orc\ui\ORCScrollPaneBeanInfo.java
    [javac]     C:\Documents and Settings\stephen\.hudson\jobs\ORC Trunk\workspace\orc\nb\HCSBeans\src\com\hcs\orc\ui\ORCSeparator.java
    [javac]     C:\Documents and Settings\stephen\.hudson\jobs\ORC Trunk\workspace\orc\nb\HCSBeans\src\com\hcs\orc\ui\ORCSeparatorBeanInfo.java
    [javac]     C:\Documents and Settings\stephen\.hudson\jobs\ORC Trunk\workspace\orc\nb\HCSBeans\src\com\hcs\orc\ui\ORCSplitPane.java
    [javac]     C:\Documents and Settings\stephen\.hudson\jobs\ORC Trunk\workspace\orc\nb\HCSBeans\src\com\hcs\orc\ui\ORCSplitPaneBeanInfo.java
    [javac]     C:\Documents and Settings\stephen\.hudson\jobs\ORC Trunk\workspace\orc\nb\HCSBeans\src\com\hcs\orc\ui\ORCTabbedPane.java
    [javac]     C:\Documents and Settings\stephen\.hudson\jobs\ORC Trunk\workspace\orc\nb\HCSBeans\src\com\hcs\orc\ui\ORCTabbedPaneBeanInfo.java
    [javac]     C:\Documents and Settings\stephen\.hudson\jobs\ORC Trunk\workspace\orc\nb\HCSBeans\src\com\hcs\orc\ui\ORCTable.java
    [javac]     C:\Documents and Settings\stephen\.hudson\jobs\ORC Trunk\workspace\orc\nb\HCSBeans\src\com\hcs\orc\ui\ORCTableBeanInfo.java
    [javac]     C:\Documents and Settings\stephen\.hudson\jobs\ORC Trunk\workspace\orc\nb\HCSBeans\src\com\hcs\orc\ui\ORCTextArea.java
    [javac]     C:\Documents and Settings\stephen\.hudson\jobs\ORC Trunk\workspace\orc\nb\HCSBeans\src\com\hcs\orc\ui\ORCTextAreaBeanInfo.java
    [javac]     C:\Documents and Settings\stephen\.hudson\jobs\ORC Trunk\workspace\orc\nb\HCSBeans\src\com\hcs\orc\ui\ORCTextField.java
    [javac]     C:\Documents and Settings\stephen\.hudson\jobs\ORC Trunk\workspace\orc\nb\HCSBeans\src\com\hcs\orc\ui\ORCTextFieldBeanInfo.java
    [javac]     C:\Documents and Settings\stephen\.hudson\jobs\ORC Trunk\workspace\orc\nb\HCSBeans\src\com\hcs\orc\ui\ORCTextPane.java
    [javac]     C:\Documents and Settings\stephen\.hudson\jobs\ORC Trunk\workspace\orc\nb\HCSBeans\src\com\hcs\orc\ui\ORCTextPaneBeanInfo.java
    [javac]     C:\Documents and Settings\stephen\.hudson\jobs\ORC Trunk\workspace\orc\nb\HCSBeans\src\com\hcs\orc\ui\RoundButtonBorder.java
    [javac]     C:\Documents and Settings\stephen\.hudson\jobs\ORC Trunk\workspace\orc\nb\HCSBeans\src\com\hcs\orc\ui\TextLabelUI.java
    [javac]     C:\Documents and Settings\stephen\.hudson\jobs\ORC Trunk\workspace\orc\nb\HCSBeans\src\com\hcs\orc\ui\TextTransfer.java
    [javac]     C:\Documents and Settings\stephen\.hudson\jobs\ORC Trunk\workspace\orc\nb\HCSBeans\src\com\hcs\orc\ui\TouchButton.java
    [javac]     C:\Documents and Settings\stephen\.hudson\jobs\ORC Trunk\workspace\orc\nb\HCSBeans\src\com\hcs\orc\ui\TouchButtonUpdatable.java
    [javac] An exception has occurred in the compiler (1.5.0_22). Please file a bug at the Java Developer Connection (http://java.sun.com/webapps/bugreport)  after checking the Bug Parade for duplicates. Include your program and the following diagnostic in your report.  Thank you.
    [javac] com.sun.tools.javac.code.Symbol$CompletionFailure: file edu\umd\cs\findbugs\annotations\SuppressWarnings.class not found
      [ant] Exiting C:\Documents and Settings\stephen\.hudson\jobs\ORC Trunk\workspace\orc\nb\HCSBeans\build.xml.
  [antcall] Exiting C:\Documents and Settings\stephen\.hudson\jobs\ORC Trunk\workspace\orc\nb\build.xml.

これが私のラップトップからの冗長なAnt出力です:

-do-compile:
    [mkdir] Created dir: C:\hcs\orc\nb\HCSBeans\build\empty
    [javac] com\hcs\orc\ui\BindingHandler.java added as com\hcs\orc\ui\BindingHandler.class doesn't exist.
    [javac] com\hcs\orc\ui\JRadioButtonUpdatable.java added as com\hcs\orc\ui\JRadioButtonUpdatable.class doesn't exist.
    [javac] com\hcs\orc\ui\JTextAreaSizeFix.java added as com\hcs\orc\ui\JTextAreaSizeFix.class doesn't exist.
    [javac] com\hcs\orc\ui\ORCAssignmentPanel.java added as com\hcs\orc\ui\ORCAssignmentPanel.class doesn't exist.
    [javac] com\hcs\orc\ui\ORCCheckBox.java added as com\hcs\orc\ui\ORCCheckBox.class doesn't exist.
    [javac] com\hcs\orc\ui\ORCLabel.java added as com\hcs\orc\ui\ORCLabel.class doesn't exist.
    [javac] com\hcs\orc\ui\ORCLabelBeanInfo.java added as com\hcs\orc\ui\ORCLabelBeanInfo.class doesn't exist.
    [javac] com\hcs\orc\ui\ORCPanel.java added as com\hcs\orc\ui\ORCPanel.class doesn't exist.
    [javac] com\hcs\orc\ui\ORCPanelBeanInfo.java added as com\hcs\orc\ui\ORCPanelBeanInfo.class doesn't exist.
    [javac] com\hcs\orc\ui\ORCRadioButton.java added as com\hcs\orc\ui\ORCRadioButton.class doesn't exist.
    [javac] com\hcs\orc\ui\ORCRadioButtonBeanInfo.java added as com\hcs\orc\ui\ORCRadioButtonBeanInfo.class doesn't exist.
    [javac] com\hcs\orc\ui\ORCRadioButtonGroup.java added as com\hcs\orc\ui\ORCRadioButtonGroup.class doesn't exist.
    [javac] com\hcs\orc\ui\ORCRadioButtonGroupBeanInfo.java added as com\hcs\orc\ui\ORCRadioButtonGroupBeanInfo.class doesn't exist.
    [javac] com\hcs\orc\ui\ORCScrollPane.java added as com\hcs\orc\ui\ORCScrollPane.class doesn't exist.
    [javac] com\hcs\orc\ui\ORCScrollPaneBeanInfo.java added as com\hcs\orc\ui\ORCScrollPaneBeanInfo.class doesn't exist.
    [javac] com\hcs\orc\ui\ORCSeparator.java added as com\hcs\orc\ui\ORCSeparator.class doesn't exist.
    [javac] com\hcs\orc\ui\ORCSeparatorBeanInfo.java added as com\hcs\orc\ui\ORCSeparatorBeanInfo.class doesn't exist.
    [javac] com\hcs\orc\ui\ORCSplitPane.java added as com\hcs\orc\ui\ORCSplitPane.class doesn't exist.
    [javac] com\hcs\orc\ui\ORCSplitPaneBeanInfo.java added as com\hcs\orc\ui\ORCSplitPaneBeanInfo.class doesn't exist.
    [javac] com\hcs\orc\ui\ORCTabbedPane.java added as com\hcs\orc\ui\ORCTabbedPane.class doesn't exist.
    [javac] com\hcs\orc\ui\ORCTabbedPaneBeanInfo.java added as com\hcs\orc\ui\ORCTabbedPaneBeanInfo.class doesn't exist.
    [javac] com\hcs\orc\ui\ORCTable.java added as com\hcs\orc\ui\ORCTable.class doesn't exist.
    [javac] com\hcs\orc\ui\ORCTableBeanInfo.java added as com\hcs\orc\ui\ORCTableBeanInfo.class doesn't exist.
    [javac] com\hcs\orc\ui\ORCTextArea.java added as com\hcs\orc\ui\ORCTextArea.class doesn't exist.
    [javac] com\hcs\orc\ui\ORCTextAreaBeanInfo.java added as com\hcs\orc\ui\ORCTextAreaBeanInfo.class doesn't exist.
    [javac] com\hcs\orc\ui\ORCTextField.java added as com\hcs\orc\ui\ORCTextField.class doesn't exist.
    [javac] com\hcs\orc\ui\ORCTextFieldBeanInfo.java added as com\hcs\orc\ui\ORCTextFieldBeanInfo.class doesn't exist.
    [javac] com\hcs\orc\ui\ORCTextPane.java added as com\hcs\orc\ui\ORCTextPane.class doesn't exist.
    [javac] com\hcs\orc\ui\ORCTextPaneBeanInfo.java added as com\hcs\orc\ui\ORCTextPaneBeanInfo.class doesn't exist.
    [javac] com\hcs\orc\ui\RoundButtonBorder.java added as com\hcs\orc\ui\RoundButtonBorder.class doesn't exist.
    [javac] com\hcs\orc\ui\TextLabelUI.java added as com\hcs\orc\ui\TextLabelUI.class doesn't exist.
    [javac] com\hcs\orc\ui\TextTransfer.java added as com\hcs\orc\ui\TextTransfer.class doesn't exist.
    [javac] com\hcs\orc\ui\TouchButton.java added as com\hcs\orc\ui\TouchButton.class doesn't exist.
    [javac] com\hcs\orc\ui\TouchButtonUpdatable.java added as com\hcs\orc\ui\TouchButtonUpdatable.class doesn't exist.
    [javac] C:\hcs\orc\nb\HCSBeans\src\com\hcs\orc\ui\resources\black_box.gif skipped - don't know how to handle it
    [javac] C:\hcs\orc\nb\HCSBeans\src\com\hcs\orc\ui\resources\black_box_disabled.gif skipped - don't know how to handle it
    [javac] C:\hcs\orc\nb\HCSBeans\src\com\hcs\orc\ui\resources\black_box_x.gif skipped - don't know how to handle it
    [javac] C:\hcs\orc\nb\HCSBeans\src\com\hcs\orc\ui\resources\black_box_x_disabled.gif skipped - don't know how to handle it
    [javac] Compiling 34 source files to C:\hcs\orc\nb\HCSBeans\build\classes
    [javac] Using external javac compiler
    [javac] Compilation arguments:
    [javac] '-d'
    [javac] 'C:\hcs\orc\nb\HCSBeans\build\classes'
    [javac] '-classpath'
    [javac] 'C:\hcs\orc\nb\HCSBeans\build\classes;C:\hcs\orc\nb\CommonLibrary\dist\CommonLibrary.jar;C:\Program Files (x86)\NetBeans 7.2\platform\modules\ext\swing-layout-1.0.4.jar'
    [javac] '-sourcepath'
    [javac] 'C:\hcs\orc\nb\HCSBeans\build\empty'
    [javac] '-target'
    [javac] '1.5'
    [javac] '-encoding'
    [javac] 'windows-1252'
    [javac] '-g'
    [javac] '-source'
    [javac] '1.5'
    [javac]
    [javac] The ' characters around the executable and arguments are
    [javac] not part of the command.
    [javac] Files to be compiled:
    [javac]     C:\hcs\orc\nb\HCSBeans\src\com\hcs\orc\ui\BindingHandler.java
    [javac]     C:\hcs\orc\nb\HCSBeans\src\com\hcs\orc\ui\JRadioButtonUpdatable.java
    [javac]     C:\hcs\orc\nb\HCSBeans\src\com\hcs\orc\ui\JTextAreaSizeFix.java
    [javac]     C:\hcs\orc\nb\HCSBeans\src\com\hcs\orc\ui\ORCAssignmentPanel.java
    [javac]     C:\hcs\orc\nb\HCSBeans\src\com\hcs\orc\ui\ORCCheckBox.java
    [javac]     C:\hcs\orc\nb\HCSBeans\src\com\hcs\orc\ui\ORCLabel.java
    [javac]     C:\hcs\orc\nb\HCSBeans\src\com\hcs\orc\ui\ORCLabelBeanInfo.java
    [javac]     C:\hcs\orc\nb\HCSBeans\src\com\hcs\orc\ui\ORCPanel.java
    [javac]     C:\hcs\orc\nb\HCSBeans\src\com\hcs\orc\ui\ORCPanelBeanInfo.java
    [javac]     C:\hcs\orc\nb\HCSBeans\src\com\hcs\orc\ui\ORCRadioButton.java
    [javac]     C:\hcs\orc\nb\HCSBeans\src\com\hcs\orc\ui\ORCRadioButtonBeanInfo.java
    [javac]     C:\hcs\orc\nb\HCSBeans\src\com\hcs\orc\ui\ORCRadioButtonGroup.java
    [javac]     C:\hcs\orc\nb\HCSBeans\src\com\hcs\orc\ui\ORCRadioButtonGroupBeanInfo.java
    [javac]     C:\hcs\orc\nb\HCSBeans\src\com\hcs\orc\ui\ORCScrollPane.java
    [javac]     C:\hcs\orc\nb\HCSBeans\src\com\hcs\orc\ui\ORCScrollPaneBeanInfo.java
    [javac]     C:\hcs\orc\nb\HCSBeans\src\com\hcs\orc\ui\ORCSeparator.java
    [javac]     C:\hcs\orc\nb\HCSBeans\src\com\hcs\orc\ui\ORCSeparatorBeanInfo.java
    [javac]     C:\hcs\orc\nb\HCSBeans\src\com\hcs\orc\ui\ORCSplitPane.java
    [javac]     C:\hcs\orc\nb\HCSBeans\src\com\hcs\orc\ui\ORCSplitPaneBeanInfo.java
    [javac]     C:\hcs\orc\nb\HCSBeans\src\com\hcs\orc\ui\ORCTabbedPane.java
    [javac]     C:\hcs\orc\nb\HCSBeans\src\com\hcs\orc\ui\ORCTabbedPaneBeanInfo.java
    [javac]     C:\hcs\orc\nb\HCSBeans\src\com\hcs\orc\ui\ORCTable.java
    [javac]     C:\hcs\orc\nb\HCSBeans\src\com\hcs\orc\ui\ORCTableBeanInfo.java
    [javac]     C:\hcs\orc\nb\HCSBeans\src\com\hcs\orc\ui\ORCTextArea.java
    [javac]     C:\hcs\orc\nb\HCSBeans\src\com\hcs\orc\ui\ORCTextAreaBeanInfo.java
    [javac]     C:\hcs\orc\nb\HCSBeans\src\com\hcs\orc\ui\ORCTextField.java
    [javac]     C:\hcs\orc\nb\HCSBeans\src\com\hcs\orc\ui\ORCTextFieldBeanInfo.java
    [javac]     C:\hcs\orc\nb\HCSBeans\src\com\hcs\orc\ui\ORCTextPane.java
    [javac]     C:\hcs\orc\nb\HCSBeans\src\com\hcs\orc\ui\ORCTextPaneBeanInfo.java
    [javac]     C:\hcs\orc\nb\HCSBeans\src\com\hcs\orc\ui\RoundButtonBorder.java
    [javac]     C:\hcs\orc\nb\HCSBeans\src\com\hcs\orc\ui\TextLabelUI.java
    [javac]     C:\hcs\orc\nb\HCSBeans\src\com\hcs\orc\ui\TextTransfer.java
    [javac]     C:\hcs\orc\nb\HCSBeans\src\com\hcs\orc\ui\TouchButton.java
    [javac]     C:\hcs\orc\nb\HCSBeans\src\com\hcs\orc\ui\TouchButtonUpdatable.java

コンパイルエラー以外は何の違いもありません。

注目に値する他の事柄:

  1. SVNから両方のプロジェクトのソースコードを削除して再チェックアウトします。
  2. Javaのバージョンを比較します。どちらも32ビットJava1.5.0_22です。古いことは知っていますが、それを主張するお客様がいます。
  3. CommonLibraryには@SuppressWarningへの参照が1つだけあり、HCSBeansにはありません。
  4. CommonLibraryを構築するときにannotations.jarとjsr305.jarを使用しますが、これらは一緒にパッケージ化されておらず、HCSBeansによって参照されていません。ビルド後には必要ありません。
  5. ビルドシステムが32ビットであるのに対し、私たちのラップトップは64ビットですが、両方のJavaインストールは32ビットです。
  6. すべてのコンピューターはMSWindowsです。

アップデート

ビルドサーバーをJava1.6でHCSBeanをコンパイルするように切り替え、コードをコンパイルします(SwingUtilities2への未使用のインポートを削除した後)が、Java 1.5に戻すと、同じエラーで失敗します。Java1.5コンパイラに問題があるのではないかと疑い始めています。

アップデート2

さて、同僚は実際の違いを見つけました。なぜ発生しているのかはわかりませんが、結果のビルドの違いは次のとおりです。私たちのラップトップでは、CommonLibrary.jarMANIFEST.MFファイルに次の行が含まれています。

Class-Path: lib/annotations.jar lib/jsr305.jar

これは、HCSBeansプロジェクトをビルドすると、必要なannotations.jarファイルが見つかることを意味します。ただし、ビルドサーバーでビルドする場合、このクラスパス行は存在しません。理由はわかりませんが、それが次の調査です。

4

2 に答える 2

2

So we found the problem. Our laptops, having NetBeans installed (even if we weren't building directly from NetBeans) were using the CopyLibs to build the jar file, which added the needed line to the Manifest.MF file:

Class-Path: lib/annotations.jar lib/jsr305.jar

However, our build server, not having NetBeans installed was using j2seproject1:jar to build the jar file.

The solution was to add this to the -D Javac properties when building on our build server (which is Hudson, for those interested):

libs.CopyLibs.classpath=C:\\Documents and Settings\\stephen\\.hudson\\jobs\\ORC Trunk\\workspace\\orc\\lib\\netbeans\\org-netbeans-modules-java-j2seproject-copylibstask.jar

Now both our laptops and the build server are using CopyLibs and they both compile.

Yikes! What a mess to figure out.

Thanks for those who gave me pointers along the way ( @Peter-Eliot & @Disco3 ).

于 2013-01-16T02:09:04.427 に答える
0

ライブラリはバージョンではなく、SuppressWarning の FindBugs バージョンを使用しているようjava.langです。@SuppressWarningSuppressWarning の FindBugs バージョンのインポートを@java.lang.SuppressWarning削除および/または削除して、それが修正されるかどうかを確認しますか?

また、hudson が参照するクラスパスにライブラリとして FindBugs を追加してみてください。開発者のマシンでは NetBeans で構築しているように見えますが、Netbeans が FindBugs を ant が使用するクラスパスに忍び込ませたとしても、私はショックを受けません。

于 2013-01-15T17:23:48.830 に答える