> Figured it out from the code. You must use the > location attribute rather than the path attribute with > absolute paths. > > -Matt
Sorry, I'm so clumsy. I actually have been using location all along, but typed it wrong in the emails (trying to save a copy-and-paste step). I've been using:
<classpath>
<pathelement location="/Users/programs/jdk1.5.0/lib/tools.jar" />
</classpath>I apologize. So I still don't know why it isn't working.
I just now corrected it in the email below: I also added the complete target below that email.
-Doug
-------- Original Message -------- Subject: Re: Ant: pathelement relative? Date: Wed, 02 Feb 2005 13:23:29 -0800 From: Douglas Kramer <[EMAIL PROTECTED]> Reply-To: [EMAIL PROTECTED] To: [email protected]
Thanks, Matt. It does exists:
% ls -l /Users/programs/jdk1.5.0/lib/tools.jar -rw-r--r-- 1 dkramer nomad 6772816 Dec 18 17:26 /Users/programs/jdk1.5.0/lib/tools.jar
Three other things
- I'm running this ant script from within NetBeans (as a freeform script). I don't know if NetBeans would muck with the values.
- Also, the script used to work before I moved the target to an imported file (though I might have changed something else). The classpath is part of a debug target that is in a file build-import.xml that is imported by build.xml:
-------------- build.xml ------------------
<project name="MIF Doclet" default="jar" basedir=".">
...
<import file="./build-import.xml"/>
...
</project>
-------------------------------------------- ----------- build-import.xml ---------------
<project name="imported" basedir=".">
...
<classpath>
<pathelement location="/Users/programs/jdk1.5.0/lib/tools.jar" />
</classpath>
...
</project>
--------------------------------------------- Third, relative paths do work:
<classpath>
<pathelement
location="../../../../../../programs/jdk1.5.0/lib/tools.jar"/>
<pathelement location="../build/jar/mifdoclet.jar"/>
</classpath>
-Doug
These are set in a properties file:
JAVA_HOME=/Users/programs/jdk1.5.0
WORKDIR=/Users/dkramer/javadoc/mifdoclet/ws/dkramer-1.4b1-1.5b1
run.classpath.javadoc="${JAVA_HOME}/lib/tools.jar"Here's the actual target -- classpath is set twice identically:
<target name="debug" depends="properties, compile"
if="netbeans.home" description="Debug Project">
<nbjpdastart name="Debugging Doug's MIF Doclet"
addressproperty="jpda.address" transport="dt_socket">
<classpath>
<pathelement location="${run.classpath.javadoc}"/>
</classpath>
</nbjpdastart>
<java fork="true" classname="com.sun.tools.javadoc.Main">
<jvmarg value="-Xdebug"/>
<jvmarg value="-Xnoagent"/>
<jvmarg value="-Djava.compiler=none"/>
<jvmarg
value="-Xrunjdwp:transport=dt_socket,address=${jpda.address}"/>
<classpath>
<pathelement location="${run.classpath.javadoc}"/>
</classpath>
<arg line="-doclet com.sun.tools.doclets.formats.mif.MIFDoclet" />
<arg line="-batch fmbatch" />
<arg line="-print pdf" />
<arg line="-d ${WORKDIR}/sample/sample-commandline/sample-out" />
<arg line="-overviewtree" />
<arg line="-sourcepath ${WORKDIR}/sample/sample-src" />
<arg line="com.package1" /> <!--classpath refid="${run.classpath}"/-->
</java>
</target>(I have substantial reasons for calling javadoc by call java on java.Main)
-Doug
Matt Benson wrote:
--- Douglas Kramer <[EMAIL PROTECTED]> wrote:
SunOS (Solaris 9 on SPARC)
% uname -a SunOS dooghome 5.9 Generic_112233-12 sun4u sparc SUNW,Sun-Blade-100
Follow-up question -- how do I provide an absolute path
Assuming that /Users/programs/jdk1.5.0/lib/tools.jar exists, you are doing it correctly AFAICT.
-Matt
-Doug
Matt Benson wrote:
what OS are you running on?
-Matt
--- Douglas Kramer <[EMAIL PROTECTED]> wrote:
Does pathelement take only a relative path?
This page: http://ant.apache.org/manual/using.html#projects says:
<classpath> <pathelement path="${classpath}"/> <pathelement location="lib/helper.jar"/> </classpath>
The location attribute specifies a single file
or
directory relative to the project's base directory (or an absolute filename),
I assume "absolute filename" means "abolute path".
(What else could it mean?)
But when I try an abolute path, it fails:
<classpath> <pathelement path="/Users/programs/jdk1.5.0/lib/tools.jar" /> </classpath>
With this error:
dropping
/Users/dkramer/javadoc/mifdoclet/ws/dkramer-1.4b1-1.5b1/make/"/Users/programs/jdk1.5.0/lib/tools.jar"
from
path as it doesn't exist
where basedir is
/Users/dkramer/javadoc/mifdoclet/ws/dkramer-1.4b1-1.5b1/make/
Must pathelement be relative? What does "or absolute filename" mean?
-Doug
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
__________________________________ Do you Yahoo!? Yahoo! Mail - You care about security. So do we. http://promotions.yahoo.com/new_mail
---------------------------------------------------------------------
To unsubscribe, e-mail:
[EMAIL PROTECTED]
For additional commands, e-mail:
[EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
__________________________________ Do you Yahoo!? Yahoo! Mail - Find what you need with new enhanced search.
http://info.mail.yahoo.com/mail_250
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
