[Source] troubleshooting Xj3D trunk build.xml, won't compile

Don Brutzman brutzman at nps.edu
Sun Dec 11 13:40:02 PST 2011


On 12/11/2011 1:22 PM, Alan Hudson wrote:
> On 12/11/2011 1:03 PM, Don Brutzman wrote:
>> very good, thanks
>>> Most of the IDE project files I've seen have hardcoded paths in this. Can you make netbeans only use relative paths so it works for others on checkout?
>> netbeans looks for the nbproject file in the root of a project.
>> you are also allowed to have nested projects, so netbeans finding it
>> elsewhere isn't workable.
> 
> is this a single directory called nbproject, a single file in the root or several files in the root?

single directory called nbproject
 
> If its directory off the root then I'm fine with that. Several files in the root the root directory is a non starter.

very good, thanks.  Terry, sounds like you can check your working nbproject in...

>> we have maintained an nbproject/ subdirectory in the NPS branch for quite
>> some time with good results and none of these collisions or difficulties.
>>
>>> I assume netbeans cannot generate the javacc parser code and other tasks that in the ant build file?
>> the trunk build.xml parsers task runs (and reruns) successfully to completion
>> with a few warnings:
> this is run from netbeans or from ant?

this  build.xml parsers task can be run from within Netbeans ant
or from command-line ant identically

>>> parsers:
>>> Java Compiler Compiler Version 5.0 (Parser Generator)
>>> Warning: Line 17, Column 5: Bad option name "OPTIMIZE_TOKEN_MANAGER". Option setting will be ignored.
>>> (type "javacc" with no arguments for help)
>>> Warning: Bad option "-OPTIMIZE_TOKEN_MANAGER:true" will be ignored.
>>> Reading from file C:\Xj3D.trunk\src\javacc\vrml\VRML97Relaxed.jj . . .
>>> File "TokenMgrError.java" does not exist. Will create one.
>>> File "ParseException.java" does not exist. Will create one.
>>> File "Token.java" does not exist. Will create one.
>>> File "JavaCharStream.java" does not exist. Will create one.
>>> Parser generated with 0 errors and 1 warnings.
>>> Java Compiler Compiler Version 5.0 (Parser Generator)
>>> (type "javacc" with no arguments for help)
>>> Warning: Bad option "-OPTIMIZE_TOKEN_MANAGER:true" will be ignored.
>>> Reading from file C:\Xj3D.trunk\src\javacc\vrml\VRML97Field.jj . . .
>>> Warning: TokenMgrError.java: File is obsolete. Please rename or delete this file so that a new one can be generated for you.
>>> Warning: ParseException.java: File is obsolete. Please rename or delete this file so that a new one can be generated for you.
>>> Parser generated with 0 errors and 4 warnings.
>>> Warning: Token.java: File is obsolete. Please rename or delete this file so that a new one can be generated for you.
>>> Warning: JavaCharStream.java: File is obsolete. Please rename or delete this file so that a new one can be generated for you.
>>> Java Compiler Compiler Version 5.0 (Parser Generator)
>>> (type "javacc" with no arguments for help)
>>> Warning: Bad option "-OPTIMIZE_TOKEN_MANAGER:true" will be ignored.
>>> Reading from file C:\Xj3D.trunk\src\javacc\x3d\X3DField.jj . . .
>>> File "TokenMgrError.java" does not exist. Will create one.
>>> File "ParseException.java" does not exist. Will create one.
>>> File "Token.java" does not exist. Will create one.
>>> File "JavaCharStream.java" does not exist. Will create one.
>>> Parser generated successfully.
>>> Java Compiler Compiler Version 5.0 (Parser Generator)
>>> (type "javacc" with no arguments for help)
>>> Warning: Bad option "-OPTIMIZE_TOKEN_MANAGER:true" will be ignored.
>>> Reading from file C:\Xj3D.trunk\src\javacc\x3d\X3DRelaxed.jj . . .
>>> Parser generated with 0 errors and 4 warnings.
>>> Warning: TokenMgrError.java: File is obsolete. Please rename or delete this file so that a new one can be generated for you.
>>> Warning: ParseException.java: File is obsolete. Please rename or delete this file so that a new one can be generated for you.
>>> Warning: Token.java: File is obsolete. Please rename or delete this file so that a new one can be generated for you.
>>> Warning: JavaCharStream.java: File is obsolete. Please rename or delete this file so that a new one can be generated for you.
>>> BUILD SUCCESSFUL (total time: 2 seconds)
> this looks fine.

very good

>>> So your going to need some documentation for net beans users to follow any right? Not sure that adding, copy netbeans from project from contrib/netbeans adds that much.
>> documentation is good; automation is good too. for all of the
>> reasons listed in this message and the previous one, i believe
>> it is important for nbproject/ to be located in root directory.
>>
>> if other IDEs like eclipse are also supported without collisions,
>> so much the better. encouraging easy development by more developers
>> is important and valuable to all of us.

> As long as someone supports them that's fine. That means following changes to the ant builds and making changes to IDE projects as needed.

certainly, that is expected and agreed as part of compatibly merging
the nps branch into the trunk.  might take us a while, but small steady
steps (and not breaking anything along the way) are the path to success.

> I'd like to consider build scripts in one of three modes. Primary(ant). Secondary(make system,IDE, root directory fine). Obsolete. If a system becomes unsupported then it will get moved to an archived location for someone else to pickup. Ie if a build system is not being maintained then its more confusing to users.

makes sense

Netbeans itself defaults to using ant, so that aligns with your
primary mode fully.  btw the netbeans nbproj/ directory contains
amplifying information about project name, paths, preferences etc.
and does not hold anything needed for command-line running of ant tasks.

> The primary build systems must be updated by anyone committing files in the system. If the primary build is broken that's bad news. The secondary systems will be maintained by their owners. If a secondary system gets too far behind then it will be made obsolete. No hard fast rules there but if we keep getting messages from people trying a build system and its not working then eventually it will get retired.
> 
> Does that process work for you?

makes perfect sense.  thanks Alan.

should we write it up on a wiki so others in the future understand also?
maybe a teleconference at some point would be a good way to initially
block out what a wiki of documentation might include.

all the best, Don
-- 
Don Brutzman  Naval Postgraduate School, Code USW/Br       brutzman at nps.edu
Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA   +1.831.656.2149
X3D graphics, virtual worlds, navy robotics http://faculty.nps.edu/brutzman



More information about the Source mailing list