在pom.xml你可以:
<build>
    <plugins>
        <plugin>
            <artifactId>maven-compiler-plugin</artifactId>
            <configuration>
                <source>1.5</source>
                <target>1.5</target>
            </configuration>
        </plugin>
    </plugins>
</build>
Maven如何知道我有1.5版本?
<project>
  [...]
  <reporting>
    [...]
    <plugin>
      <groupId>org.codehaus.mojo</groupId>
      <artifactId>findbugs-maven-plugin</artifactId>
      <version>1.2.1</version>
      <configuration>
        <xmlOutput>true|false</xmlOutput>
        <xmlOutputDirectory>directory location of findbugs xdoc xml report</xmlOutputDirectory>
        <threshold>High|Normal|Low|Exp|Ignore</threshold>
        <effort>Min|Default|Max</effort>
        <excludeFilterFile>findbugs-exclude.xml</excludeFilterFile>
        <includeFilterFile>findbugs-include.xml</includeFilterFile>
        <visitors>FindDeadLocalStores,UnreadFields</visitors>
        <omitVisitors>FindDeadLocalStores,UnreadFields</omitVisitors>
        <onlyAnalyze>org.codehaus.mojo.findbugs.*</onlyAnalyze>
        <pluginList>/libs/fb-contrib/fb-contrib-2.8.0.jar</pluginList>
        <debug>true|false</debug>
        <relaxed>true|false</relaxed>
        <findbugsXmlOutput>true|false</findbugsXmlOutput>
        <findbugsXmlOutputDirectory>directory location of findbugs legact xml format report</findbugsXmlOutputDirectory>
      </configuration>
    </plugin>
    [...]
  </reporting>
  [...]
</project>
但有一次:
mvn site
我明白了:
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed to resolve artifact.
GroupId: org.codehaus.mojo
ArtifactId: findbugs-maven-plugin
Version: 1.2.1
Reason: Unable to download the artifact from any repository
  org.codehaus.mojo:findbugs-maven-plugin:pom:1.2.1
from the specified remote …我有一个新的iPhone项目.当我"建立并去"时:
调试器出错:无法启动模拟应用程序:iPhone模拟器无法安装应用程序.
这是为什么?!
你如何使这种方法有效?
def filled(b: Board): Board = {
  b.next foreach { n =>
    if (n.filled) n
    else filled(n)
  }
}
我需要它在首次填充n(n.filled == true)之后返回,就像在Java中一样.
现在我得到:
chess-knight.scala:72: error: type mismatch;
 found   : Unit
 required: this.Board
    b.next foreach { n =>
           ^
one error found
谢谢!
你如何在Django中使用模型formset?当你这样做:
from django.forms.models import modelformset_factory
OrderFormset = modelformset_factory(Order)
formset = OrderFormset()
formset包含来自DB的所有订单...
如何将它们限制为例如profile.orders(Profila与FK连接到Order)?
在此先感谢,Etam.