使用Maven进行项目分发

发布于 2024-07-14 05:36:39 字数 161 浏览 5 评论 0原文

我有一个通过发送大包来分发的项目。 我想知道是否有一种用户友好的方式使用 Maven 来分发项目的更新? 我需要类似于更新 Firefox 或 Acrobat Reader 等软件的功能。 检查存储库、警告用户更新、下载并重新配置。 一切都在一个简单且友好的界面中。 欢迎替代开源 Java 项目。

I have an Project that I distribute by sending out large packages. I'd like to know if there is a user friendly way of using Maven to distribute updates of the project? I'd need something like what is done for updating softwares like Firefox or Acrobat Reader. Check a respository, warn user of an update, download and reconfigure. All within a simple and friendly interface. Alternative open source java projects are welcome.

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

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

发布评论

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

评论(2

不及他 2024-07-21 05:36:39

如果您的项目是一个库:您需要设置一个公共maven存储库(或使用 Maven Central)。 这样,您的用户就可以通过更新其 POM 来获取最新版本的库。

如果您的项目是其他项目,您可以使用 Maven 存储库将包保存在一个位置,以便于您轻松部署(也方便其他人下载)。 接下来,您需要将软件指向该站点并偶尔下载文件“maven-metadata.xml”。 当您说“mvn deploy”时,Maven 将为您创建和管理此文件。 该文件包含最新版本号。

您所要做的就是下载这个小文件并检查它。 如果有新版本,请为您的用户打开一个对话框,以便他们决定下载它。 我建议提供“仅下载”和“下载并升级”作为单独的选项,因为用户喜欢在后台下载一段时间,然后在两个项目之间安装。 他们不喜欢唠叨的对话框(“新版本可用。现在下载并毁了你的一天吗?”...“我五分钟前就问了。现在下载!”...“无论如何都在下载。在您的硬盘上找到信用卡详细信息. 现在就购买您需要的其他重要软件。”;))。

If your project is a library: You need to set up a public maven repository (or use Maven Central). This way, your users can fetch the latest version of your library by updating their POM.

If your project is something else, you can use a Maven repository to keep the packages in a place for easy deployment for you (and easy download for everyone else). Next, you'll need to point your software to the site and download the file "maven-metadata.xml" once in a while. Maven will create and manage this file for you when you say "mvn deploy". The file contains the latest version numbers.

All you have to do is to download this small file and examine it. If there is a new version, open a dialog for your user so they can decide to download it. I suggest to offer "Only download" and "Download and upgrade" as separate options because users like to download some time in the background and then install between two projects. They don't like nagging dialogs ("New version available. Download and ruin your day now?" ... "I asked five minutes ago. Download now!" ... "Downloading anyway. Credit card details found on your hard drive. Selecting other important software you need. Purchasing now. Have a nice day!" ;) ).

遗弃M 2024-07-21 05:36:39

我不认为 Maven 有任何提供此功能的标准方法。 Maven 确实有“发布”和“部署”的概念,但这些不适用于您所描述的场景。

I don't think maven has any standard way of providing this functionality. Maven does have notion of "release" and "deploy", but these don't apply to the scenario you are describing.

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