小编Fre*_* J.的帖子

本地Nexus存储库除了通过POM依赖的主jar外,还可以提取所有内容

我们的本地Nexus存储库在下载依赖项方面似乎不一致.它会拉下pom,甚至测试罐子......但不是我需要的主要实际罐子!因此,当我在我的中央(代理)存储库上浏览drools-compiler:org/drools/drools-compiler的索引时,我看到以下文件:

  • Drools的编译器,6.2.0.CR4-javadoc.jar
  • Drools的编译器,6.2.0.CR4-sources.jar
  • Drools的编译器,6.2.0.CR4试验sources.jar
  • Drools的编译器,6.2.0.CR4-tests.jar
  • Drools的编译器,6.2.0.CR4.pom

丢失的关键文件是:
drools-compiler-6.2.0.CR4.jar

当我浏览遥控器时,一切都在那里,包括关键的罐子.

当我运行mvn clean install(通过我的IDE STS 3.6.3)时,我最终看到以下错误消息:

无法在项目上执行目标:
无法解析项目的依赖项:
无法在org.drools中收集依赖项:drools-compiler:jar:6.2.0.CR4:
无法读取org.drools的工件描述符:drools-compiler:jar :6.2.0.CR4:
找不到org.jboss.dashboard-builder:dashboard-builder-bom:pom:6.2.0.CR4 in缓存在本地存储库中,直到nexus的更新间隔才会重新尝试解析已经过去或强制更新

还有很多其他依赖项已经被拆除了,存储库已经存在很长时间了(我没有设置它,只是现在处理!)... JBoss drools不是唯一的时间我看到这一点,这只是我现在最紧迫的问题.

我用Google搜索周围,一些职位看似相关的,(这一个几乎是相同的,但没有解决),但似乎无法找到一个解决方案.已在我们的本地Jboss和Central代理中设置远程索引下载.我已经尝试清除缓存,重建索引,在我的mvn命令中添加"-U"......但无济于事.我唯一能够构建我的项目的时候是我完全绕过我的本地存储库(空.m2/settings.xml)并直接从Central或JBoss public.有没有人对这里可能发生的错误有所了解?

更新:可能有用的更多细节:在我的settingx.xml(下面)中定义为镜像的存储库'nexus'是一个Group Repository,由(按此顺序)组成:
*Central(http://repo1.maven.org/maven2 /)
*JBoss public(http://repository.jboss.org/nexus/content/groups/public/)
*我们自己上传的本地罐子的回购......

按照@ Steve的建议,我比缺少的drools编译器文件挖得更深,发现org.jboss.dashboard-builder.dashboard-builder-bom ...在Central中不存在,有趣的是,它确实存在于JBoss中.我的理解是,通过使用Repos组,它应该查询列表中的下一个回购,如果找不到的话,对吧?任何建议最受赞赏!

settings.xml中:

  <mirrors>
    <mirror>
      <id>nexus</id>
      <mirrorOf>*</mirrorOf>
      <url>(local server)/nexus/content/groups/public</url>
    </mirror>    
  </mirrors>
  <profiles>
    <profile>
      <id>nexus</id>
      <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>
    <activeProfile>nexus</activeProfile>
  </activeProfiles>
Run Code Online (Sandbox Code Playgroud)

的pom.xml

<project xmlns="http://maven.apache.org/POM/4.0.0" …
Run Code Online (Sandbox Code Playgroud)

jboss drools nexus sonatype maven

4
推荐指数
1
解决办法
3552
查看次数

标签 统计

drools ×1

jboss ×1

maven ×1

nexus ×1

sonatype ×1