开发者

What percentage of the Java world uses Maven?

I'm building a tutorial for a Java library. There's a r开发者_StackOverflow中文版eally easy way to get started with Maven + Eclipse, but I'm not sure I can assume the majority of the people following this tutorial will have Maven setup. So, I'm curious, what percentage of the Java world uses Maven to manage their projects?


If your library is not Maven centric i will prefer a build-tool agnostic tutorial and optional an appendix that may explain usage of your library in the specific environments (Eclipse, Netbeans, Ant, Maven, ...).


Check this other Question on SO with ton of details. Personally I like maven which helps me getting started with any project almost immediately with minimum fuss. Also maven had plugins to work with all IDE's and makes life really easy.


Yes the documentation isn't the best. However, maven is a life saver when trying to manage a medium to large scale project. Because of this fact of my life, adding an open-source library that is not on maven is a pain.

The advantage of maven is not just the auto-download of dependencies, but it also imposes a standard directory structure which means that I can script against any library we use, internal or open-source.

The biggest Maven cons:

  • the very verbose command line.
  • documentation is cryptic and scattered
  • no universal help facility

That said, my solution to many of these issues is a custom ant build.xml file with my standard mvn goals defined as simpler ant targets ( which also allows me to add in my own help text.)

Update:

I really should say that the documentation is cryptic. Most of my experience with the typical maven developer about documentation is typified by this exchange:

Me: "I don't understand how to do this and the code behaves very badly."

Them: "The suggested way to resolve this is to download the DTD in question and use a catalog resolver. See the "catalogs" property in http://mojo.codehaus.org/xml-maven-plugin/validation.html" ( Their suggestion involves several pages with not a single complete example)

Me: Delightful. RTFM. It would make this plugin more useful for users who do not have the time to decrypt the manual if a good example was provided for this very common usecase.

Them: I am sorry, but I can't follow you. The documentation of the "catalog property" (see link above) clearly shows how to configure the use of a catalog file.

Me: As a friend of mine, smart guy, works at google, said this: "Yes, the documentation says exactly how to do if you know how to do it."


I see a lot of different (corporate) Java systems, and up to half of the systems use Maven. So, I'd say you can definitely use Maven in the example, as it is a rather common approach. Just make sure to provide a link to download the jar file as well. People using Ant or other build tools will know how what to do with it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜