Using Maven license plugin in multimodule project -


i working on multi-module projects modules share common licence (apache 2.0). want add headers source files , want configure in parent's pom.xml (packaging type pom)

i created folder license in base dir , added file licenses.properties state apache_2_0=apache_2_0. also, added subfolder apache_2_0 have 2 files header.txt , license.txt. added following plugin parent pom:

<build>     <plugins>         <plugin>             <groupid>org.codehaus.mojo</groupid>             <artifactid>license-maven-plugin</artifactid>             <version>1.5</version>             <configuration>                 <licensename>apache_2_0</licensename>                 <licenseresolver>${project.basedir}/license</licenseresolver>             </configuration>             <executions>                 <execution>                     <goals>                         <goal>update-file-header</goal>                     </goals>                     <phase>process-sources</phase>                 </execution>             </executions>         </plugin>     </plugins> </build> 

when run this, error message:

[error] failed execute goal org.codehaus.mojo:license-maven-plugin:1.5:update-file-header (default) on project (myproject): not obtain license repository: unknown protocol: c -> [help 1]

with following exception:

java.net.malformedurlexception: unknown protocol: c

what doing wrong?

you have not defined protocole (file://, http://, ...) on licenseresolver

replace

<licenseresolver>${project.basedir}/license</licenseresolver> 

with

<licenseresolver>file://${project.basedir}/license</licenseresolver> 

Comments

Popular posts from this blog

javascript - Count length of each class -

What design pattern is this code in Javascript? -

hadoop - Restrict secondarynamenode to be installed and run on any other node in the cluster -