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 42798 - Define syntax of freeform project.xml
Summary: Define syntax of freeform project.xml
Status: RESOLVED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Ant (show other bugs)
Version: 4.x
Hardware: All All
: P1 blocker (vote)
Assignee: Jesse Glick
URL:
Keywords:
Depends on:
Blocks: 42682
  Show dependency tree
 
Reported: 2004-05-05 05:58 UTC by Jesse Glick
Modified: 2004-08-13 12:10 UTC (History)
4 users (show)

See Also:
Issue Type: TASK
Exception Reporter:


Attachments
Tentative example project.xml for a basic Java project (3.69 KB, text/xml)
2004-05-05 05:59 UTC, Jesse Glick
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2004-05-05 05:58:32 UTC
I am working on the freeform project.xml schema.
Attached is a rough draft of what a project.xml
might look like for a fairly simple Java project
(no web app support defined yet - later) which has

$projdir
+ build.xml - build script
+ build.properties - definitions of selected file
locations (any may be changed to not be inside
$projdir)
+ nbproject/project.xml - attached file
+ src/ - main Java source root; two libs in CP
+ antsrc/ - auxiliary source root for Ant task
definitions; ant.jar in CP
+ xdocs/ - some XML documentation
+ ${build.dir} = build/ - build dir
+ ${classes.dir} = build/classes/ - from src/
+ ${ant.classes.dir} = build/antclasses/ - from
antsrc/
+ ${main.jar} = build/something.jar - from
build/classes/ etc.
+ ${libdir} = lib/ - some libraries

where build.xml (assumed to be preexisting and not
edited specifically for this purpose) has targets
incl.

- dist: build & package everything
- clean: clean everything
- jar: compile sources & build the main JAR
- build-javadoc: build Javadoc
- generate-xdocs: process XML documentation

In the GUI you should be able to do the following
with this project:

- run Build or Clean & Build from main menu (or KB
shortcut, if the main project)

- run Generate Javadoc from main menu

- open project.xml from main menu

- use correct code completion etc. on src/ and
antsrc/; JDK 1.4 assertion syntax enabled

- see in logical view the following:
  + Main Sources [i.e. src/ as package tree]
  + Ant Task Sources [i.e. antsrc/ as pkg tree]
  + XML Documents [i.e. xdocs/ as plain tree]
  + build.xml
  + build.properties

- have a context menu in logical view with
  -> Set as Main Project [etc.]
  ---
  -> Build
  -> Clean
  -> Clean & Build
  -> Generate Javadoc
  -> Generate XDocs
  -> Create Distribution
  ---
  -> Properties

- see $projdir in Files tab (or any external
source roots if configured in build.properties)

- use Find in Files, CVS, todo scanning, etc. and
not search build/

- create new Java files in src/ or antsrc/ with
correct semantics

- create new XML files anywhere in the project
except build/

- use build/something.jar in the classpath of a
plain J2SE project and have the subproject build
work correctly

- update code completion from sources, use Fast
Open, etc.

- see popup Javadoc for classes from this project
if using build/something.jar from another project

- get hyperlinks to sources from Ant compilation
errors or stack traces

Of course this is just a sample, not intended to
display every possible feature; just to give an
idea of what you can configure and what you will get.

Clearly it would be possible to have a GUI that
created or edited project.xml for you, which will
be the goal someday, but I want to start with a
text format that

- is concise enough to reasonably edit by hand if
you have some examples & docs for it (and
eventually code completion, if the XML team ever
implements Schema-based editing; in the meantime,
can do error-checking using validation)

- some default values for cases where the IDE can
safely guess what you want, but not too magical

- corresponds with the information that the IDE
actually needs to know, at about the level of
detail it is really going to need in order to be
able to offer services accurately

Note that nearly all the Java-specific stuff is in
its own optional section, <java-data>, distinct
from the mandatory <general-data> section; the
intention is that you would be able to add a
<web-data> (or <j2ee-data>) section, and as an
implementation detail the module may at some point
let the project.xml parsing be extensible by
domain-specific plug-ins to ease maintenance.
Comment 1 Jesse Glick 2004-05-05 05:59:21 UTC
Created attachment 14703 [details]
Tentative example project.xml for a basic Java project
Comment 2 David Konecny 2004-05-13 13:35:28 UTC
Looks good to me! project.xml is pretty self-explaining.

Extensibility is the only thing I would left out - let's do "natures"
in next version. The freeform can hardcode some support for web, but I
would not spent much time on making it extensible so that j2ee could
use it too. It is out of scope for D.
Comment 3 Jesse Glick 2004-08-10 03:06:46 UTC
Essentially complete; no planned changes for D.