2013-02-08 70 views
2

自從去年夏天以來,Eclipse支持一種功能,可以在每個構建路徑中抑制不重要的代碼問題(described here)。如何從maven添加eclipse的構建路徑選項

當您從GUI中設置此選項時,我發現這在項目的.classpath文件中反映如下。

<classpathentry including="**/*.java" kind="src" path="src/main/java"/> 
    <classpathentry including="**/*.java" kind="src" path="target/generated-sources/proto"> 
      <attributes> 
        <attribute name="ignore_optional_problems" value="true"/> 
      </attributes> 
    </classpathentry> 

我有一個現有的基於Maven的項目,我想配置它,這樣,當我運行 MVN日食:日食所生成的.classpath文件包含上面的選項與生成的源buildpaths碼。

我檢查了eclipse mojo的所有選項,我一直無法弄清楚如何做到這一點。

我該如何做到這一點?

回答