You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Stefan Moebius <st...@yahoo.com> on 2002/05/03 18:31:18 UTC

Javadoc task

Hi. 

Just a humble request:
Could you support the "-subpackages" option from Javadoc 1.4?
The reason is that packagenames ending with ".java" are assumed to be
single source files since 1.4. This breaks, for example, the
Jakarta-Maven javadoc generation. Using "-subpackages
package1:package2..." get's this straight.

Basically, I have no idea why this works with javadoc1.3 - kind of
bug-turned-into-feature ;-), I guess.

Thanks for a great tool, anyway.
Stefan

=====
Stefan Moebius       <st...@yahoo.com> 
  Wurzener Str. 43        +49 351 8475827
  01127 Dresden           +49 172 8739617

__________________________________________________
Do You Yahoo!?
Yahoo! Health - your guide to health and wellness
http://health.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Javadoc task

Posted by Stefan Bodewig <bo...@apache.org>.
On Tue, 7 May 2002, Diane Holt <ho...@yahoo.com> wrote:

> Just FTR: The suggestion I offered also allowed using a single
> <javadoc> task.

Sorry.

Stefan

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Javadoc task

Posted by Diane Holt <ho...@yahoo.com>.
--- Stefan Bodewig <bo...@apache.org> wrote:
> This would require Ant 1.5, but you get away with a single javadoc
> task for JDK 1.1 through 1.4.

Just FTR: The suggestion I offered also allowed using a single <javadoc>
task.

Diane

=====
(holtdl@yahoo.com)



__________________________________________________
Do You Yahoo!?
Yahoo! Health - your guide to health and wellness
http://health.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Javadoc task

Posted by Stefan Bodewig <bo...@apache.org>.
On Fri, 3 May 2002, Stefan Moebius <st...@yahoo.com> wrote:

> The reason is that packagenames ending with ".java" are assumed to
> be single source files since 1.4.

Apart from Diane's suggestion, you could as well use packagesets and
filesets of Ant 1.5.  Use packagesets that explicitly exclude the
package named java and add a fileset that picks up all source files
that are inside this package.

This would require Ant 1.5, but you get away with a single javadoc
task for JDK 1.1 through 1.4.

Stefan

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


[SUBMIT] wrapper script to launch ant

Posted by Michael McCallum <mi...@snaphire.com>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I find myself with multiple versions of ant and wish to still call 'ant' for each project.

I also hate setting JAVA_HOME and ANT_HOME globally rather just using scripts to populate it.
Its like setting a global CLASSPATH, yuck.

so i created wrapper script that lets you choose the version of ant to run and stes the java version as well

it just stores the info in jakarta-antrc (in /etc/jakarta-antrc or ~/.jakarta-antrc or ./.jakarta-antrc )

- ----------------------------------------
change the ant version

rimu ~/src/jakarta-turbine-maven
$ ant -version
Ant version 1.4.1 compiled on October 11 2001

rimu ~/src/jakarta-turbine-maven
$ ant --change-ant-version
Found these versions for jakarta-ant:
  1) 1.3
  2) 1.4.1
  3) 1.5alpha
  4) current

Please choose a version: 3
Where would you like to save this setting?
 2) User ( /home/michael/.jakarta-antrc )
 3) Local ( /home/michael/src/jakarta-turbine-maven/.jakarta-antrc )
 4) Dont save.

Please choose save type: 3

rimu ~/src/jakarta-turbine-maven
$ ant -version
Apache Ant version 1.5alpha compiled on April 29 2002

- ------------------------------------------------
You can also change java versions:

rimu ~/src/jakarta-turbine-maven
$ ant --change-java-version
Found these versions for java:
  1) j2sdk1.3.1
  2) j2sdk1.4.0

Please choose a version: 2
Where would you like to save this setting?
 2) User ( /home/michael/.jakarta-antrc )
 3) Local ( /home/michael/src/jakarta-turbine-maven/.jakarta-antrc )
 4) Dont save.

Please choose save type: 3

Rather than the standard install mechanism of putting the ant script from the dist in your path this could be installed instead.

It does require and installation like so though

/usr/share/jakarta-ant/1.3/
/usr/share/jakarta-ant/1.4.1/

where /usr/share can be /usr/local/, /opt/

Michael




-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE81eLMiVyQAvn9zYsRAg1GAKCcNEjysAg2P/gk6xdC4G4FOG2AfACglXqs
JVA5YOSVFqI+maPNKDvNimQ=
=bl2+
-----END PGP SIGNATURE-----

Re: Javadoc task

Posted by Diane Holt <ho...@yahoo.com>.
--- Jose Alberto Fernandez <j_...@yahoo.com> wrote:
> Needing different build files is kind of extreme, don't you think? :-)
> All what you need is two diferent targets for doing the compile:

Actually, you don't even need to do that -- just set a property to hold
your additional parameter and reference that property in the
'additionalparam' attribute. For example:
  <target name="mkdoc">
    <condition property="javadoc.addparam" value="-subpackages pkg1:pkg2">
      <contains string="${java.version}" substring="1.4"/>
    </condition>
    <property name="javadoc.addparam" value=""/>
    <javadoc packagenames="..."
             additionalparam="${javadoc.addparam}"
             ...
    />
  </target>

Note: I'm not saying we shouldn't consider adding support for the 1.4
stuff at some point, just offering a solution for now, since Ant1.5 is
frozen for anything but bug fixes.

Diane

=====
(holtdl@yahoo.com)



__________________________________________________
Do You Yahoo!?
Yahoo! Health - your guide to health and wellness
http://health.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Javadoc task

Posted by Jose Alberto Fernandez <j_...@yahoo.com>.
From: "Stefan Moebius" <st...@yahoo.com>

> --- Diane Holt <ho...@yahoo.com> wrote:
> > --- Stefan Moebius <st...@yahoo.com> wrote:
> > > Just a humble request:
> > > Could you support the "-subpackages" option from Javadoc 1.4?
> > > The reason is that packagenames ending with ".java" are assumed to
> > be
> > > single source files since 1.4. This breaks, for example, the
> > > Jakarta-Maven javadoc generation. Using "-subpackages
> > > package1:package2..." get's this straight.
> > 
> > See:
> >   http://marc.theaimsgroup.com/?l=ant-user&m=101952493426201&w=2
>  
> Hi Diane, 
> Yes, I've considered this and I guess it works. The problem with this
> is that you need different build files depending on the JDK version you
> use.  And although I might use this for myself I don't think the Maven
> team would want to stick to this work-around.
> 

Needing different build files is kind of extreme, don't you think? :-)
All what you need is two diferent targets for doing the compile:

<target name='compile' depends='compile-1.3, cpmpile-1.4'/>

<target name='compile-1.3' unless='using-jdk14'>
 ...
</target>

<target name='compile-1.4' if='using-jdk14'>
...
</target>

This should solve your problem just fine.

Jose Alberto



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Javadoc task

Posted by Stefan Moebius <st...@yahoo.com>.
--- Diane Holt <ho...@yahoo.com> wrote:
> --- Stefan Moebius <st...@yahoo.com> wrote:
> > Just a humble request:
> > Could you support the "-subpackages" option from Javadoc 1.4?
> > The reason is that packagenames ending with ".java" are assumed to
> be
> > single source files since 1.4. This breaks, for example, the
> > Jakarta-Maven javadoc generation. Using "-subpackages
> > package1:package2..." get's this straight.
> 
> See:
>   http://marc.theaimsgroup.com/?l=ant-user&m=101952493426201&w=2
 
Hi Diane, 
Yes, I've considered this and I guess it works. The problem with this
is that you need different build files depending on the JDK version you
use.  And although I might use this for myself I don't think the Maven
team would want to stick to this work-around.

Stefan

=====
Stefan Moebius       <st...@yahoo.com> 
  Wurzener Str. 43        +49 351 8475827
  01127 Dresden           +49 172 8739617

__________________________________________________
Do You Yahoo!?
Yahoo! Health - your guide to health and wellness
http://health.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Javadoc task

Posted by Diane Holt <ho...@yahoo.com>.
--- Stefan Moebius <st...@yahoo.com> wrote:
> Just a humble request:
> Could you support the "-subpackages" option from Javadoc 1.4?
> The reason is that packagenames ending with ".java" are assumed to be
> single source files since 1.4. This breaks, for example, the
> Jakarta-Maven javadoc generation. Using "-subpackages
> package1:package2..." get's this straight.

See:
  http://marc.theaimsgroup.com/?l=ant-user&m=101952493426201&w=2

Diane

=====
(holtdl@yahoo.com)



__________________________________________________
Do You Yahoo!?
Yahoo! Health - your guide to health and wellness
http://health.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>