If this works, then we should use it, you can configure the execution to run the goal from any phase. I think this should be move into the profile which only runs from ci though, no reason to run this check for every build.

+1 to dropping ${module.relative.path} as relying on stuff in ../ isn't very maven friendly.

An alternative is to create an external resource bundle (jar) module which contains the header muck, then configure that jar as a dependency of the plugin and then let the files be loaded from the class-loader.

--jason


On Jul 10, 2009, at 8:34 AM, Bryant Luk wrote:

Can the main pom.xml be changed to not propagate the license plugin to
its modules?

            <plugin>
<groupId>com.google.code.maven-license-plugin</ groupId>
                <artifactId>maven-license-plugin</artifactId>
+                <inherited>false</inherited>
                <configuration>
- <header>${module.relative.path}src/etc/ header.txt</header>
+                    <header>src/etc/header.txt</header>
                    <quiet>false</quiet>
                    <failIfMissing>true</failIfMissing>
                    <aggregate>true</aggregate>
                    <includes>
-                        <include>src/**</include>
+                        <include>**/src/**</include>
                        <include>**/test/**</include>
                    </includes>
                    <excludes>


I think this still checks all the legal bits with some quick testing
except it is only done when the main mvn install is run.  This way we
don't have to add ${module.relative.path} everywhere.  Didn't know if
this was attempted earlier.

--

- Bryant Luk

Reply via email to