Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 53826 - generate <api type="import"..> automatically
generate <api type="import"..> automatically
Product: www
Classification: Unclassified
Component: Builds & Repositories
All All
: P2 (vote)
: 5.x
Assigned To: Jaroslav Tulach
: 55586 (view as bug list)
Depends on: 45179 57770
  Show dependency treegraph
Reported: 2005-01-21 17:11 UTC by Pavel Buzek
Modified: 2005-09-05 10:06 UTC (History)
1 user (show)

See Also:

Nearly done, just uses wrong API names and stability (30.46 KB, patch)
2005-07-12 19:01 UTC, Jaroslav Tulach
Details | Diff
Example of the generated dependencies (30.86 KB, text/html)
2005-07-12 19:02 UTC, Jaroslav Tulach

Note You need to log in before you can comment on or make changes to this bug.
Description Pavel Buzek 2005-01-21 17:11:21 UTC
Now that the is a way to generate deps.txt and
impl-deps.txt it would be great is the import type
of APIs could be generated automatically.
The would at least cover the java group. It is too
hard to maintain the arch docs and too easy to
forget (unlike the golden files which fire broken
build if not updated:-)
Comment 1 Jesse Glick 2005-01-26 18:33:45 UTC
Best to take impl deps from project.xml too.
Comment 2 Pavel Buzek 2005-02-28 13:33:11 UTC
*** Issue 55586 has been marked as a duplicate of this issue. ***
Comment 3 Jaroslav Tulach 2005-07-12 19:01:53 UTC
Created attachment 23067 [details]
Nearly done, just uses wrong API names and stability
Comment 4 Jaroslav Tulach 2005-07-12 19:02:55 UTC
Created attachment 23068 [details]
Example of the generated dependencies
Comment 5 Jaroslav Tulach 2005-07-12 19:06:11 UTC
I have 'nearly' finished the task. I am able to read the nbproject/project.xml  
file and use XSLT to generate <defaultanswer/> to any arch question. There are  
just two problems:  
1. the names of modules one depend on use code-name-base which is not right,  
they should be the human names like FilesystemsAPI, etc.  
2. the stability category is always 'devel', as I have not found a way how to 
get the right one 
So 'nearly' finished, but when really done, is uncertain.  
Comment 6 Jesse Glick 2005-07-12 22:53:16 UTC
Re. problem #1 - no suggestions beyond hardcoding a list of names, or computing
them from loc display name and passing them in to the XSLT script in an XML
document generated by some special Ant task. Note that names like
"FilesystemsAPI" are no longer used anywhere else in docs and could probably
just be removed; use either code name base, or localized module display name.

Re #2 - actually I could never figure out what stability level you were supposed
to be using anyway. How do you know? The module dependency is unambiguous, but
the arch files don't really make it clear what the differences are. Maybe you
could mechanically distinguish between and map to arch levels: use of public API
(spec version dep); use of friend API (target has <friend>s); use of impl dep.
Comment 7 Jaroslav Tulach 2005-07-13 09:02:00 UTC
I guess I solved the problem. I am generating a properties file with and with most stable  
java api for all modules with javadoc.   
arch-default-dep-nb.xml is then using this info from (in memory) modified  
project.xml to find the right api-name and api-category. Seems to work  
relatively well.  
cvs ci -m "#53826: project.xml is used to generate defaultanswer to dep-nb 
question. Just use <defaultanswer generate='here'/> to generate <api/> tags 
based on your dependencies in project.xml. Also I added new question 
arch-where that should point to WebCVS with sources (also has defaultanswer) 
and modified the overview template to not include the imported apis" 
Checking in nbbuild/antsrc/org/netbeans/nbbuild/Arch-api-questions.xml; 
/cvs/nbbuild/antsrc/org/netbeans/nbbuild/Arch-api-questions.xml,v  <--  
new revision: 1.35; previous revision: 1.34 
file: /cvs/nbbuild/antsrc/org/netbeans/nbbuild/Arch-default-arch-where.xsl,v 
Checking in nbbuild/antsrc/org/netbeans/nbbuild/Arch-default-arch-where.xsl; 
/cvs/nbbuild/antsrc/org/netbeans/nbbuild/Arch-default-arch-where.xsl,v  <--  
initial revision: 1.1 
RCS file: /cvs/nbbuild/antsrc/org/netbeans/nbbuild/Arch-default-dep-nb.xsl,v 
Checking in nbbuild/antsrc/org/netbeans/nbbuild/Arch-default-dep-nb.xsl; 
/cvs/nbbuild/antsrc/org/netbeans/nbbuild/Arch-default-dep-nb.xsl,v  <--  
initial revision: 1.1 
Checking in nbbuild/antsrc/org/netbeans/nbbuild/Arch.dtd; 
/cvs/nbbuild/antsrc/org/netbeans/nbbuild/Arch.dtd,v  <--  Arch.dtd 
new revision: 1.18; previous revision: 1.17 
Checking in nbbuild/antsrc/org/netbeans/nbbuild/; 
/cvs/nbbuild/antsrc/org/netbeans/nbbuild/,v  <-- 
new revision: 1.36; previous revision: 1.35 
Checking in nbbuild/antsrc/org/netbeans/nbbuild/Arch.xsl; 
/cvs/nbbuild/antsrc/org/netbeans/nbbuild/Arch.xsl,v  <--  Arch.xsl 
new revision: 1.26; previous revision: 1.25 
RCS file: /cvs/nbbuild/javadoctools/exportInterfaceProperties.xsl,v 
Checking in nbbuild/javadoctools/exportInterfaceProperties.xsl; 
/cvs/nbbuild/javadoctools/exportInterfaceProperties.xsl,v  <--  
initial revision: 1.1 
Checking in nbbuild/javadoctools/exportOverview.xsl; 
/cvs/nbbuild/javadoctools/exportOverview.xsl,v  <--  exportOverview.xsl 
new revision: 1.3; previous revision: 1.2 
Checking in nbbuild/javadoctools/template.xml; 
/cvs/nbbuild/javadoctools/template.xml,v  <--  template.xml 
new revision: 1.50; previous revision: 1.49 
Checking in nbbuild/templates/projectized.xml; 
/cvs/nbbuild/templates/projectized.xml,v  <--  projectized.xml 
new revision: 1.57; previous revision: 1.56 
Checking in nbbuild/test/unit/src/org/netbeans/nbbuild/; 
/cvs/nbbuild/test/unit/src/org/netbeans/nbbuild/,v  <-- 
new revision: 1.4; previous revision: 1.3 
Checking in ant/project/arch.xml; 
/cvs/ant/project/arch.xml,v  <--  arch.xml 
new revision: 1.11; previous revision: 1.10 
Checking in editor/build.xml; 
/cvs/editor/build.xml,v  <--  build.xml 
new revision: 1.58; previous revision: 1.57 

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo