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 52135 - Build error when you declare public package in nbproject/project.xml
Summary: Build error when you declare public package in nbproject/project.xml
Status: RESOLVED FIXED
Alias: None
Product: www
Classification: Unclassified
Component: Builds & Repositories (show other bugs)
Version: 4.x
Hardware: PC Windows ME/2000
: P4 blocker (vote)
Assignee: Jesse Glick
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-12-07 00:58 UTC by Praveen Savur
Modified: 2015-12-29 06:55 UTC (History)
2 users (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 Praveen Savur 2004-12-07 00:58:04 UTC
From the documentation here,
http://www.netbeans.org/download/dev/javadoc/OpenAPIs/org/openide/doc-files/classpath.html

OpenIDE-Module-Public-Packages: org.netbeans.api.a.**

 can be used in your module's manifest.mf. 
-------------------------------------
However if I want to enter the same in
nbproject/project.xml it will look like

<public-packages>                      
  <package>org.netbeans.api.a.**</package>       
    </public-packages>


 This throwns a build error,
  Package name cannot contain '*' as
org.netbeans.nbbuild.ParseProjectXml$PublicPackage@1313906

----------------------
 If you look under  openide/manifest.mf again this
has been directly entered in manifest.mf

  Since it is recommended to specify such values
in  nbproject/project.xml, it would be desirable
for openide to follow this too.
Comment 1 Jesse Glick 2004-12-07 01:28:53 UTC
Use <subpackages>, not <package>, for this purpose in project.xml.

openide currently has a very complex build system, for historical
reasons, and should not be considered at all representative of a
"typical" module.
Comment 2 Praveen Savur 2004-12-07 18:37:30 UTC
1)  When I use <subpackages>, the following error is shown.   I am
looking into this (unless this is a bug in the build system).

Error:
 module.javadoc.packages cannot be set as <subpackages> do not work
for javadoc (was <subpackages>org.apache.batik</subpackages> tag in
D:\studio_builds\nb41_build2\nb_all\svg\batik\nbproject\project.xml).
Set the property by hand.

Code:
   <public-packages>                      
      <subpackages>org.apache.batik</subpackages>
   </public-packages>



2) I agree that openide can follow a different procedure since it is a
complex module. I had only mentioned this as an example in the bug
description.

   Amongst the modules in NB41 code base, only two  modules
(libs/www/template, scripting/bsf) use the <subpackages> tag. All
other modules (which are declaring multiple subpackages as public)
bypass project.xml and simply declare their public packages directly
in their manifest.mf
    Example: web\servletapi23, nb_all\vcsgeneric, xml\catalog, libs\xerces
    
Comment 3 Jesse Glick 2004-12-08 01:07:20 UTC
Re. 1 - yes, as the warning says you need to explicitly declare this
property in project.properties, else the master script cannot guess
which (if any) packages you want to send to Javadoc.

Re. 2 - none of the other modules you list have been projectized yet.
Comment 4 Rich Unger 2005-01-13 09:37:30 UTC
Comment on #1: Could we make this a non-fatal warning, with the
backoff behavior simply assuming no packages to be documented?  I've
been making a lot of "library modules" that provide things like JDOM,
JGraph, different apache commons libs, etc., and I'm constantly doing
things like
<subpackages>org.jdom</subpackages>
...and I obviously never want to generate javadocs for this stuff.

Is there any value to having this error be fatal to the building of a
module?
Comment 5 Jesse Glick 2005-01-13 23:06:18 UTC
You can just add

module.javadoc.packages=

to project.properties. But I can make it a warning instead.
Comment 6 Jesse Glick 2005-01-14 22:31:33 UTC
committed   * Up-To-Date  1.2        
libs/commons_logging/nbproject/project.properties
committed   * Up-To-Date  1.14       
nbbuild/antsrc/org/netbeans/nbbuild/ParseProjectXml.java
committed   * Up-To-Date  1.3        
scripting/bsf/nbproject/project.properties
Comment 7 Jesse Glick 2005-04-08 01:03:16 UTC
Also needed to disable
PublicPackagesInProjectizedXMLTest.testSubpackagesDoNotWorkForJavadocNow.