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.
Created attachment 105698 [details] Screenshot attached... Product Version: NetBeans IDE 7.0 Beta 2 (Build 201102052128) Java: 1.6.0_22; Java HotSpot(TM) 64-Bit Server VM 17.1-b03-307 System: Mac OS X version 10.5.8 running on x86_64; MacRoman; en_US (nb) When I create j2se project then there is reference problem on this project. See attached screenshot... I understand that the JUnit libraries need to be installed to IDE but users might get confused. Especially those that are familiar with previous versions of NetBeans where no such approach is implemented.
I think this is higher priority and should be fixed for FCS - changing to P2. Any ideas how should this be solved?
Definitely stopper for FCS, if possible please fix it for Beta 2 as well.
Yes, I agree that P2 better fits to this issue so that I agree that for FCS it should be fixed. IMHO users need to be informed about the JUnit status during the creating of the project. I mean there should be an option to select whether the project should contain JUnit references or not. Yes option should contain some description about the need of additional JUnit binaries installation.
Sorry I have changed the priority by accident. I am changing back to P1.
Agree. The user should be informed about "junit situation" during the creating of the project. So redirecting to "projects/Generic Projects UI". Please redirect to the correct component if I'm wrong.
There was no plan to do anything in the New Project wizard. We have discussed adding the option to download JUnit and install it in the right place as an optional step in the installer. There will be no change for B2; simply download the JUnit lib and everything will be as before.
*** Bug 195182 has been marked as a duplicate of this bug. ***
Same with Java Web Application project. At least give users detailed explanation how to add JUnit library, with what jars in it.
(In reply to comment #8) > give users detailed explanation how to add JUnit library, with what jars in it Just click the Resolve button and this is handled automatically.
As to implementation: before bug #195041 is implemented this would be tricky although https://hg.netbeans.org/core-main/raw-file/default/maven.junit/src/org/netbeans/modules/maven/junit/libdef/JUnitLibraryDefiner.java shows that it is possible. After that, it should suffice to get org-netbeans-libs-junit4.nbm and org-netbeans-modules-junitlib.nbm from the Stable UC and just place them in the NBM download dir so that the IDE on first start will install them itself, just as if you had downloaded them using Plugin Manager in a prior IDE session. You just need to have prompted the user to accept the CPL in the installer wizard.
Rather then downloading the NBM and relying on updater.jar to unpack it later, I'd prefer direct install. Either using autoupdate.services APIs or via the AutoUpdate Ant task: <taskdef name="autoupdate" classpath="${netbeans}/harness/tasks.jar" classname="org.netbeans.nbbuild.AutoUpdate"/> <autoupdate installdir="${netbeans}" updatecenter="http://bits.netbeans.org/netbeans/6.9.2/fixes/latest/uc/catalog.xml.gz" force="false"> <modules includes=".*junit.*" clusters="platform[0-9]*"/> </autoupdate> The download of JUnit shall be available only in Java based distributions and they are known to have Ant inside the Java cluster. Thus the whole code simplifiest to invoking Ant from installer (either with premade build.xml or directly).
No beta2 stopper, planned for FCS - possible solutions, open issue and UI mockup will be summarized at http://wiki.netbeans.org/InstallerJUnit195123
Using Ant, just like installer, suffers from proxy correctness issues. New plan is to offer the download (from the junit module) on first start - simple enough, works with the IDE's regular proxy settings assuming #195190.
Implemented in trunk: core-main #89f1374440dc
(In reply to comment #14) > Implemented in trunk: core-main #89f1374440dc And in b2: releases #d487ebab0e7d
> New plan is to offer the download (from the junit module) on first start I think this is a temporary plan for beta 2 - for FCS, it would still be useful to have UI in the installer. As for the installer solution, I agree that relying on updater.jar to unpack it is not the cleanest way. But could we use the solution to write the module files to nb/config? I.e. the installer would write nb/config/org-netbeans-api-project-libraries/Libraries/junit-*.xml. This is a solution that we already use for registering bundled runtimes (GlassFish, Tomcat, JavaDB).
(In reply to comment #16) > could we use the solution to write the module > files to nb/config? I.e. the installer would write > nb/config/org-netbeans-api-project-libraries/Libraries/junit-*.xml For various reasons the modules (o.n.libs.junit4, o.n.m.junitlib) actually have to be installed, not just the library definitions. Of course the installer could create the appropriate files directly rather than going through AU: java/config/Modules/org-netbeans-modules-junitlib.xml java/docs/junit-3.8.2-api.zip java/docs/junit-3.8.2-src.jar java/docs/junit-4.8.2-api.zip java/docs/junit-4.8.2-src.jar java/modules/ext/junit-3.8.2.jar java/modules/org-netbeans-modules-junitlib.jar java/update_tracking/org-netbeans-modules-junitlib.xml platform/config/Modules/org-netbeans-libs-junit4.xml platform/modules/ext/junit-4.8.2.jar platform/modules/org-netbeans-libs-junit4.jar platform/update_tracking/org-netbeans-libs-junit4.xml However this is much more error-prone that just getting the NBMs from the Stable UC, since the installer would need to track every minor change in the content of these modules.
Note that I've updated the spec with JUnit installation added to New File wizard and Create JUnit Tests action. They are a supplemental solution to the IDE installer. See: http://wiki.netbeans.org/wiki/images/e/eb/Junit-license-issue.pdf
Integrated into 'main-golden', will be available in build *201102160501* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/89f1374440dc User: Jesse Glick <jglick@netbeans.org> Log: #195123: offer to install JUnit on first start.
I just installed netbeans-dev-201102210501 on Solaris. When I started NB, it offered me the option to download the Junit library. I clicked OK. However, the library didn't download and I got a stacktrace in the terminal window where I started NB: INFO [org.netbeans.modules.autoupdate.updateprovider.DownloadListener]: Reading URL http://deadlock.netbeans.org/hudson/job/nbms-and-javadoc/lastStableBuild/artifact/nbbuild/nbms/updates.xml.gz failed (java.io.IOException: Timeout while opening connection to http://deadlock.netbeans.org/hudson/job/nbms-and-javadoc/lastStableBuild/artifact/nbbuild/nbms/updates.xml.gz) INFO [org.netbeans.modules.junit.DownloadLibraryTask]: Could not install JUnit library java.util.concurrent.TimeoutException at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:228) at java.util.concurrent.FutureTask.get(FutureTask.java:91) at org.netbeans.modules.autoupdate.updateprovider.NetworkAccess$Task$1.run(NetworkAccess.java:97) Caused: java.io.IOException: Timeout while opening connection to http://deadlock.netbeans.org/hudson/job/nbms-and-javadoc/lastStableBuild/artifact/nbbuild/nbms/updates.xml.gz at org.netbeans.modules.autoupdate.updateprovider.NetworkAccess$Task$1.run(NetworkAccess.java:117) Caused: java.io.IOException: Timeout while opening connection to http://deadlock.netbeans.org/hudson/job/nbms-and-javadoc/lastStableBuild/artifact/nbbuild/nbms/updates.xml.gz at org.netbeans.modules.autoupdate.updateprovider.DownloadListener.notifyException(DownloadListener.java:103) at org.netbeans.modules.autoupdate.updateprovider.AutoupdateCatalogCache.copy(AutoupdateCatalogCache.java:262) at org.netbeans.modules.autoupdate.updateprovider.AutoupdateCatalogCache.writeCatalogToCache(AutoupdateCatalogCache.java:107) at org.netbeans.modules.autoupdate.updateprovider.AutoupdateCatalogProvider.refresh(AutoupdateCatalogProvider.java:137) at org.netbeans.modules.autoupdate.services.UpdateUnitProviderImpl.refresh(UpdateUnitProviderImpl.java:174) at org.netbeans.api.autoupdate.UpdateUnitProvider.refresh(UpdateUnitProvider.java:186) at org.netbeans.modules.junit.JUnitLibraryDownloader.download(JUnitLibraryDownloader.java:84) at org.netbeans.modules.junit.JUnitLibraryDownloader.access$000(JUnitLibraryDownloader.java:65) at org.netbeans.modules.junit.JUnitLibraryDownloader$1.call(JUnitLibraryDownloader.java:73) at org.netbeans.modules.junit.JUnitLibraryDownloader$1.call(JUnitLibraryDownloader.java:71) [catch] at org.netbeans.modules.junit.DownloadLibraryTask.perhapsDownload(DownloadLibraryTask.java:91) at org.netbeans.modules.junit.DownloadLibraryTask.run(DownloadLibraryTask.java:81) at org.netbeans.core.WarmUpSupport.run(WarmUpSupport.java:90) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1424) at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1968) So now what? For a couple of Java EE Tutorial examples we actually need this library.
> --- Comment #20 from chaase3<chaase3@netbeans.org> 2011-02-21 18:33:27 --- > INFO [org.netbeans.modules.autoupdate.updateprovider.DownloadListener]: Reading > URL > http://deadlock.netbeans.org/hudson/job/nbms-and-javadoc/lastStableBuild/artifact/nbbuild/nbms/updates.xml.gz > failed (java.io.IOException: Timeout while opening connection to Either a problem with Network Proxy Settings, or temporary inaccessibility of this UC. You can install JUnit manually using Tools|Plugins in this case.