分发一个罐子

发布于 2024-09-12 21:15:37 字数 288 浏览 0 评论 0原文

我正在分发一个 jar 文件,以及相关的库、媒体、文档等。我想为 Linux 用户创建一个简单的 deb/rpm 包,并且我还想为 Windows 分发它。设置 jar 以便与 d​​ebs 良好配合的最佳方法是什么?到目前为止,我看过的每个 deb 文件都是带有 makefile 的 c/c++,这根本没有帮助。如何打包我的 java jar 以便分发?

编辑如果这可以自动将conf文件放置在/etc/project-name/sample.conf中,将图标放置在/usr/share中等,那就太好了。

I'm distributing a jar file, with associated libraries, media, documentation, etc. I would like to create a simple deb/rpm package for linux users, and I would also like to distribute this for windows. What is the best way to go about setting up the jar to play nicely with debs? Every deb file I've looked at so far has been c/c++ with a makefile, which isn't at all helpful. How do I package my java jar for distribution?

Edit It would be nice if this could automate the placement of conf files in /etc/project-name/sample.conf, icons in /usr/share, etc.

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

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

发布评论

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

评论(3

过去的过去 2024-09-19 21:15:37

Maven 2 DEB 插件可用于从任何可打包为 JAR 的项目生成 Debian 包。 Debian 软件包可用于大多数基于 Debian 的 Linux 发行版,包括 Ubuntu 和 Knoppix。


...
<plugin>
    <groupId>org.codehaus.mojo</groupId>
    <artifactId>deb-maven-plugin</artifactId>
    <configuration>
        <description>A test project</description>
        <maintainer>Tim OBrien <[email protected]></maintainer>
        <section>libs</section>
        <priority>optional</priority>     
        <architecture>all</architecture>
    </configuration>
    <executions>
        <execution>
            <goals>
                <goal>deb</goal>
            </goals>
        </execution>
    </executions>
</plugin>
...

The Maven 2 DEB Plugin can be used to produce a Debian package from any project that can be packaged as a JAR. Debian packages can be used on most Debian-based Linux Disributions including Ubuntu and Knoppix.


...
<plugin>
    <groupId>org.codehaus.mojo</groupId>
    <artifactId>deb-maven-plugin</artifactId>
    <configuration>
        <description>A test project</description>
        <maintainer>Tim OBrien <[email protected]></maintainer>
        <section>libs</section>
        <priority>optional</priority>     
        <architecture>all</architecture>
    </configuration>
    <executions>
        <execution>
            <goals>
                <goal>deb</goal>
            </goals>
        </execution>
    </executions>
</plugin>
...
岁月苍老的讽刺 2024-09-19 21:15:37

这个项目可能会让您更轻松。

This project might make it easier for you.

骄傲 2024-09-19 21:15:37

要将 Java 应用程序打包为 Debian 包,我建议使用 jdeb。它非常灵活,并且与 Maven 和 Ant 集成良好。

For packaging your Java application as a Debian package I would recommend jdeb. It's very flexible and integrates well with Maven and Ant.

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