You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wink.apache.org by Bryant Luk <br...@gmail.com> on 2009/07/10 03:34:57 UTC

Change to pom.xml for legal bits plugin inheritance

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

Re: Change to pom.xml for legal bits plugin inheritance

Posted by Jason Dillon <ja...@planet57.com>.
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