Name | Modified | Size | Downloads / Week |
---|---|---|---|
Parent folder | |||
what_is_new.txt | 2010-12-03 | 117 Bytes | |
header-processor.src.zip | 2010-12-03 | 16.8 kB | |
readme.txt | 2010-12-03 | 2.5 kB | |
header-processor.jar | 2010-12-03 | 16.7 kB | |
Totals: 4 Items | 36.1 kB | 0 |
=== Description === Processes files in local copy of SVN repository for exchanging file headers (adding new or replacing already existing) according information in input cvs file. Header template may contain placeholder (currently supports only YEAR) to be replaced with particular value before inserting. Tool process following type of files: 1) Java sources (file name ends with ".java") - Removing all already existing strings before package definition - Inserting header from template (with replacing placeholder if any) 2) XML sources (file name ends with ".xml", ".xsd", ".sps" or ".xslt") If file name is equal "build.xml" then header inserting just in first line For all another xml files tool looking for xml definition mark (<?xml> <?>) and inserting header comment in next string 3) Properties files (file name ends with ".properties") - Inserting header from template (with replacing placeholder if any) Tool log all actions in two output files: 1) log.txt Contains all messages (e.g. processed files and exchanged headers) 2) error.txt Contains only error messages (e.g. Cannot find package definition) === How to launch === Arguments: - Path to SVN local copy root - Path to cvs file (list of files in repository and revision years) - Path to header template directory (files with header templates by type) - Path to log file directory (log.txt, error.txt) - Action type to do: run (process files with exchanging headers) or analyze only (writing logs) === Repository structure file === Tool works on local copy of cvn repository, but not by just iterating of all available files. List of files to process should be defined in input csv file (each line contains relative path to file). This file as well may contain values to be inserted in header instead of placeholder. Note: in current implementation tool supports only one mandatory placeholder (YEAR). Repository structure file may be generated with tool RevisionExtractor === How to change template === Folder templates contains default header templates: java.header - Header template for java sources xml.header - Header template for xml sources txt.header - Header template for properties files === How to define placeholder === Current implementation supports only one placeholder ($YEAR$) which must be defined