Nexus没有通过Hudson下载工件

时间:2015-11-12 13:58:46

标签: maven hudson nexus

我正在尝试将Hudson与Nexus集成。 当我在不使用Nexus的情况下构建项目时,它的构建是成功的。

当我尝试使用Nexus构建它时,我收到以下构建错误:

<settings>
  <mirrors>
    <mirror>
      <!--This sends everything else to /public -->
      <id>nexus</id>
      <mirrorOf>*</mirrorOf>
      <url>http://localhost:8081/nexus/content/groups/public</url>
    </mirror>
  </mirrors>
  <profiles>
    <profile>
      <id>nexus</id>
      <!--Enable snapshots for the built in central repo to direct -->
      <!--all requests to nexus via the mirror -->
      <repositories>
        <repository>
          <id>central</id>
          <url>http://central</url>
          <releases><enabled>true</enabled></releases>
          <snapshots><enabled>true</enabled></snapshots>
        </repository>
      </repositories>
     <pluginRepositories>
        <pluginRepository>
          <id>central</id>
          <url>http://central</url>
          <releases><enabled>true</enabled></releases>
          <snapshots><enabled>true</enabled></snapshots>
        </pluginRepository>
      </pluginRepositories>
    </profile>
  </profiles>
  <activeProfiles>
    <!--make the profile active all the time -->
    <activeProfile>nexus</activeProfile>
  </activeProfiles>
  <servers>
    <server>
      <id>nexus</id>
      <username>admin</username>
      <password>admin123</password>
    </server>
  </servers>
</settings>

这是我在Hudson上配置的设置:

/* make the API call */
new GraphRequest(
    AccessToken.getCurrentAccessToken(),
    "/{object-id}/likes",
    null,
    HttpMethod.GET,
    new GraphRequest.Callback() {
        public void onCompleted(GraphResponse response) {
            /* handle the result */
        }
    }
).executeAsync();

我不知道为什么不从中央存储库下载到nexus公共存储库。

有人可以对此有所了解吗?

1 个答案:

答案 0 :(得分:1)

我终于解决了它。在尝试访问中央存储库时,它正在抛出SSL异常。

此异常自动阻止我访问。

我去了Central Repository&gt;配置并将远程存储位置URL更改为:http://repo.maven.apache.org/maven2/并右键单击Central并单击允许代理。

之后它就像一个魅力。

我希望这对某人有所帮助,因为我失去了差不多两天的时间。

编辑(2015年11月19日):

如果您使用RedHat / CentOS运行openjdk,则会出现阻止通过SSL访问的错误,正如@rseddon在评论部分所指出的那样。解决方法如下:https://issues.sonatype.org/browse/NEXUS-7999?focusedCommentId=306680&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-306680

如果你赶时间,那就是我用过的那个:

将以下行添加到$ {JAVA_HOME} /jre/lib/security/java.security:

jdk.tls.disabledAlgorithms = EC,ECDHE,ECDH

现在我可以在我的Central Repo上使用https链接。

相关问题