Grokbase Groups Ant user June 2001
FAQ
Is it possible to use the same patternset I define for javac in the javadoc
task? Basically I want to produce documentation only for the classes that
were actually compiled.

Many thanks,

Jamie

Search Discussions

  • Jeremy Crosbie at Jun 27, 2001 at 6:13 pm
    Looking at the documentation I don't see how a patternset can be used with
    the javadoc task.

    One thing you can do rather than use a patternset is to copy only the
    sources you wish to compile into a directory separate from your controlled
    source. You can then point the Javadoc task to that directory, the result
    being hopefully what you are asking for. This results in only having to use
    a patterset once rather than twice (once for javac, another for javadoc).

    hth

    Jeremy Michael Crosbie
    Senior Software Engineer
    go2online.com
    go2Address: US.CA.IRV.GO2
    -----Original Message-----
    From: Jamie Lawrence
    Sent: Wednesday, June 27, 2001 10:29 AM
    To: 'ant-user@jakarta.apache.org'
    Subject: JavaDoc and patternsets


    Is it possible to use the same patternset I define for javac
    in the javadoc
    task? Basically I want to produce documentation only for the
    classes that
    were actually compiled.

    Many thanks,

    Jamie

  • Jamie Lawrence at Jun 27, 2001 at 6:18 pm
    Yeah, I'm kinda happy not to be doing that for javac, and didn't really want
    to start for javadoc. It does seem like a logical thing to want to do...
    perhaps it's time to peer closer into the ANT source code and see if it
    would be possible.

    Jamie
    -----Original Message-----
    From: Jeremy Crosbie
    Sent: 27 June 2001 19:12
    To: 'ant-user@jakarta.apache.org'
    Subject: RE: JavaDoc and patternsets


    Looking at the documentation I don't see how a patternset can
    be used with
    the javadoc task.

    One thing you can do rather than use a patternset is to copy only the
    sources you wish to compile into a directory separate from
    your controlled
    source. You can then point the Javadoc task to that
    directory, the result
    being hopefully what you are asking for. This results in only
    having to use
    a patterset once rather than twice (once for javac, another
    for javadoc).

    hth

    Jeremy Michael Crosbie
    Senior Software Engineer
    go2online.com
    go2Address: US.CA.IRV.GO2
    -----Original Message-----
    From: Jamie Lawrence
    Sent: Wednesday, June 27, 2001 10:29 AM
    To: 'ant-user@jakarta.apache.org'
    Subject: JavaDoc and patternsets


    Is it possible to use the same patternset I define for javac
    in the javadoc
    task? Basically I want to produce documentation only for the
    classes that
    were actually compiled.

    Many thanks,

    Jamie

  • Matt_conway at Jun 27, 2001 at 8:25 pm
    Only thing I could come up with was to use an embedded script. The
    reference "i2build.packages" is simply a patternset that has the packages
    I want to compile/javadoc, I include an example of it below.

    <patternset id="i2build.packages">
    <include name="com/i2/logistics/util"/>
    <include name="com/i2/logistics/util/test"/>
    <include name="com/i2/logistics/baz"/>
    </patternset>

    <target name="javadoc" depends="init"
    description="Creates the javadocs for all the
    sourcefiles for a project">
    <script language="javascript"> <![CDATA[
    var theTarget = javadoc;
    var theProject = theTarget.getProject();
    var docFileSet = theProject.createDataType("fileset");
    var packagePset =
    theProject.getReferences().get("i2build.packages");
    var packages = packagePset.getIncludePatterns(theProject);

    var docPackages = "";
    if(packages != null && packages.length > 0)
    {
    docPackages = packages[0].replace('/', '.').replace('\\',
    '.');
    for(var i = 1; i < packages.length; i++)
    {
    docPackages = docPackages + "," +
    packages[i].replace('/', '.').replace('\\', '.');
    }
    }
    theProject.setProperty("i2build.javadoc.packages", docPackages);

    ]]></script>
    <mkdir dir="${i2build.javadoc.outputdir}"/>
    <javadoc sourcepath="${i2build.srcroot}"
    destdir="${i2build.javadoc.outputdir}"
    classpathref="i2build.classpath"
    packagenames="${i2build.javadoc.packages}">
    </javadoc>
    </target>

    On 06/27/2001 01:29:21 PM Jamie Lawrence wrote:

    Is it possible to use the same patternset I define for javac in the javadoc
    task? Basically I want to produce documentation only for the classes that
    were actually compiled.

    Many thanks,

    Jamie


    (See attached file: Jamie Lawrence (E-mail).vcf) - Jamie Lawrence
    (E-mail).vcf
  • Stefan Bodewig at Jul 3, 2001 at 6:30 am

    Jamie Lawrence wrote:

    Is it possible to use the same patternset I define for javac in the
    javadoc task?
    No, sorry, you can't.

    I don't think it would be that hard to make the task support
    patternsets, but it doesn't do so yet.

    Stefan

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupuser @
categoriesant
postedJun 27, '01 at 5:28p
activeJul 3, '01 at 6:30a
posts5
users4
websiteant.apache.org

People

Translate

site design / logo © 2018 Grokbase