You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by David Scassa <ds...@journee.com> on 2001/09/10 06:42:09 UTC

Javadoc Question: classpathref solution?

<?xml version="1.0" encoding="UTF-8"?>
<project name="ProductName 1.0" default="build" basedir=".">
<path id="javadoc.path">
		<fileset dir="lib">
			<include name="*.jar"/>
		</fileset>
	</path>

... <target name="setBuildID"/> ...

 <target name="init" depends="setBuildNo">
		<taskdef name="if" classname="org.opennms.ant.If"/>
		<property file="buildVer.properties"/>
		<property name="buildID"
value="${ver}_${startTime}_${build}"/>
		<property name="commonSourceDir" value="src"/>
		<property name="platformSourceDir" value="${platform}/src"/>
		<property name="buildDir" value="${buildID}/${platform}"/>
		<property name="buildSourceDir" value="${buildDir}/src"/>
		<property name="srcTestDir"
value="${buildID}/${platform}/TestDir"/>
		<property name="distDir" value="${buildID}/${platform}"/>
		<property name="outputDir"
value="${buildID}/${platform}/classesMain"/>
		<property name="pubDir"
value="${buildID}/${platform}/docpublic"/>
		<property name="privDir"
value="${buildID}/${platform}/docprivate"/>
		<propertyfile file="buildID.properties">
			<entry key="buildID" value="${buildID}"/>
		</propertyfile>
		<propertyfile file="platform.properties">
			<entry key="platform" value="${platform}"/>
			<entry key="commonSourceDir"
value="${commonSourceDir}"/>
			<entry key="platformSourceDir"
value="${platformSourceDir}"/>
			<entry key="buildSourceDir"
value="${buildSourceDir}"/>
		</propertyfile>
	</target>

<target name="do_public_javadoc">
<javadoc sourcepath="${buildDir}/src" classpathref="javadoc.path"
packagenames="com.enter.specific.java.package.here,com.enter.individual.java
.file.here" destdir="${pubDir}" private="false" version="false"
author="false" nodeprecated="true"
link="http://java.sun.com/products/jdk/1.2/docs/api"
overview="externalOverview.html" use="true" doctitle="CompanyName
ProductName
v${ver} API Specification" windowtitle="ProductName v${ver}"
header="ProductName v${ver}" bottom="Copyright (C) 2000-2001 CompanyName.
All Rights Reserved."/>
</target>

I'm having difficulty trying to add the compiled output to the classpath for
the javadoc. I am building for both Websphere and Weblogic and am generating
a directory structure based on a generated buildID. My structure looks like
this (for each build).

D:\context\<buildID>\<platform>\src     	--> Where I point my
compiler.
D:\context\<buildID>\<platform>\classesMain 	--> Where the build output
is points to.

I would like to be able to add the
D:\context\<buildID>\<platform>\classesMain to the classpath of the JavaDoc
build, but have not as of yet figured out how to do it. I have tried the
following:

<path id="javadoc.path">
		<fileset dir="lib">
			<include name="*.jar"/>
		</fileset>
		<fileset dir="${buildID}/${platform}/classesMain">
			<include name="*.class"/>
		</fileset>
</path>

But, obviously the vars do not get resolved as they are not declared yet in
the order of operations.

Any ideas?

David Scassa