Fre*_* J. 4 jboss drools nexus sonatype maven
我们的本地Nexus存储库在下载依赖项方面似乎不一致.它会拉下pom,甚至测试罐子......但不是我需要的主要实际罐子!因此,当我在我的中央(代理)存储库上浏览drools-compiler:org/drools/drools-compiler的索引时,我看到以下文件:
丢失的关键文件是:
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" 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>com.mypackage.here</groupId>
<artifactId>TaskLaunchManager</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>TaskLaunchManager</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<app.name>task-launch-manager</app.name>
<log4j.version>1.2.16</log4j.version>
<junit.version>4.8.1</junit.version>
<drools.version>6.2.0.CR4</drools.version>
<slf4j.version>1.7.9</slf4j.version>
</properties>
<!-- Drools Maven BOM (Bill of Materials) -->
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.drools</groupId>
<artifactId>drools-bom</artifactId>
<type>pom</type>
<version>${drools.version}</version>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.kie</groupId>
<artifactId>kie-bom</artifactId>
<type>pom</type>
<version>${drools.version}</version>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<!-- Required dependencies -->
<dependencies>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>${log4j.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>${slf4j.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.drools</groupId>
<artifactId>drools-compiler</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.kie</groupId>
<artifactId>kie-api</artifactId>
</dependency>
<dependency>
<groupId>org.kie</groupId>
<artifactId>kie-internal</artifactId>
</dependency>
<dependency>
<groupId>org.drools</groupId>
<artifactId>drools-core</artifactId>
</dependency>
<dependency>
<groupId>org.drools</groupId>
<artifactId>drools-decisiontables</artifactId>
</dependency>
</dependencies>
</project>
Run Code Online (Sandbox Code Playgroud)
好的,问题解决了!它需要几个步骤,其中一些在stackoverflow上的其他地方被提及并且已经尝试过失败,但这个顺序真的很重要:
mvn clean install -U
归档时间: |
|
查看次数: |
3552 次 |
最近记录: |