创建一个Java库 [英] Creating a java library

查看:141
本文介绍了创建一个Java库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我工作的一个Java EE项目我创建了一些实用程序类。我喜欢他们打包到一个罐子,与社区共享。
 我有一个单独的包中的所有类。我使用NetBeans IDE。


  1. 什么是使包罐lib中的最简单的方法?结果
    (NetBeans的能处理所有给我吗?)


  2. 什么是我应该考虑的要点?


  3. 我在哪里可以分享它,然后其他的谁感兴趣的话可以使用它,并帮助我提高了吗?
    (GitHub上?谷歌code?SourceForge上?还是别的地方?)



解决方案

  1. 的NetBeans的可以的去做,但国际海事组织如果你释放一个开源项目,你应该有一个Maven,蚂蚁,或类似的构建脚本将其释放。


  2. 请工作?有不吸文档?有很大的测试和例子?请确保它不公用事业只是一个集合,它已经存在?不知道任何细节,因此很难确切地知道你想要什么。我怀疑尤其这部分题外话。


  3. 请它可以作为一个Maven的神器。放在GitHub上或其他地方的来源;谁在乎那里的生活来源,只要它会是比较长的寿命,它的方便吗?


While I was working on a Java EE project I created some utility classes. I like to package them to a Jar and share it with the community. I have all the classes in one separate package. I'm using Netbeans IDE.

  1. What is the easiest way to make that package a Jar lib?
    (Can NetBeans handle all it for me?)

  2. What are the important points I should consider?

  3. Where can I share it, then other who are interested can use it and help me improve it? (GitHub? Google Code? SourceForge? Or somewhere else? )

解决方案

  1. NetBeans can do it, but IMO if you're releasing an open-source project, you should release it with a Maven, Ant, or similar build script.

  2. Make it work? Have docs that don't suck? Have great tests and examples? Make sure it's not just another collection of utilities that already exist? Without knowing any details, it's difficult to know what exactly you want. I suspect this portion in particular is off-topic.

  3. Make it available as a Maven artifact. Put the source in GitHub or somewhere else; who cares where the source lives as long as it'll be relatively long-lived and it's easily accessible?

这篇关于创建一个Java库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆