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

Don Brutzman brutzman at nps.edu
Sun Dec 11 13:03:09 PST 2011


On 12/11/2011 12:16 PM, Alan Hudson wrote:
> On 12/11/2011 12:09 PM, Don Brutzman wrote:
>> [...]
>> As noted earlier, presence of a nbproject directory in the root of the trunk
>> doesn't interfere with anything else. So we should put it there,
>> avoiding the problems and encouraging further development of Xj3D.
> in general this argument can be made for every IDE. Which of course leads to a bunch of ide specific project files in each top level project.

yes i think that is where it is taking us, for each IDE that Xj3D
developers want supported

> I'm pretty certain I saw this pattern done for fastinfo set so I'd like to explore that first. Its on my laptop so I'll have to review that later.

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.  the nbproject directory must be found there
on checkout, plus the developer has to avoid the temptation to open
the project found in another sub-location (which netbeans will find
and offer immediately following checkout).  at that point they also
have to resist the temptation to simply create their own new project,
which is the natural alternative, but we have seen on this thread that
a new project fails because special configuration is needed in nbproject.

if they have gotten that far, the developer has to run something that
moves the project directory to the right place, which probably requires
manually running something correctly from outside their IDE, which is
unexpected and error prone.  furthermore, if they had created their own
project directory following checkout, it will either get messed up or
conflicted if trying to reconfigure the proper project hidden elsewhere.

once running, maintenance and versionitis become further problems as
noted in the previous message.

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:

> 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)

> 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.

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