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.
As discussed on nbdev here: http://www.netbeans.org/servlets/ReadMsg?msgId=598818&listName=nbdev And partially implemented here: http://www.netbeans.org/source/browse/core/bootstrap/src/org/netbeans/ProxyClassLoader.java.diff?r1=1.8.52.1&r2=1.8.52.2 it should be possible to load resources from the root package. A warning should be logged about the access.
another (later) discussion is here: http://openide.netbeans.org/servlets/ReadMsg?msgId=647701&listName=dev I have tried to search my local maven repository and figured that there are quite a lot of projects which put files in the default package. I haven't investigated how these files are accessed from the code though. projects include: Eg. checkstyle, latka, findbugs, isorelax, java2html, jcoverage, jdom, junit, junit-doclet, simian and all the maven plugins have multiple files in the default package. I'm not saying these would fail when attempting to use within Nb, however it is another minor argument for allowing it, (with warning logging as suggested)
entered a bug report against maven: http://jira.codehaus.org/secure/ViewIssue.jspa?key=MAVEN-1107
Created attachment 13475 [details] Patch against trunk 2004/02/17
Please review the attached patch. If there are no objections I plan to apply the patch ASAP. Thanks for your help.
Probably the message in printDefaultPackageWarning should link to http://www.netbeans.org/download/dev/javadoc/OpenAPIs/org/openide/doc-files/classpath.html (add an HTML anchor to jump right to the answer). Otherwise the patch looks good to me. o.n.c.modules tests pass with it, I hope?
Yes the tests pass (at least on my linux box). I have applied the (slightly modified according to your comments) patch to the trunk: Checking in openide/api/doc/org/openide/doc-files/classpath.html; /cvs/openide/api/doc/org/openide/doc-files/classpath.html,v <-- classpath.html new revision: 1.18; previous revision: 1.17 done Processing log script arguments... More commits to come... Checking in core/arch/arch-core-launcher.xml; /cvs/core/arch/arch-core-launcher.xml,v <-- arch-core-launcher.xml new revision: 1.16; previous revision: 1.15 done Processing log script arguments... More commits to come... Checking in core/bootstrap/src/org/netbeans/ProxyClassLoader.java; /cvs/core/bootstrap/src/org/netbeans/ProxyClassLoader.java,v <-- ProxyClassLoader.java new revision: 1.10; previous revision: 1.9 done
Thanks David, looks fine. Milos could you check whether the Maven bug was actually fixed correctly? It is marked fixed but the comment log is confusing, esp. http://jira.codehaus.org/secure/ViewIssue.jspa?key=MAVEN-1107#action_15677
I've checked the webcvs for maven and from what I found, I think they fixed it by prepending a slah to the file location. so instead of having 'driver.properties', yhey have '/driver.properties' now.. http://cvs.apache.org/viewcvs.cgi/maven/src/java/org/apache/maven/MavenConstants.java?r1=1.30.4.2&r2=1.30.4.3 If I find time over the weekend, I will try to bundle the maven jars as a module and see what happens. will keep you updated.
Well /driver.properties is of course no different (perhaps even wrong, for ClassLoader.getResource), so I guess they did not fix it at all.
closed
Integrated into 'main-golden', will be available in build *200908210201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/324595be51ad User: Jesse Glick <jglick@netbeans.org> Log: Removing default package warning (from #38368). Usually from 3rd-party code, usually impractical to remove now however poor an idea it was originally. (*.properties warnings were already suppressed, but generalizing to checkstyle.xml etc.)