开发者

Why junit included part of hamcrest in binary, but not in source

Ok, so here is the place to download junit. Open any compiled jar - there is package org.hamcrest. Open any source-jar - there is no such package. It is very strange since sources for hamcrest are available at googlecode.

So, is there any r开发者_Python百科eason for this except making inconveniences to users?

How do you deal with this, or just don't look in these sources in your IDE?


So, is there any reason for this except making inconveniences to users?

Yea ... they do it to test your ability to use Google :-).

Seriously, Hamcrest is not part of JUnit, so I guess that Kent Beck doesn't see it as his role to distribute Hamcrest source code. But why are you asking us about this? Why don't you ask the man himself?

How do you deal with this ...

Personally, I use Maven and Eclipse with the m2eclipse plugin. M2eclipse automatically downloads source code on demand; e.g. the first time I navigate to a class.

Before that, I used to Google stuff and download by hand.

Be thankful that you can get all of these open source tools for free ... and that the source code is actually available.


Well, in a source jar you normally distribute your own sources, not that of others. The hamcrest classes being packaged in the binary jar seems just to be a convenience for the user not having to add the hamcrest jars to the classpath.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜