maven错误包org.junit不存在

时间:2013-06-16 11:36:49

标签: pom.xml

我正在尝试使用git push heroku master将项目推送到heroku。 我的pom如下:

<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>main.java.com.simpragma.primenumber</groupId>
  <artifactId>prime-number</artifactId>
  <version>1.0-SNAPSHOT</version>
  <packaging>jar</packaging>

  <name>Maven Quick Start Archetype</name>
  <url>http://maven.apache.org</url>

  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.8.2</version>

    </dependency>
  </dependencies>
  <build>
      <finalName>${project.artifactId}</finalName>

  </build>
</project>

我收到此错误:

[ERROR] COMPILATION ERROR : 
[INFO] -------------------------------------------------------------
[ERROR] /tmp/build_2ys23i22tyrdb/src/test/TestPrime.java:[3,23] package org.junit does not exist
[ERROR] /tmp/build_2ys23i22tyrdb/src/test/TestPrime.java:[7,16] package org.junit does not exist
[ERROR] /tmp/build_2ys23i22tyrdb/src/test/TestPrime.java:[11,2] cannot find symbol
symbol  : class Test
location: class test.TestPrime

可能是什么原因?

1 个答案:

答案 0 :(得分:-2)

1.0  xsi:schemaLocation =“http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd”&gt;   4.0.0

'这里是错误的 素数