Bug #5557
openReplace hardcoded path separator with File.pathSeparator
Added by dhogan dhogan almost 13 years ago. Updated almost 13 years ago.
0%
Description
The org.kepler.build.project.Classpath class uses ":" rather than File.pathSeparator. It will display incorrectly on Windows without the fix.
Files
fix_classpath_char.diff (749 Bytes) fix_classpath_char.diff | dhogan dhogan, 11/29/2011 11:58 AM | ||
fix_classpath_char_v2.diff (3.56 KB) fix_classpath_char_v2.diff | dhogan dhogan, 11/29/2011 12:44 PM | ||
temp_fix_javadoc.diff (6.42 KB) temp_fix_javadoc.diff | dhogan dhogan, 01/09/2012 03:02 PM |
Updated by dhogan dhogan almost 13 years ago
Added a few more fixes. The importance should be bumped to normal because it's no longer just a cosmetic fix. When I run 'ant javadoc' on Windows, it fails immediately due to the path separator problem.
The attached patch fixes it with a few other changes: point to Oracle/JRE 1.6.x and fix a few typos. I'm getting 522 warnings and 3 errors when running javadoc against r29009/trunk on Windows. Could someone test on the platform that normally generates the javadoc to see if that's the same?
Updated by Derik Barseghian almost 13 years ago
Thanks for your contribution. Committed to trunk at r29119.
ant javadoc still needs testing on Windows, see comment#1, leaving open.
Updated by Derik Barseghian almost 13 years ago
On linux w/ java 1.6 I get 8 errors, 626 warnings, and the process ends with an IOException:
[create-javadoc] 8 errors
[create-javadoc] 626 warnings
[create-javadoc] IOException: java.io.IOException: Subprocess "javadoc -d /home/barseghian/dev2/kepler.modules/javadoc -sourcepath /home/barseghian/dev2/kepler.modules/sensor-view/src:/home/barseghian/dev2/kepler.modules/runtimemonitor/src:/home/barseghian/dev2/kepler.modules/reporting/src:/home/barseghian/dev2/kepler.modules/workflow-run-manager/src:/home/barseghian/dev2/kepler.modules/provenance/src:/home/barseghian/dev2/kepler.modules/tagging/src:/home/barseghian/dev2/kepler.modules/workflow-scheduler-gui/src:/home/barseghian/dev2/kepler.modules/outreach/src:/home/barseghian/dev2/kepler.modules/r/src:/home/barseghian/dev2/kepler.modules/loader/src:/home/barseghian/dev2/kepler.modules/actors/src:/home/barseghian/dev2/kepler.modules/opendap/src:/home/barseghian/dev2/kepler.modules/dataturbine/src:/home/barseghian/dev2/kepler.modules/ecogrid/src:/home/barseghian/dev2/kepler.modules/authentication-gui/src:/home/barseghian/dev2/kepler.modules/gui/src:/home/barseghian/dev2/kepler.modules/module-manager-gui/src:/home/barseghian/dev2/kepler.modules/authentication/src:/home/barseghian/dev2/kepler.modules/repository/src:/home/barseghian/dev2/kepler.modules/job/src:/home/barseghian/dev2/kepler.modules/io/src:/home/barseghian/dev2/kepler.modules/ssh/src:/home/barseghian/dev2/kepler.modules/data-handling/src:/home/barseghian/dev2/kepler.modules/sms/src:/home/barseghian/dev2/kepler.modules/component-library/src:/home/barseghian/dev2/kepler.modules/util/src:/home/barseghian/dev2/kepler.modules/event-state/src:/home/barseghian/dev2/kepler.modules/core/src:/home/barseghian/dev2/kepler.modules/common/src:/home/barseghian/dev2/kepler.modules/module-manager/src:/home/barseghian/dev2/kepler.modules/configuration-manager/src:/home/barseghian/dev2/kepler.modules/ptolemy/src:/home/barseghian/dev2/kepler.modules/build-area/src -classpath ptolemy/lib/guava.jar:/home/barseghian/dev2/kepler.modules/util/lib/jar/commons-logging-1.1.jar:/home/barseghian/dev2/kepler.modules/build-area/lib/ant.jar -tagletpath /home/barseghian/dev2/kepler.modules/build-area/target/kepler-tasks.jar -exclude ptdb:ptolemy.actor.lib.excel:ptolemy.actor.lib.io.comm:ptolemy.actor.lib.jai:ptolemy.actor.lib.jmf:ptolemy.actor.lib.joystick:ptolemy.actor.lib.jxta:ptolemy.actor.lib.logic.fuzzy:ptolemy.actor.lib.mail:ptolemy.actor.lib.opencv:ptolemy.actor.lib.reactable:ptolemy.actor.lib.x10:ptolemy.actor.ptalon:ptolemy.apps:ptolemy.backtrack:ptolemy.backtrack.eclipse:ptolemy.backtrack.test:ptolemy.cg:ptolemy.codegen:ptolemy.copernicus:ptolemy.distributed:ptolemy.domains.giotto:ptolemy.domains.gr:ptolemy.domains.gro:ptolemy.domains.jogl:ptolemy.domains.ptides:ptolemy.domains.ptinyos:ptolemy.domains.wireless:ptolemy.homer:ptolemy.moml.jxta:ptolemy.plot.servlet:ptolemy.vergil.basic.export.itextpdf:ptserver -subpackages org:com:util:ptolemy -link http://docs.oracle.com/javase/6/docs/api/ -linksource -author -breakiterator -use -quiet -tag Pt.AcceptedRating -tag Pt.ProposedRating -tag category.name -tag UserLevelDocumentation -tag created -tag entity.description -tag status -taglet org.kepler.build.RatingTaglet -J-Xmx768m" returned 1
On Windows XP w/ java 1.7, after 146 minutes I finish with 556676 errors, and the IOException error. Something's clearly very wrong here -- most of these errors seem to be to do w/ illegal characters. I disabled my system bell just to get through this, most/all of these errors cause a beep.
Updated by Christopher Brooks almost 13 years ago
I took a look at the javadoc problem under Linux and there were a number of problems.
- The -taglet parameter named org.kepler.build.RatingTaglet, but that class does not exist. I set -taglet to doc.doclets.RatingTaglet. I'm not about this.
- I was seeing errors like
java.lang.ClassCastException: com.sun.tools.javadoc.ClassDocImpl cannot be cast to com.sun.javadoc.AnnotationTypeDoc
The net said that this would occur if a class had annotations but the jar file
that contained the annotations was not included in the classpath to javadoc.
So, I added ptolemy/src/lib/junit-4.8.2.jar and ptolemy/src/lib/JUnitParams-0.3.0.jar to CreateJavadoc. I don't understand why I need to add these jar
files individually. When javadoc is run, the classpath should include
all the jar files for all the modules.
I'm still getting 2 errors and a message about the subprocess returning 1
under Linux.
Under Windows, I was getting lots of warnings and beeps as well. I believe the
problem is that the jar files are getting processed as source? Probably the
fix is to exclude the .jar files somehow.
I've found that javadoc does not work very well with large argument strings.
Ant has a way to use files instead of large argument strings.
I recently updated the javadoc command in ptII/build.xml. That file is created
by running (cd $PTII;./configure).
Updated by dhogan dhogan almost 13 years ago
This is a bit of a hack since it requires you to compile doc.doclets.RatingTaglet first. It does generate all of the javadoc though.
There were two main problems with the javadoc:
- Missing jars which caused packages warnings
- Fixed by using the compile classpath for every module involved - Taglet class not found and the wrong name
- Build doc.doclets.RatingTaglet in ptolemy now
- Point to Ptolemy's classes directory rather than kepler-tasks.jar
This patch isn't ideal because it's pointing to ptolemy classes that have to be built first. It's down to 0 errors and 397 warnings (all related to invalid javadoc tag usage or Oracle proprietary APIs).
I generated the javadocs by running "ant force-ptolemy compile ; ant javadoc".
Updated by Christopher Brooks almost 13 years ago
I folded in d. hogan's path (Thanks!)
One change that I made was that we now look for tools.jar by getting the java.home JDK property.
Unfortunately, I still can't run 'ant javadoc' under Windows, I get messages like:
--start--
Loading source files for package org.ecoinformatics.seek.R...
C:\Users\Administrator\src\kepler\r\target\classes\org\ecoinformatics\seek\R\RExpression2.class:62: error: unmappable character for encoding Cp1252
--end--
The above message can be reproduced by creating a file called "doit" that contains:
--start--
CLASSPATH="C:/Users/Administrator/src/kepler/r/target/classes" javadoc sourcepath "C:/Users/Administrators/src/kepler/r/src/" -subpackages org
--end-
and then starting up Cygwin and running
sh doit
This is with Windows Java 1.7.0:
$ java -version
java version "1.7.0"
Java(TM) SE Runtime Environment (build 1.7.0-b147)
Java HotSpot(TM) 64-Bit Server VM (build 21.0-b17, mixed mode)
If I use the javadoc from Java 1.6.0_26, the problem goes away.
I submitted a bug to Oracle, we will see if anything comes of it.