You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Stephane Chauvin <SC...@cardiff.com> on 2002/04/03 21:53:58 UTC

[SUBMIT] SerialVer and ReplaceSUID Tasks

I propose to add the org.apache.tools.ant.taskdefs.optional.serialver
package to support the serialver functionality.

There is 2 tasks:
-serialver: Echoes the serialVersionUID of a serializable class. This is
just a wrapping of the serialver executable provide by the JDK.
-replacesuid: Replace in a source file a token with the serialVersionUID.

Thanks,
Stephane


Re: [SUBMIT] SerialVer and ReplaceSUID Tasks

Posted by Magesh Umasankar <um...@apache.org>.
From: "Steve Loughran" <st...@iseran.com>


>
> ----- Original Message -----
> From: "Stephane Chauvin" <SC...@cardiff.com>
> To: <an...@jakarta.apache.org>
> Sent: Wednesday, April 03, 2002 11:53 AM
> Subject: [SUBMIT] SerialVer and ReplaceSUID Tasks
>
>
> > I propose to add the org.apache.tools.ant.taskdefs.optional.serialver
> > package to support the serialver functionality.
> >
> > There is 2 tasks:
> > -serialver: Echoes the serialVersionUID of a serializable class. This is
> > just a wrapping of the serialver executable provide by the JDK.
> > -replacesuid: Replace in a source file a token with the
serialVersionUID.
> >
>
> Interesting -and with unit tests too. nice.
>
> As usual, please file this in bugzilla with attachments and harangue the
> mailing list till its inclusion gets resolved one way or the other.
>
> A couple of questions
>
> 1. why do you exec serialver instead of using the java task? This can fork
> too, if that is needed, but it is better at classpath setup and the like.
>
> 2. Having code that edits java src insitu scares me. I would be happier
with
> something which generated a new copy of the file in a destination
> directory...we could then add version checking so that the work is only
done
> if the src file is newer than the one in the dest dir.
>
> would that work? How are you using the tasks in your build files.

IMO, the replacesuid is best represented as a
filterreader.

>
> -steve
>
>

Cheers,
Magesh

*************************************************
*  Politician: One who shakes your hand before  *
*  elections and your confidence after.         *
*************************************************



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


Re: [SUBMIT] SerialVer and ReplaceSUID Tasks

Posted by Steve Loughran <st...@iseran.com>.
----- Original Message -----
From: "Stephane Chauvin" <SC...@cardiff.com>
To: <an...@jakarta.apache.org>
Sent: Wednesday, April 03, 2002 11:53 AM
Subject: [SUBMIT] SerialVer and ReplaceSUID Tasks


> I propose to add the org.apache.tools.ant.taskdefs.optional.serialver
> package to support the serialver functionality.
>
> There is 2 tasks:
> -serialver: Echoes the serialVersionUID of a serializable class. This is
> just a wrapping of the serialver executable provide by the JDK.
> -replacesuid: Replace in a source file a token with the serialVersionUID.
>

Interesting -and with unit tests too. nice.

As usual, please file this in bugzilla with attachments and harangue the
mailing list till its inclusion gets resolved one way or the other.

A couple of questions

1. why do you exec serialver instead of using the java task? This can fork
too, if that is needed, but it is better at classpath setup and the like.

2. Having code that edits java src insitu scares me. I would be happier with
something which generated a new copy of the file in a destination
directory...we could then add version checking so that the work is only done
if the src file is newer than the one in the dest dir.

would that work? How are you using the tasks in your build files.

-steve


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