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 209698 - PROJECT with JUNIT4 TEST does not build after install of NB7.1
Summary: PROJECT with JUNIT4 TEST does not build after install of NB7.1
Status: RESOLVED DUPLICATE of bug 198739
Alias: None
Product: java
Classification: Unclassified
Component: Project (show other bugs)
Version: 7.1
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Tomas Zezula
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-18 08:44 UTC by ngx472
Modified: 2012-04-16 22:19 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ngx472 2012-03-18 08:44:54 UTC
It looks like that there are some flavors of this one (?), but they are in 
RESOLVED status.

This is the sequence of events:
* Migrated to new Computer (win 7, old compuiter was XP)
* installed NB7.1 fresh
* copied project 
* failed to compile JUNIT4 tests

Could not find any junit4 module on the web or in the dependencies

What I ended up doing and that cured the problem:
* copied 4 files into the respective places in the new computer
C:\Program Files\NetBeans 7.1\platform\config\Modules\org-netbeans-libs-junit4.xml
C:\Program Files\NetBeans 7.1\java\ant\lib\ant-junit4.jar
C:\Program Files\NetBeans 7.1\platform\update_tracking\org-netbeans-libs-junit4.xml
C:\Program Files\NetBeans 7.1\platform\modules\org-netbeans-libs-junit4.jar

I think that people really don't get what is so special about junit4 with regards to previous versions of junit

Thanks
Comment 1 ngx472 2012-04-14 10:23:36 UTC
I confirm after installing 7.1.1 fresh that junit does not work for a RCP module which does NOT include the Java cluster.
For me, it can't be a requirement that the RCP you build includes java just for the sake of being able to use JUNIT while developing this RCP, unless I miss something

This is all happening under Windows 7 (64)

NOTE 1: When deinstalling/installing junit plugin, there is a file access error warning (see below)

WARNING [org.netbeans.modules.autoupdate.services.InstallManager]: There is no write permission to write in target cluster java for JUnit[org.netbeans.modules.junitlib/1.1]
WARNING [org.netbeans.modules.autoupdate.services.InstallManager]: There is no write permission to write in target cluster java for JUnit[org.netbeans.modules.junitlib/1.1]
WARNING [org.netbeans.modules.autoupdate.services.InstallManager]: There is no write permission to write in target cluster extra for JUnit[org.netbeans.modules.junitlib/1.1]
INFO [org.netbeans.modules.autoupdate.services.InstallManager]: Declared target cluster java in JUnit[org.netbeans.modules.junitlib/1.1] wasn't found or was read only. Will be used C:\Users\Nicolas Gouteux\.netbeans\7.1.1
INFO [org.netbeans.modules.autoupdate.services.InstallSupportImpl]: Trying external URL: m2:/junit:junit:3.8.2:jar:javadoc
INFO [org.netbeans.modules.autoupdate.services.InstallSupportImpl]: Trying external URL: m2:/junit:junit:4.10:jar:javadoc
INFO [org.netbeans.modules.autoupdate.services.InstallSupportImpl]: Trying external URL: m2:/junit:junit:4.10:jar:sources
INFO [org.netbeans.modules.autoupdate.services.InstallSupportImpl]: Trying external URL: m2:/junit:junit:3.8.2:jar
INFO [org.netbeans.updater]: File installed C:\Users\Nicolas Gouteux\.netbeans\7.1.1\config\Modules\org-netbeans-modules-junitlib.xml@0
INFO [org.netbeans.updater]: File installed C:\Users\Nicolas Gouteux\.netbeans\7.1.1\docs\junit-3.8.2-api.zip@0
INFO [org.netbeans.updater]: File installed C:\Users\Nicolas Gouteux\.netbeans\7.1.1\docs\junit-4.10-javadoc.jar@0
INFO [org.netbeans.updater]: File installed C:\Users\Nicolas Gouteux\.netbeans\7.1.1\docs\junit-4.10-sources.jar@0
INFO [org.netbeans.updater]: File installed C:\Users\Nicolas Gouteux\.netbeans\7.1.1\modules\ext\junit-3.8.2.jar@0
INFO [org.netbeans.updater]: File installed C:\Users\Nicolas Gouteux\.netbeans\7.1.1\modules\org-netbeans-modules-junitlib.jar.pack.gz@0
INFO [org.netbeans.updater]: File installed C:\Users\Nicolas Gouteux\.netbeans\7.1.1\update_tracking\org-netbeans-modules-junitlib.xml@0
INFO [org.netbeans.core.startup.NbEvents]: Turning on modules:


NOTE 2: for the one having the same issue, there was a typo in the 4 files to copy mentionned in the previous post (missing ext directory). Anyway, the "copy " command from a cmd window wont work for permissions reasons. The best way to fix the issue is to open 2 windows, one of a previous NB installation where JUNIT worked and a new one, search for *junit* from the NB root, and copy paste all missing files. That's the way I did it
Comment 2 Jesse Glick 2012-04-16 22:19:17 UTC

*** This bug has been marked as a duplicate of bug 198739 ***