Maven:无法解决依赖关系。找不到具体的罐子

时间:2014-07-30 15:39:14

标签: java maven github dependencies pom.xml

我在github上找到了一个带有提供的pom.xml文件的项目,该文件在maven中构建时编译为war文件。但是,构建项目失败并提供警告,指出无法找到特定依赖项的POM(com.emc.cto.xProcRESTFramework)。我查看了项目的文件夹,没有这样的文件。我试过在网上看,但我找不到依赖。

我做错了什么?

感谢您的帮助!

以下是maven在尝试清理安装时产生的错误。

[WARNING]
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building RIDAgent 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for com.emc.cto:XProcRESTFrameworkMVC:jar:0.0.4-SNAPSHOT is mi
ssing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.578 s
[INFO] Finished at: 2014-07-30T16:00:34+01:00
[INFO] Final Memory: 9M/107M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project RIDAgent: Could not resolve dependenci
es for project RIDAgent:RIDAgent:war:0.0.1-SNAPSHOT: Failure to find com.emc.cto
:XProcRESTFrameworkMVC:jar:0.0.4-SNAPSHOT in http://download.java.net/maven/2 wa
s cached in the local repository, resolution will not be reattempted until the u
pdate interval of java.net maven repository has elapsed or updates are forced ->
 [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyReso
lutionException

这是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>RIDAgent</groupId>
<artifactId>RIDAgent</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>

<properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <downloadSources>true</downloadSources>
    <downloadJavadocs>true</downloadJavadocs>
    <slf4j-version>1.5.2</slf4j-version>
    <jersey-version>1.1.5.1</jersey-version>
    <xdb-version>10.1</xdb-version>
    <calumet-version>1.0.13</calumet-version>
    <org.springframework.version>3.0.5.RELEASE</org.springframework.version>
    <spring-security-version>3.0.5.RELEASE</spring-security-version>
</properties>

<dependencies>
    <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-api</artifactId>
        <version>${slf4j-version}</version>
    </dependency>
    <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-log4j12</artifactId>
        <version>${slf4j-version}</version>
    </dependency>
    <!-- Core utilities used by other modules. Define this if you use Spring 
        Utility APIs (org.springframework.core.*/org.springframework.util.*) -->
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-core</artifactId>
        <version>${org.springframework.version}</version>
    </dependency>
    <!-- Expression Language (depends on spring-core) Define this if you use 
        Spring Expression APIs (org.springframework.expression.*) -->
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-expression</artifactId>
        <version>${org.springframework.version}</version>
    </dependency>
    <!-- Bean Factory and JavaBeans utilities (depends on spring-core) Define 
        this if you use Spring Bean APIs (org.springframework.beans.*) -->
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-beans</artifactId>
        <version>${org.springframework.version}</version>
    </dependency>
    <!-- Aspect Oriented Programming (AOP) Framework (depends on spring-core, 
        spring-beans) Define this if you use Spring AOP APIs (org.springframework.aop.*) -->
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-aop</artifactId>
        <version>${org.springframework.version}</version>
    </dependency>
    <!-- Application Context (depends on spring-core, spring-expression, spring-aop, 
        spring-beans) This is the central artifact for Spring's Dependency Injection 
        Container and is generally always Defined -->
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-context</artifactId>
        <version>${org.springframework.version}</version>
    </dependency>
    <!-- Web application development utilities applicable to both Servlet and 
        Portlet Environments(depends on spring-core, spring-beans, spring-context) 
        Define this if you use Spring MVC, or wish to use Struts, JSF, or another 
        web framework with Spring (org.springframework.web.*) -->
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-web</artifactId>
        <version>${org.springframework.version}</version>
    </dependency>
    <!-- Spring MVC for Servlet Environments (depends on spring-core, spring-beans, 
        spring-context, spring-web) Define this if you use Spring MVC with a Servlet 
        Container such as Apache Tomcat (org.springframework.web.servlet.*) -->
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-webmvc</artifactId>
        <version>${org.springframework.version}</version>
    </dependency>
    <dependency>
        <groupId>org.apache.geronimo.specs</groupId>
        <artifactId>geronimo-servlet_3.0_spec</artifactId>
        <version>1.0</version>
    </dependency>
    <dependency>
        <groupId>com.emc.cto</groupId>
        <artifactId>XProcRESTFrameworkMVC</artifactId>
        <version>0.0.4-SNAPSHOT</version>
    </dependency>

    <!-- Adding for JSP JSTL support for JSP pages -->

    <dependency>
        <groupId>taglibs</groupId>
        <artifactId>standard</artifactId>
        <version>1.1.2</version>
    </dependency>

    <dependency>
        <groupId>javax.servlet</groupId>
        <artifactId>jstl</artifactId>
        <version>1.1.0</version>
    </dependency>

    <!-- dependency to fix JSPServletException -->
    <dependency>
        <groupId>org.apache.tomcat</groupId>
        <artifactId>jsp-api</artifactId>
        <version>6.0.32</version>
        <scope>provided</scope>
    </dependency>


    <!-- HttpComponents -->

    <dependency>
        <groupId>org.apache.httpcomponents</groupId>
        <artifactId>httpclient</artifactId>
        <version>4.2.1</version>
    </dependency>

    <dependency>
        <groupId>org.apache.httpcomponents</groupId>
        <artifactId>httpcore</artifactId>
        <version>4.2.1</version>
    </dependency>

    <dependency>
        <groupId>org.springframework.security</groupId>
        <artifactId>spring-security-config</artifactId>
        <version>3.0.5.RELEASE</version>
    </dependency>


    <dependency>
        <groupId>org.springframework.security</groupId>
        <artifactId>spring-security-web</artifactId>
        <version>3.0.5.RELEASE</version>
    </dependency>
    <!-- JAXB Dependency for custom namespace declaration -->
    <dependency>
        <groupId>com.sun.xml.bind</groupId>
        <artifactId>jaxb-impl</artifactId>
        <version>2.2.5</version>
    </dependency>
    <dependency>
        <groupId>commons-lang</groupId>
        <artifactId>commons-lang</artifactId>
        <version>2.6</version>
    </dependency>
    <dependency>
        <groupId>org.apache.httpcomponents</groupId>
        <artifactId>httpmime</artifactId>
        <version>4.2.2</version>
    </dependency>
    <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-build-plugin</artifactId>
        <version>1.3</version>
    </dependency>


</dependencies>

<repositories>
    <repository>
        <id>Repo Maven archive</id>
        <name>Apache Maven Community Repository</name>
        <url>http://repo1.maven.org/maven2</url>
        <snapshots>
            <enabled>false</enabled>
        </snapshots>
        <releases>
            <enabled>true</enabled>
        </releases>
    </repository>
    <repository>
        <id>java.net maven repository</id>
        <name>Repository for Maven2</name>
        <url>http://download.java.net/maven/2</url>
        <snapshots>
            <enabled>true</enabled>
        </snapshots>
        <releases>
            <enabled>true</enabled>
        </releases>
    </repository>
</repositories>

<distributionManagement>
</distributionManagement>


<build>
    <plugins>
        <plugin>
            <groupId>org.mortbay.jetty</groupId>
            <artifactId>maven-jetty-plugin</artifactId>
            <extensions>false</extensions>
            <inherited>false</inherited>
        </plugin>
        <!-- Build the JAR with dependencies -->
        <plugin>
            <artifactId>maven-assembly-plugin</artifactId>
            <configuration>
                <descriptorRefs>
                    <descriptorRef>jar-with-dependencies</descriptorRef>
                </descriptorRefs>
            </configuration>
        </plugin>
    </plugins>
    <!-- Build with Java 1.6 -->
    <pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>2.1</version>
                <configuration>
                    <source>1.6</source>
                    <target>1.6</target>
                    <showWarnings>true</showWarnings>
                </configuration>
            </plugin>
        </plugins>
    </pluginManagement>
</build>

3 个答案:

答案 0 :(得分:0)

Maven的存储库中不存在xProcRESTFramework。

http://search.maven.org/#search%7Cga%7C1%7CxProcRESTFramework

如果您可以找到xProcRESTFramework文件,则可以创建本地maven存储库并将其添加到您的maven项目中。

答案 1 :(得分:0)

据我所知,它不在公共回购中,但您可以从此处下载源代码:https://community.emc.com/docs/DOC-10494(需要注册)。

答案 2 :(得分:0)

根据我的说法添加这个依赖项:

<dependency> <groupId>com.emc.cto</groupId> <artifactId>XProcRESTFrameworkMVC</artifactId> <version>0.0.4-SNAPSHOT</version> </dependency>