简体   繁体   English

无法读取詹金斯Maven依赖项

[英]Cannot read jenkins maven dependencies

I am trying to get this demo application up and running on my machine: 我试图在我的机器上启动并运行此演示应用程序:

https://github.com/jenkinsci/cli-channel-demo https://github.com/jenkinsci/cli-channel-demo

I have this in my pom: 我在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>org.jenkins-ci.demo</groupId>
    <artifactId>cli-channel-demo</artifactId>
    <version>1.0-SNAPSHOT</version>
    <packaging>jar</packaging>

    <name>cli-channel-demo</name>
    <url>http://maven.apache.org</url>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>

    <repositories>
        <repository>
            <id>repo.jenkins-ci.org</id>
            <url>http://repo.jenkins-ci.org/public/</url>
        </repository>
    </repositories>


    <dependencies>

        <dependency>
            <groupId>org.jenkins-ci.main</groupId> 
            <artifactId>cli</artifactId>
            <version>1.415</version>
        </dependency>


        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
            <version>1.4</version>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>3.8.1</version>
            <scope>test</scope>
        </dependency>
    </dependencies>
</project>

But I get this error: 但是我得到这个错误:

The POM for org.jenkins-ci.main:cli:jar:1.415 is missing, no dependency information available

even though the dependency is located right here: 即使依赖项位于此处:

http://repo.jenkins-ci.org/public/org/jenkins-ci/main/cli/1.415/ http://repo.jenkins-ci.org/public/org/jenkins-ci/main/cli/1.415/

and I have this in my pom: 我的pom中有这个:

<repositories>
    <repository>
        <id>repo.jenkins-ci.org</id>
        <url>http://repo.jenkins-ci.org/public/</url>
    </repository>
</repositories>

Why can't maven resolve this dependency on my local machine? 为什么Maven无法解决对本地计算机的这种依赖性?

Worked fine on my machine. 在我的机器上工作正常。 I think you need to supply some more details of your error. 我认为您需要提供更多有关错误的详细信息。

Common issues are: 常见问题是:

  • Network proxy denying direct access to internet 网络代理拒绝直接访问Internet
  • Mirror configuration pointing builds at a local Maven repository 镜像配置指向在本地Maven存储库中构建

See the Maven settings reference for more details on how these issues could be fixed. 有关如何解决这些问题的更多详细信息,请参见Maven设置参考

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM