我使用 Netbeans 的 Maven 插件(v4.20.1)在 Netbeans 7.3 中创建了一个 Maven 项目
在我的 pom.xml 中,我尝试明确定义 surefire 插件,但无论我做什么,它都不会选择它。它正在拉不同版本的surefire(2.10),我不确定从哪里开始。pom.xml 中的所有其他插件都按预期工作。有什么线索吗?
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>myGroup</groupId>
<artifactId>myArtifact</artifactId>
<version>myVersion</version>
<packaging>jar</packaging>
<name>myName</name>
<properties>
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>
<maven.build.timestamp.format>yyyy-MM-dd_HH:mm</maven.build.timestamp.format>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<build>
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.4</version>
<!--etc...-->
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<!--etc...-->
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.4</version>
<!--etc...-->
</plugin>
<plugin>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire</artifactId>
<!-- This invalid version should trigger a maven error, but doesn't -->
<version>92.14</version>
<!--etc...-->
</plugin>
<plugin>
<groupId>com.google.code.maven-replacer-plugin</groupId>
<artifactId>replacer</artifactId>
<version>1.5.2</version>
<!--etc...-->
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.8</version>
<!--etc...-->
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
<version>2.5</version>
<!--etc...-->
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>windows</id>
<activation>
<activeByDefault>true</activeByDefault>
<os>
<family>windows</family>
</os>
</activation>
<properties>
<!--etc...-->
</properties>
</profile>
<profile>
<id>linux</id>
<activation>
<os>
<family>unix</family>
</os>
</activation>
<properties>
<!--etc...-->
</properties>
</profile>
</profiles>
</project>