首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >分发一个罐子

分发一个罐子
EN

Stack Overflow用户
提问于 2010-08-05 17:30:46
回答 3查看 1.2K关注 0票数 5

我正在分发一个jar文件以及相关的库、媒体、文档等。我想为linux用户创建一个简单的deb/rpm包,我还想将它分发给windows。什么是最好的方法去设置这个罐子来很好地玩借记卡?到目前为止,我看到的每个deb文件都是带有makefile的c/c++文件,这一点也没有帮助。如何打包我的java jar以供分发?

编辑如果能自动放置/ etc /project-name/sample.conf中的conf文件,或者/usr/中的图标等等,那就太好了。

EN

回答 3

Stack Overflow用户

回答已采纳

发布于 2010-08-05 18:06:42

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

  • http://www.mojohaus.org/deb-maven-plugin/using-deb.html
代码语言:javascript
复制
...
<plugin>
    <groupId>org.codehaus.mojo</groupId>
    <artifactId>deb-maven-plugin</artifactId>
    <configuration>
        <description>A test project</description>
        <maintainer>Tim OBrien &lt;tobrien@discursive.com&gt;</maintainer>
        <section>libs</section>
        <priority>optional</priority>     
        <architecture>all</architecture>
    </configuration>
    <executions>
        <execution>
            <goals>
                <goal>deb</goal>
            </goals>
        </execution>
    </executions>
</plugin>
...
票数 1
EN

Stack Overflow用户

发布于 2010-08-05 17:36:10

项目可能会使您更容易。

票数 1
EN

Stack Overflow用户

发布于 2012-11-02 00:25:39

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

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/3417451

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档