First you have to decide what you want to have inside your sourcetree:
sources
with or withoug license headers.
a) with license header
Like in the Ant project only source files with a valid license header are
allowed
in the source tree (only a few exceptions in the sandbox). We use
Checkstyle to
find sources whithout the required header.
b) without license header
Provide the license file on a common place (e.g. <root>/license.txt) and
apply that
to the files while creating the distribution. (using ConcatFilter like
you have done).
Because the files for the distro are NOT the same as in the SCM, you are
working with
temp files. Your scenario would be something like that:
collect files: copy with concatfilter from src dir to temp dir (e.g.
build/src)
compile: inside temp dir (e.g. build/classes, build/testcases)
test: using junit
javadoc: using javadoc inside temp dir (e.g. build/api)
jar: using jar
distro: using zip including the jar, (temp)src and api
Jan
> -----Ursprüngliche Nachricht-----
> Von: Kannan V [mailto:ammas_kannan@mail.com]
> Gesendet am: Freitag, 17. September 2004 09:15
> An: Ant Users List
> Betreff: Re: AW: Prepend licence information to every source file
>
> Hello:
>
> I was not successfull to write a target for prepending the
> licence information.
> I was able to do the task by copying all the files to a temp
> location and prepend
> the licence information using concat filter and then copying
> back to original location.
> Can u pls guide how to write a target that will scan a
> direcotry and prepend the licence
> information in a text file to every *.java file ?
>
> thanks and regards,
>
> -- Kannan.
> --
> ___________________________________________________________
> Sign-up for Ads Free at Mail.com
> http://promo.mail.com/adsfreejump.htm
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
|