History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: MULE-2806
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Critical Critical
Assignee: Dirk Olmes
Reporter: Andrew Perepelytsya
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Mule

Incorporate automated license header check into the build cycle

Created: 14/Dec/07 07:35 AM   Updated: 09/Apr/08 07:43 AM
Component/s: Build: (other)
Affects Version/s: 2.0.0
Fix Version/s: 2.0.1

Time Tracking:
Not Specified

Labels:
User impact: Low


 Description  « Hide
We have 2 options now:
  1. Use checkstyle's support - everything is in place, need to run it every time only
  2. Use buildtools/scripts/ScanLicenseHeaders.groovy script - a more focused and supposedly faster approach, but requires its output be integrated into m2 site

Note, there are 2 non-conformant files reported at the moment in bobberplus (modified) sources. They were originally ASL.



 All   Comments   Work Log   Change History   Transitions   FishEye      Sort Order: Ascending order - Click to sort in descending order
Dirk Olmes - 17/Dec/07 08:44 AM
Andrew, you have used the maven-groovy-plugin before, is there any easy way of wrapping ScanLicenseHeaders.groovy into a groovy mojo?

Andrew Perepelytsya - 17/Dec/07 08:49 AM
A groovy mojo could dynamically call the script. This is easy. I'm more concerned with the way results are output and how they are reported (e.g. fail build)

Dirk Olmes - 17/Dec/07 08:55 AM
If the groovy mojo works the same way as plain mojos, it's a matter of throwing an exception. This exception could also list the nonconforming files.

A whiltelist of files to skip in the license check could be implemented as pom config option.

If we have the mojo in place, there's no use in keeping the script around in buildtools as one could always run the maven plugin from the commandline.


Dirk Olmes - 17/Mar/08 07:04 PM
raise prio as old license headers keep creeping in over time

Dirk Olmes - 18/Mar/08 10:59 PM
Dan, I set the fix version for a reason. This is really an issue which should be addressed ASAP.

Dirk Olmes - 09/Apr/08 07:43 AM
Ah, the joys of Maven

I have refactored the existing ScanLicenseHeaders.groovy script to be callable from the commandline as well as from a pom using the groovy-maven-plugin.

Unfortunately, we use the groovy-maven-plugin already for other tasks i.e. for testing the transport archetypes. These projects would now have two configurations of the groovy plugin: one for performing their work and another one inherited from the parent (toplevel) pom to check the license headers. Unfortunately, that does not work with Maven at all

Instead of implementing the license header check as part of the build (which would add an approx. 10% overhead in runtime to each and every build) I have created a build plan on bamboo now (http://dev.mulesource.com/bamboo/browse/MULE-V20XLICHEA) that runs once per day. That should be good enough for now.