使用 Ivy 为 javadoc 指定 Web URL

发布于 2024-09-26 09:08:22 字数 844 浏览 1 评论 0原文

===更新=== 我将尝试重新措辞以引起更多回应。 Ivy 中的 javadoc 工件必须是 jar 或 zip 文件吗?或者我可以将工件定义为类似于 http://download 的 URL。 oracle.com/javase/1.5.0/docs/api/

我知道您可以将 Ivy 工件定义为从中下载文件的 url,但这不是我想要做的。

===原文===

我正在使用 Ivy 来处理由多个 Java 项目组成的大型项目的依赖关系管理。每个项目都由 Hudson 服务器编译并发布到 Ivy。每个项目都会构建运行时 jar、源 jar 和 javadoc jar。此外,Hudson 将 Javadoc 发布到 Web 服务器上的 URL。

我想要做的是在我的 ivy.xml 中为每个项目指定 Javadoc 在某个 URL 上发布。在我的依赖项目中,我想让 Ivy 解决该依赖关系并将其提供给 ant 中的 javadoc 命令作为子任务的参数。

最后,我想要以下内容:项目 A 在 http://someurl/A/javadoc 发布 javadoc 项目 B 依赖于 A,其 javadoc 发布于 http://someurl/B/javadoc 在项目 B 的 javadoc 中使用项目 A 中的类,我希望它链接到项目 A url。

有想法吗?

===Updated===
I'm going to try and re-word this to elicit more response. Does the javadoc artifact in Ivy have to be a jar or zip file? Or can I define the artifact to be a URL similar to http://download.oracle.com/javase/1.5.0/docs/api/?

I know you can define an Ivy artifact as a url to download the file from, but that is not what I want to do.

===Original===

I am using Ivy to handle dependency management for a large project that consists of multiple Java projects. Each project is compiled by a Hudson server and published to Ivy. Each project builds it runtime jar, a source jar, and a javadoc jar. Additionally, Hudson publishes the Javadoc to a URL on a web server.

What I want to do is specify in my ivy.xml for each project that the Javadoc is published at some URL. In my dependent projects I want to have Ivy resolve that dependency and provide it to a javadoc command in ant as arguments for the subtask.

In the end, I want the following: Project A has javadoc publish at http://someurl/A/javadoc
Project B is dependent on A and it's javadoc is published at http://someurl/B/javadoc
In Project B's javadoc where is use classes from Project A, I want it to link to the Project A url.

Ideas?

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

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

发布评论

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

评论(1

简单气质女生网名 2024-10-03 09:08:23

我想要做的是在我的
每个项目的 ivy.xml
Javadoc 在某个 URL 上发布。

我想您应该像任何其他工件一样发布 Javadoc,并在 ivysettings.xml 中指定搜索模式。例子:

<resolvers>
  <url name="repository">
    <ivy pattern="${repository.url}/[module]/ivy-[revision].xml" />
    <artifact pattern="${repository.url}/[module]/[artifact]-[revision].[ext]" />
    <artifact pattern="${repository.url}/[module]/[artifact]-javadoc-[revision].[ext]" />
  </filesystem>
</resolvers>

最后,我想要的是:
项目 A 的 javadoc 发布于
http://someurl/A/javadoc 项目 B 是
依赖于 A 并且它的 javadoc 是
发布于 http://someurl/B/javadoc
在项目 B 的 javadoc 中,使用在哪里
项目 A 的课程,我想要它
链接到项目 A url。

只要您将 Javadoc 作为工件发布,它就有自己的 ivy.xml,您可以在此处声明依赖项:

<ivy-module version="2.0">
    <info organisation="yourorg" module="moduleB-javadoc" />
    <dependencies>
        <dependency org="yourorg" name="moduleA-javadoc" />
    </dependencies>
</ivy-module>

在我的依赖项目中,我想要
让 Ivy 解决该依赖性并
将其提供给 ant 中的 javadoc 命令
作为子任务的参数。

将 javadoc 工件描述为依赖项目的 ivy.xml 中的依赖项,然后在 build.xml 中指定 ant javadoc 任务依赖于根据需要执行和操作 javadoc jar 的目标(有关详细信息,请参阅 ant 文档)。

What I want to do is specify in my
ivy.xml for each project that the
Javadoc is published at some URL.

I guess you should publish Javadoc's as any other artifacts and specify search pattern in ivysettings.xml. Example:

<resolvers>
  <url name="repository">
    <ivy pattern="${repository.url}/[module]/ivy-[revision].xml" />
    <artifact pattern="${repository.url}/[module]/[artifact]-[revision].[ext]" />
    <artifact pattern="${repository.url}/[module]/[artifact]-javadoc-[revision].[ext]" />
  </filesystem>
</resolvers>

In the end, I want the following:
Project A has javadoc publish at
http://someurl/A/javadoc Project B is
dependent on A and it's javadoc is
published at http://someurl/B/javadoc
In Project B's javadoc where is use
classes from Project A, I want it to
link to the Project A url.

As far as you publish Javadoc as artifact, it has its own ivy.xml and you can declare dependency here:

<ivy-module version="2.0">
    <info organisation="yourorg" module="moduleB-javadoc" />
    <dependencies>
        <dependency org="yourorg" name="moduleA-javadoc" />
    </dependencies>
</ivy-module>

In my dependent projects I want to
have Ivy resolve that dependency and
provide it to a javadoc command in ant
as arguments for the subtask.

Describe javadoc artifact as dependency in dependent project's ivy.xml, then specify in your build.xml that ant javadoc task depends on target that performs and manipulate javadoc jar as you want (for details see ant documentation).

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