Issue Type: Bug Bug
Affects Versions: 1.5
Assignee: Tony Chemit
Attachments: license-maven-plugin-patch.txt
Created: 30/May/13 9:35 AM
Description:

When executing the add-third-party mojo for multiple projects in a single maven build, the cached project dependencies of earlier projects in the build may appear in the generated third party file even if a project does not depend on them (but only in case they are specified in the missing licenses file).

To reproduce, consider the following maven project structure:

  • project A
    • sub-project B
      • dependencies: dX, dY
    • sub-project C
      • dependencies: dX, dU, dV

The following conditions will cause the bug to appear:

  1. The missing file for sub-project C contains a line for the dependency dY
  2. The sub-project C does not have a dependency on dY
  3. The maven build order is sub-project B first, then sub-project C

When the above conditions are met, then the generated third party file for sub-project C will contain an entry for dependency dY even though it is not part of the dependency tree of sub-project C.

The cause of this bug is the use of the static dependencies cache from DefaultThirdPartyHelper in the method:
DefaultThirdPartyTool.loadUnsafeMapping( ... )

If the current project dependencies are used instead of all dependencies cache then the correct behavior is restored.
I attached a patch for this change.

Project: Mojo's License Maven Plugin
Priority: Major Major
Reporter: Ibrahim Hasbini
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
--------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email

Reply via email to