Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-18006

maven-enforcer-plugin's execution of banned-illegal-imports gets overridden in child poms

    XMLWordPrintableJSON

Details

    Description

      When we specify any maven plugin with execution tag in the parent as well as child modules, child module plugin overrides parent plugin. For instance, when banned-illegal-imports is applied for any child module with only one banned import (let’s say Preconditions), then only that banned import is covered by that child module and all imports defined in parent module (e.g Sets, Lists etc) are overridden and they are no longer applied.
      After this commit, hadoop-hdfs module will not complain about Sets even if i import it from guava banned imports but on the other hand, hadoop-yarn module doesn’t have any child level banned-illegal-imports defined so yarn modules will fail if Sets guava import is used.
      So going forward, it would be good to replace guava imports with Hadoop’s own imports module-by-module and only at the end, we should add new entry to parent pom banned-illegal-imports list.

      Attachments

        Issue Links

          Activity

            People

              vjasani Viraj Jasani
              vjasani Viraj Jasani
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h 20m
                  1h 20m