Maven install命令不构建任何东西,但它显示构建成功

时间:2014-10-08 00:40:01

标签: eclipse maven selenium

来自IDE的控制台消息是:

Results :

Tests run: 0, Failures: 0, Errors: 0, Skipped: 0

[INFO] 
[INFO] --- maven-jar-plugin:2.3.2:jar (default-jar) @ maven ---
[INFO] Building jar: C:\Documents and Settings\ grandcanyonlab \Desktop \workspace  \selenium_mvn_googlesearch \target\maven-0.0.1-SNAPSHOT.jar
[INFO] 
[INFO] --- maven-install-plugin:2.3.1:install (default-install) @ maven ---
[INFO] Installing C:\Documents and  Settings \grandcanyonlab \Desktop \workspace \selenium_mvn_googlesearch\target\maven-0.0.1-SNAPSHOT.jar to C:\Documents and Settings \grandcanyonlab\.m2\repository\org\apache\maven\maven\0.0.1-SNAPSHOT\maven-0.0.1-SNAPSHOT.jar
[INFO] Installing C:\Documents and Settings \grandcanyonlab \Desktop \workspace \selenium_mvn_googlesearch\pom.xml to C:\Documents and Settings\grandcanyonlab\.m2\repository\org\apache\maven\maven\0.0.1-SNAPSHOT\maven-0.0.1-  SNAPSHOT.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.360s
[INFO] Finished at: Tue Oct 07 17:25:31 PDT 2014
[INFO] Final Memory: 6M/15M
[INFO] ------------------------------------------------------------------------

我的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>org.apache.maven</groupId>
<artifactId>maven</artifactId>
<version>0.0.1-SNAPSHOT</version>
</project>
<dependencies>
<dependency>
      <groupId>org.seleniumhq.selenium</groupId>
      <artifactId>selenium-java</artifactId>
      <version>2.43.0</version>  
</dependency> 
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>


  

它显示Build成功但没有将Test Run设置为1.它表示0.并且我无法在目标文件夹中找到.jar文件。它显示了mycompany.app.Apptest。编译代码时我做错了吗?

1 个答案:

答案 0 :(得分:2)

您似乎尝试构建主要的maven项目:org.apache.maven.maven:<version>

请注意,此项目默认只是一个pom,而不是JAR。含义,<packaging>pom</packaging>。 为什么要尝试重建maven?这是故意的吗?如果没有,请更改您的groupId / ArtifactId ...并确保<packaging>jar</packaging>

HTH