Fork me on GitHub


This page describes the file header model. You will learn how to customize it and use it with the goal update-file-header.

Header model

The header model defines how to display the header on each file.

This header is boxed in a comment proper to each type of file (we call it comment box).


Here is an example of a file header (with NO comment box) :

  (1) # % L
  (2) Project description
  (3) %%
  (4) Copyright (C) 2010 your organization
  (5) %%
  (6) License content
  (7) # L %
  • (1) the start process tag used to detect begin of header (NEVER suppress it).
  • (2) Project description section
  • (3) Header section delimiter
  • (4) Copyright section of the file (see next section for detail)
  • (5) Header section delimiter
  • (6) License section
  • (7) the end process tag used to detect end of header (NEVER suppress it).


You can configure these things:


  • The plugin won't be able to migrate from a header configuration to another one, so prepare this configuration before the first execution of the goal (and never change it :().
  • As the configuration has a special meaning for the goal to treat a file and should not be able to be found more than once in a file, we can use special space separator, the goal will remove then. In that way the exact configuration won't be found twice in your pom.xml.

Description section template

Since version 1.1, it is possible to customize the description section using a freemarker template.

Default template is given to reproduce exactly the previous hardcoded description.

See example for more details.

Copyright model

Copyright section must exactly be of this form :

  Copyright (C) firstYear[ - lastYear] holder

If firstYear and lastYear are the same then lastYear is omitted.

Comment box

In a file, we must box the file header in a comment. In the descriptor file you can customize it by choosing a headerType.

Available comment styles

Here are the available comment styles.

Using the goal comment-style-list you can find all of them.

java style


xml style


properties style


apt style


rst style

  .. -
  .. * HEADER
  .. -

jsp style


sql style


mysql style

  -- -
  -- -

Note that for mysql, you can not use the simplesql file header (see

freemarker style


php style

  <?php /*
  */ ?>

Ignore a header

If you don't want update-file-header goal to treat a specific file, you can use a specific tag in your file:


Note : Don't use start (1) and end (7 in example) balise You can change it with ignoreTag property.