If you don't define the licenseHeaderFile the generated scripts contain a default license header like the following:
#!/bin/sh # ---------------------------------------------------------------------------- # Copyright 2001-2006 The Apache Software Foundation. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ---------------------------------------------------------------------------- # # Copyright (c) 2001-2006 The Apache Software Foundation. All rights # reserved. BASEDIR=`dirname $0`/.. BASEDIR=`(cd "$BASEDIR"; pwd)` ....
Sometimes you need to change the license header to fit in your project environment which can be done by using the licenseHeaderFile definition.
<project> ... <build> <plugins> ... <plugin> ... <configuration> <licenseHeaderFile>${basedir}/license-header.txt</licenseHeaderFile> <programs> <program> <mainClass>com.mycompany.app.App1</mainClass> <id>app1</id> </program> <program> <mainClass>com.mycompany.app.App2</mainClass> <id>app2</id> </program> </programs> </configuration> </plugin> ... </plugins> </build> </project>
You can also change the license header for every program separately if you need. The second app (app2) will use the default license header whereas the App1 will use the given license header license-header-1.txt.
<project> ... <build> <plugins> ... <plugin> ... <configuration> <programs> <programs> <program> <licenseHeaderFile>${basedir}/license-header-1.txt</licenseHeaderFile> <mainClass>com.mycompany.app.App1</mainClass> <id>app1</id> </program> <program> <mainClass>com.mycompany.app.App2</mainClass> <id>app2</id> </program> </programs> </programs> </configuration> </plugin> ... </plugins> </build> </project>