This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 129619 - Extend Javadoc for JUnit while upgrading to the latest version
Summary: Extend Javadoc for JUnit while upgrading to the latest version
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: JUnit (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker with 2 votes (vote)
Assignee: Andrey Yamkovoy
URL:
Keywords:
Depends on:
Blocks: 108952
  Show dependency tree
 
Reported: 2008-03-09 16:42 UTC by ulfzibis
Modified: 2010-06-17 03:18 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
Complete javadoc including historical junit.* packages (306.77 KB, application/x-compressed)
2008-10-07 23:13 UTC, ulfzibis
Details
corrected timstamps (306.77 KB, application/x-compressed)
2008-10-10 15:35 UTC, ulfzibis
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ulfzibis 2008-03-09 16:42:23 UTC
JUnit 4.4 is released since 2007-07-18
Current bundled JUnit 4.1 is from 2006-04-27

At least please bundle the junit-4.4.jar instead of junit-4.1.jar.

Also nice: junit-4.4-api.zip and junit-4.4-src.jar
... see issue 108952, 98328
Comment 1 iluetkeb 2008-03-12 08:48:45 UTC
I'd like to support this request.

JUnit 4.4 added a couple of major new features, such as Matchers. Has been out for a while now, too.
Comment 2 ulfzibis 2008-03-12 17:32:34 UTC
> I'd like to support this request.
Where is your vote? ;-)

JUnit 4.2, 4.3 and 4.3.1 don't have new features, but a couple of bugfixes.

IMHO at least 4.3.1 should be shipped with NB 6.1.

Nice, if javadoc and sources (for debugging sessions) could be included.
Comment 3 dynamite 2008-03-31 10:52:38 UTC
I would have thought that something as core as this NetBeans would want to track.  Surely it wouldn't be too hard to add?
Comment 4 Marian Petras 2008-03-31 12:14:46 UTC
It is hard to add because of licensing issues: When I started working on this issue, I found that JUnit 4.4 is the first
JUnit version with an external library added/integrated. This library uses a different license than JUnit itself. In the
JUnit .jar file, only the license of the external library is present. The external library has not passed the license
check yet which is necessary for the permission to use it in NetBeans.

I am sorry, JUnit 4.4 will not be in NetBeans 6.1.
Comment 5 ulfzibis 2008-03-31 12:23:49 UTC
OK.
... but what's about version 4.3.1 ?
It includes some bug fixes since 4.1, but AFAIK no notable enhancements, so there should be no licence problems.

-Ulf
Comment 6 Marian Petras 2008-03-31 12:26:39 UTC
You can upgrade JUnit 4.1 to any newer version yourself:

1) Download JUnit 4.4 (e.g from http://sourceforge.net/project/showfiles.php?group_id=15278)
2) In NetBeans, open the Library Manager (main menu: Tools > Libraries).
3) In the list of libraries, select library "JUnit 4.1".
4) On the right side, in the Classpath panel:
    a) remove the existing JUnit 4.1 .jar file
                (by pressing the Remove button)
    b) add the downloaded JUnit 4.4 .jar file
                (press the Add JAR/Folder button and select the .jar from the file chooser)
5) Confirm the change by pressing the OK button.

The JUnit library will still be named "JUnit 4.1" but it will use the .jar file you just specified.
Comment 7 ulfzibis 2008-03-31 12:29:49 UTC
Nice, if javadoc and sources (for support of debugging sessions) could be included.
Comment 8 Marian Petras 2008-03-31 13:00:52 UTC
Sources and javadoc:
1) In the Library Manager, select the "JUnit 4.1" library.
2) On the right side, in the Sources panel, add the downloaded archive file containing JUnit 4.4 sources...
3) On the right side, in the Javadoc panel, add the downloaded archive file containing JUnit 4.4 javadoc...
Comment 9 ulfzibis 2008-03-31 14:37:40 UTC
Nice, if javadoc and sources (for support of debugging sessions) could be included.
Comment 10 ulfzibis 2008-03-31 15:21:22 UTC
Oops, sorry for double posting :-(

I know all this, so sorry for your effort, and thanks anyway.
I just claim for better out-of-the-box comfort.
And I also did not know, if the interface from NetBeans side is 100% compatible with 4.3.1 and/or 4.4.

BTW, I prefer smart links like nbinst://org.netbeans.modules.junit/docs/junit-4.1-api.zip, which can't be managed by the
library manager.
So I instead updated the junit*.xml files.
This avoids me from updating every new dev installation in EA state, except for rare cases if paths were renamed (e.g.
*\docs\ to *\modules\docs\, see: issue 129611)

Upgrade from 3.8.1 to 3.8.2 was also dealed from NetBeans side (which caused other little problems: issue 107936),
so why not do this for 4.3.1?
Comment 11 Marian Petras 2008-08-08 22:42:01 UTC
Will update to JUnit 4.5 (just released).
Comment 12 ulfzibis 2008-08-15 12:23:40 UTC
To include javadoc and sources (for support of debugging sessions) my junit-4.1.xml at
*\config\org-netbeans-api-project-libraries\Libraries is like this:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE library PUBLIC "-//NetBeans//DTD Library Declaration 1.0//EN"
"http://www.netbeans.org/dtds/library-declaration-1_0.dtd">
<library version="1.0">
	<name>junit_4</name>
	<type>j2se</type>
	<localizing-bundle>org.netbeans.modules.junit.Bundle</localizing-bundle>
	<volume>
		<type>classpath</type>
		<resource>jar:nbinst://org.netbeans.modules.junit/modules/ext/junit-4.1.jar!/</resource>
	</volume>
	<volume>
		<type>src</type>
		<resource>jar:nbinst://org.netbeans.modules.junit/sources/junit-4.1-src.jar!/</resource>
	</volume>
	<volume>
		<type>javadoc</type>
		<resource>jar:nbinst://org.netbeans.modules.junit/docs/junit-4.1-api.zip!/</resource>
	</volume>
	<volume>
		<type>maven-pom</type>
		<resource>http://repo1.maven.org/maven2/junit/junit/4.1/junit-4.1.pom</resource>
	</volume>
</library>
Comment 13 ulfzibis 2008-08-15 12:27:03 UTC
For better support of debugging sessions, can we have this out of the box ? ...
To include javadoc and sources, my junit-4.1.xml at *\config\org-netbeans-api-project-libraries\Libraries is like this:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE library PUBLIC "-//NetBeans//DTD Library Declaration 1.0//EN"
"http://www.netbeans.org/dtds/library-declaration-1_0.dtd">
<library version="1.0">
	<name>junit_4</name>
	<type>j2se</type>
	<localizing-bundle>org.netbeans.modules.junit.Bundle</localizing-bundle>
	<volume>
		<type>classpath</type>
		<resource>jar:nbinst://org.netbeans.modules.junit/modules/ext/junit-4.1.jar!/</resource>
	</volume>
	<volume>
		<type>src</type>
		<resource>jar:nbinst://org.netbeans.modules.junit/sources/junit-4.1-src.jar!/</resource>
	</volume>
	<volume>
		<type>javadoc</type>
		<resource>jar:nbinst://org.netbeans.modules.junit/docs/junit-4.1-api.zip!/</resource>
	</volume>
	<volume>
		<type>maven-pom</type>
		<resource>http://repo1.maven.org/maven2/junit/junit/4.1/junit-4.1.pom</resource>
	</volume>
</library>
Comment 14 Marian Petras 2008-08-18 20:10:41 UTC
I just updated the JUnit library to JUnit 4.5.

Changeset Id:
577f39da0d5
(http://hg.netbeans.org/main/rev/577f39da0d5c)

I will now consider addition of the Javadoc and sources.
Comment 15 Marian Petras 2008-08-19 11:21:55 UTC
I added the Javadoc for JUnit 4.5.

The request to add Javadoc for JUnit 4.x has been tracked as a separate issue #98328.

Changeset Id:
c832f900352
(http://hg.netbeans.org/main/rev/c832f900352c)
Comment 16 ulfzibis 2008-08-20 19:31:07 UTC
Can you please add junit-4.5-src.jar to ./platform9/sources/ ?
... and also junit-3.8.2-src.jar to .java2/sources/ ?

It's very helpful to have the sources of JUnit classes for debugging my test classes.

I always must do it manually in adding :
	<volume>
		<type>src</type>
		<resource>jar:nbinst://org.netbeans.modules.junit/sources/junit-x.y-src.jar!/</resource>
	</volume>
... to junit-x.y.xml in *\config\org-netbeans-api-project-libraries\Libraries
Comment 17 Marian Petras 2008-08-21 10:20:28 UTC
The update of the JUnit library is complete and the request for addition of JUnit sources is tracked as a separate issue
(#108952). Marked as FIXED.
Comment 18 ulfzibis 2008-08-21 10:41:15 UTC
OK, thanks for rectification and sorry about my additional request.
Comment 19 ulfzibis 2008-08-27 18:15:55 UTC
I've had a closer look into the implementation of the JUnit 4.5 library.

1) Why you put the javadoc and sources of 4.5-library to ./java2/* , and not to ./platform9/* ?

2) Why you put the sources to:
     ./java2/docs/
   and not to:
     ./java2/sources/   (or ./platform9/sources/)
   ?

3) Can you please provide the complete javadoc like it's provided on http://junit.org/junit/javadoc/4.5/ ?
   Not only the org.junit.* packages, but also the historical junit.* packages,
   as they are also included in junit-4.5.jar .
   Justification: When running into sources of these junit.* packages in debug session, user will have
   direct javadoc support (e.g. action "Show Javadoc").
Comment 20 Marian Petras 2008-08-28 10:53:09 UTC
1) Why you put the javadoc and sources of 4.5-library to ./java2/* , and not to ./platform9/* ?

Because the "java" cluster is the right place for the JUnit library. Ideally junit-4.5.jar should be placed in the
"java" cluster, too, but there are some technical reasons why it must be in the platform (at least for now). The javadoc
needn't be located in the platform so it is in the right place, i.e. in the "java" cluster.


2) Why you put the sources to: /java2/docs/ and not to /java2/sources/ (or /platform9/sources/) ?

Because I found other packed sources in docs but I found none in sources and it works as it is now. I might try to move
it to "sources" but I do not consider it that important now.
   

3) Can you please provide the complete javadoc like it's provided on http://junit.org/junit/javadoc/4.5/ ?
   Not only the org.junit.* packages, but also the historical junit.* packages,
   as they are also included in junit-4.5.jar .
   Justification: When running into sources of these junit.* packages in debug session, user will have
   direct javadoc support (e.g. action "Show Javadoc").

It would be ideal, of course. The reason is that Javadoc that is bundled in junit4.5.zip, released by junit.org, does
not contain the junit.framework.* packages. I known that browsable Javadoc published on junit.org contains these
packages. So I pointed out this difference in the SourceForge tracked for JUnit:
  http://sourceforge.net/tracker/index.php?func=detail&aid=1877429&group_id=15278&atid=115278.
I did not get any response since yesterday so I am going to ask again, this time on the JUnit mailing-list. But I do not
want to waste time by generating the Javadoc myself or by grabbing it from the browsable Javadoc pages.
Comment 21 ulfzibis 2008-10-07 23:13:30 UTC
Created attachment 71328 [details]
Complete javadoc including historical junit.* packages
Comment 22 ulfzibis 2008-10-07 23:17:19 UTC
I've grabbed it from the browsable Javadoc pages by help of HTTrack.

Not only the org.junit.* packages, but also the historical junit.* packages, are included in junit-4.5-api.zip .
Comment 23 ulfzibis 2008-10-10 15:35:51 UTC
Created attachment 71558 [details]
corrected timstamps
Comment 24 Alexei Mokeev 2009-03-05 13:50:07 UTC
Assigning issues from Michael to Andrey.
Comment 25 dynamite 2009-09-22 22:43:28 UTC
Isn't this issue resolved?  I seem to remember using JUnit 4.5 today :)
Comment 26 ulfzibis 2009-09-23 17:25:52 UTC
Only complete javadoc is missing.
Compare NetBeans included javadoc against http://junit.org/junit/javadoc/4.5/.

BTW: Current version is 4.7.
Comment 27 Alexei Mokeev 2010-05-05 08:05:25 UTC
The only remaining thing of this issue is Javadoc. Keeping it open to make sure that this will be touched while upgrading to the latest Junit version.
The current one at this moment is 4.8.2
Comment 28 Andrey Yamkovoy 2010-06-16 13:22:59 UTC
Fixed in the main (changeset: cae31efe734c)
Javadoc is generated from the junit sources (tag r4.8.2) including junit.* packages.
Comment 29 Quality Engineering 2010-06-17 03:18:58 UTC
Integrated into 'main-golden', will be available in build *201006170001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/cae31efe734c
User: Andrey Yamkovoy <kaktus@netbeans.org>
Log: Fix for #129619 - Extend Javadoc for JUnit while upgrading to the latest version (4.8.2)