commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Curt Arnold <>
Subject Ant build script for source repackaging
Date Thu, 07 Feb 2008 10:33:12 GMT
I wrote an Ant script that attempts to mimic the platform specific  
script used to prepare the current candidates.  The script also can  
compare the candidate against the locally prepared source jars to  
determine any inconsistencies.

The script is available at 
.  Comparison between candidate and locally prepared versions requires  
diff and grep on the path.

To build sources jars:

$ ant -f commons_repackage.xml prepare-all

To compare candidate source jars with locally prepared source jars

$ ant -f commons_repackage.xml check-all

The -f commons_repackage.xml would be unnecessary if you renamed  
commons_repackage.xml to build.xml.

A normal comparison in the log will look like:

    [delete] Deleting: /Users/curta/ls-svn/commons/expanded/prepared/ 
    [delete] Deleting: /Users/curta/ls-svn/commons/expanded/candidate/ 
      [echo] Checking commons-beanutils-1.6:
      [echo] NOTICE: missing
      [echo] LICENSE: LICENSE.txt
      [exec]  * The Apache Software License, Version 1.1

If there are any differences between the locally prepared and  
candidate jars, the output of the diff command will appear after the  
"Checking commons..." line and before the "[echo] NOTICE:" line.

Observed differences:

These jars have LICENSE.txt, etc in the META-INF directory.  Not that  
that is a bad place to be, it just looks like these might have been  
prepared manually or by a slightly different script than the other  
source jars.

The diff reports that the LICENSE.txt, NOTICE.txt, and RELEASE- 
NOTES.txt  and license-header.txt are different, but it may just be  
different line feeds.  However, even if it is only line feeds, they  
should be consistent.

Possibly line feeds too, but also affects .java files.

Likely line feeds, just LICENSE.txt

The script was written to mimic the current candidate builds.   
However, it should be straightforward to modify to add missing NOTICE  
files and place LICENSE and NOTICE in META-INF if desired.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message