使用Maven下载drools源

发布于 2024-08-15 23:46:46 字数 271 浏览 7 评论 0原文

我是 Maven 和 drools 的新手,所以这可能是显而易见的......

我正在尝试使用 maven/eclipse 处理 drools 快照存储库。我希望在使用 maven 更新时能够链接sources/javadoc,但我不断收到类似以下内容的消息:

Can't download java-source for artifact org.drools:drools-process-task:5.1.0.20091223.193911- 177

知道我做错了什么吗?

I'm new to maven and drools, so this could be obvious...

I'm trying to work off of the drools snapshot repository using maven/eclipse. I'd like to be able to link the sources/javadoc when updating using maven but I keep getting messages similar to:

Can't download java-source for artifact org.drools:drools-process-task:5.1.0.20091223.193911-177

Any idea what I'm doing wrong?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

垂暮老矣 2024-08-22 23:46:46

我创建了一个简单的项目来重现此错误,并使用以下 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/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.mycompany</groupId>
  <artifactId>maven-drools-testcase</artifactId>
  <packaging>jar</packaging>
  <version>1.0-SNAPSHOT</version>
  <name>maven-drools-testcase</name>
  <url>http://maven.apache.org</url>
  <repositories>
    <repository>
      <id>repository.jboss.org</id>
      <url>http://repository.jboss.org/maven2</url>
      <releases>
        <enabled>true</enabled>
      </releases>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
    </repository>
    <repository>
      <id>snapshots.jboss.org</id>
      <url>http://snapshots.jboss.org/maven2</url>
      <releases>
        <enabled>false</enabled>
      </releases>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
    </repository>
  </repositories>
  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.7</version>
      <scope>test</scope>
    </dependency>
    <!--
    <dependency>
      <groupId>org.drools</groupId>
      <artifactId>drools-process-task</artifactId>
      <version>5.1.0.M1</version>
    </dependency>
    -->
    <dependency>
      <groupId>org.drools</groupId>
      <artifactId>drools-process-task</artifactId>
      <version>5.1.0.SNAPSHOT</version>
    </dependency>
  </dependencies>
</project>

我确实无法从 eclipse 下载源代码(位于存储库中!)。不过,这在 5.1.0.M1 版本中工作得很好,所以 JBoss 快照存储库一定有问题(也许是元数据?)。您应该在 Drools Jira 上提出问题。

更新:我做了更多测试,奇怪的是,如果我在 pom.xml 中添加以下依赖项:

<dependency>
  <groupId>org.drools</groupId>
  <artifactId>drools-process-task</artifactId>
  <version>5.1.0.SNAPSHOT</version>
  <classifier>sources</classifier>
</dependency>

源 JAR 会被正确下载。

正如我所说,我不知道问题的根本原因是什么,并且想知道这是否不是 m2eclipse 的问题。实际上,您应该首先尝试在 M2Eclipse Jira 中打开一个问题,看看他们是否检测到他们的代码或 JBoss Snapshot 存储库有问题(在这种情况下,我猜他们会将您发送到 Drools Jira)。

I created a simple project to reproduce this error and, using the following 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/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.mycompany</groupId>
  <artifactId>maven-drools-testcase</artifactId>
  <packaging>jar</packaging>
  <version>1.0-SNAPSHOT</version>
  <name>maven-drools-testcase</name>
  <url>http://maven.apache.org</url>
  <repositories>
    <repository>
      <id>repository.jboss.org</id>
      <url>http://repository.jboss.org/maven2</url>
      <releases>
        <enabled>true</enabled>
      </releases>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
    </repository>
    <repository>
      <id>snapshots.jboss.org</id>
      <url>http://snapshots.jboss.org/maven2</url>
      <releases>
        <enabled>false</enabled>
      </releases>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
    </repository>
  </repositories>
  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.7</version>
      <scope>test</scope>
    </dependency>
    <!--
    <dependency>
      <groupId>org.drools</groupId>
      <artifactId>drools-process-task</artifactId>
      <version>5.1.0.M1</version>
    </dependency>
    -->
    <dependency>
      <groupId>org.drools</groupId>
      <artifactId>drools-process-task</artifactId>
      <version>5.1.0.SNAPSHOT</version>
    </dependency>
  </dependencies>
</project>

I wasn't indeed able to download the sources from eclipse (which are in the repository!). This works fine with version 5.1.0.M1 though so there must be a problem with the JBoss Snapshots Repository (maybe the metadata?). You should open an issue at Drools Jira.

UPDATE: I did a bit more testing and, strangely, if I add the following dependency in the pom.xml:

<dependency>
  <groupId>org.drools</groupId>
  <artifactId>drools-process-task</artifactId>
  <version>5.1.0.SNAPSHOT</version>
  <classifier>sources</classifier>
</dependency>

The sources JAR gets properly downloaded.

As I said, I'm don't know exactly what is the root cause of the problem and wonder if this is not a problem with m2eclipse after all. Actually, you should maybe try to open an issue in M2Eclipse Jira first and see if they detect a problem with their code or with the JBoss Snapshot repository (in which case they will send you to Drools Jira I guess).

西瑶 2024-08-22 23:46:46

在 drools 5.2.0.Final(两年前发布)之前,maven poms 很混乱,源 jar 没有正确上传。该问题已在 5.2、5.3、5.4、5.5 中修复。

升级到 drools 5.5.0.Final。

Before drools 5.2.0.Final (released 2 years ago), the maven poms were a mess and source jars didn't get uploaded correctly. That's fixed in 5.2, 5.3, 5.4, 5.5, ...

Upgrade to drools 5.5.0.Final.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文