如何将svn中的代码编译成jar文件?
我发现 HTMLUnit 对我很有用,但文件太旧了。 所以我使用 svn co <a href="https://htmlunit.svn.sourceforge.net/svnroot/htmlunit" rel="nofollow">https://htmlunit.svn.sourceforge.net/svnroot/htmlunit htmlunit 来检查代码,但我不知道如何使用它们。
有人可以告诉我如何编译它们吗?
I found HTMLUnit is useful for me,but the files are too old.
So I use svn co https://htmlunit.svn.sourceforge.net/svnroot/htmlunit htmlunit
to check the code,But I don't know how to use them.
Is there somebody can tell me how to compile them?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
我发现你对 Subversion 知之甚少。
我可以将您链接到许多详细的文档,但让我们让它变得快速和简单:您下载的是整个存储库,其中包含大量冗余代码,主要是三个规范目录
分支
标签
主干
。为了获得可用的代码,您可以下载稳定(标签)版本或不稳定版本(主干)。 trunk 相对于 tag 的优点是它主要包含新功能,但标签通常很稳定。
尝试获取以下 URL: https://htmlunit.svn.sourceforge .net/svnroot/htmlunit/tags/HtmlUnit-2.8/,那么你可以尝试
ant
来构建(我不是Java专家,这个包有ant脚本吗?)I see you have very little knowledge of Subversion.
I could link you to lots of verbose documentation, but let's make it quick and easy: what you downloaded is the whole repository, containing lots of redundant code, majorly the three canonical directories
branches
tags
trunk
.In order to obtain usable code, you either download a stable (tag) version or unstable version (trunk). Advantage of trunk over tag is that it mostly contains new features, but tags are generally stable.
Try to get the following URL: https://htmlunit.svn.sourceforge.net/svnroot/htmlunit/tags/HtmlUnit-2.8/, then you could try
ant
to build (I'm no Java expert, does the package have an ant script?)您不需要自己从源代码中绕道构建它。最新版本是 2.8,可以从 Maven 中央存储库轻松获得。如果您没有使用依赖项管理器,只需从这里获取 jar:
http://repo2.maven.org/maven2/net/sourceforge/htmlunit/htmlunit/2.8/
You don't need to take the detour of building it from sources yourself. The latest version is 2.8, and it's readily available from the Maven central repository. If you're not using a dependency manager, just grab the jar from here:
http://repo2.maven.org/maven2/net/sourceforge/htmlunit/htmlunit/2.8/
查看有关如何获取和构建最新版本的项目说明!
http://htmlunit.sourceforge.net/gettingLatestCode.html。
Check out the projects instructions on how to get and build the latest version !
http://htmlunit.sourceforge.net/gettingLatestCode.html.
它似乎作为子模块的集合提供,每个子模块都有自己的构建系统(其中一些是 Maven,一些是 ant)。
最新版本可以追溯到 2010 年 8 月,似乎并非如此旧的,但如果您知道需要的改进仅在更高版本中可用,我建议您查看他们的 CI 服务器,它已经提供了最新版本的工件。
It seems it ships as a collection of submodules, each with its own build system (some of them maven, some ant).
The latest release dates back to August 2010, doesn't seem to be that old, but if you're aware of improvements you need which are available only in later versions I suggest you look at their CI server, which provides already the artifacts from the latest build.