Uploaded image for project: 'Maven Remote Resources Plugin'
  1. Maven Remote Resources Plugin
  2. MRRESOURCES-94

Performance issue in ProcessRemoteResourcesMojo.configureVelocityContext(...)

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.5
    • Fix Version/s: 1.6.0
    • Labels:
      None

      Description

      I was wondering why our multi-threaded maven build of 80+ modules took so long even when excluding tests. I checked every plugin execution and to my surprise, maven-remote-resources-plugin was the number 1 consumer before compiler-plugin etc.
      We use maven-remote-resources-plugin just to exchange some few xml files among the modules, nothing spectacular!

      While debugging the plugin I found out that ProcessRemoteResourcesMojo.configureVelocityContext(VelocityContext context) may take up to 30 seconds for our project setup which is not acceptable.
      Almost certainly the problem is caused by the following project lookups (especially getProjects()):

              List<MavenProject> projects = getProjects();
              context.put( "projects", projects );
              context.put( "projectsSortedByOrganization", getProjectsSortedByOrganization( projects ) );
      

      As we do not use velocity templates at all, the solution for us was to patch the plugin to call configureVelocityContext(...) only on demand, not eagerly. Of course this won't help when using velocity templates...

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                hboutemy Hervé Boutemy
                Reporter:
                famod Falko Modler
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: