无法将jar从本地maven存储库添加到项目类路径中

时间:2015-01-10 14:23:25

标签: java maven maven-eclipse-plugin

我可以在我的本地maven存储库中看到jar但仍然在执行maven clean install时遇到类路径问题。

pom.xml -

<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <parent>
    <artifactId>dummy</artifactId>
    <groupId>com.getpoint.dummy</groupId>
    <version>2.0.0.user-SNAPSHOT</version>
  </parent>

  <artifactId>user</artifactId>
  <packaging>pom</packaging>
  <name>user</name>
  <modelVersion>4.0.0</modelVersion>

  <properties>
  </properties>

 <dependencyManagement>
    <dependencies>
    </dependencies>
  </dependencyManagement> 

  <dependencies>
      <dependency>
        <groupId>com.getpoint.dummy</groupId>
        <artifactId>user2_0a</artifactId>
        <version>1.0.1</version>
      </dependency>
     <dependency>
        <groupId>log4j</groupId>
        <artifactId>log4j</artifactId>
        <version>1.2.17</version>
     </dependency>

     <dependency>
        <groupId>commons-httpclient</groupId>
        <artifactId>commons-httpclient</artifactId>
        <version>3.1</version>
     </dependency>

     <dependency>
        <groupId>commons-lang</groupId>
        <artifactId>commons-lang</artifactId>
        <version>2.6</version>
     </dependency>

  </dependencies>

  <build>
    <pluginManagement>
      <plugins>
      </plugins>
    </pluginManagement>
  </build>

  <modules>
    <module>testserver</module>
    <module>core</module>
    <module>usernoc_pull</module>
  </modules>
</project>

在上面的pom文件中,以下依赖项是导致错误的依赖项 -

      <dependency>
        <groupId>com.getpoint.dummy</groupId>
        <artifactId>user2_0a</artifactId>
        <version>1.0.1</version>
      </dependency>

执行mvn clean install时的错误 -

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.0.2:compile (default-compile) on project user-core: Compilation failure: Compilation failure:
[ERROR] D:\Eclipse_Kepler\Workspace\dummyPro\user\core\src\main\java\com\getpoint\dummy\user\main\DRCoreMain.java:[6,57] error: package main.java.com.getpoint.dummy.user.shared.main does not exist
[ERROR] 
[ERROR] could not parse error message:   symbol:   class UserEvent

注意:我已将此软件包放在我的目录结构中。

0 个答案:

没有答案