Example #1
0
 private void executeMavenPlugin(Sensor sensor) {
   if (sensor instanceof DependsUponMavenPlugin) {
     MavenPluginHandler handler = ((DependsUponMavenPlugin) sensor).getMavenPluginHandler(module);
     if (handler != null) {
       TimeProfiler profiler =
           new TimeProfiler(LOG).start("Execute maven plugin " + handler.getArtifactId());
       mavenExecutor.execute(module, fs, handler);
       profiler.stop();
     }
   }
 }
 public final MavenPluginHandler execute(
     Project project, DefaultModuleFileSystem fs, MavenPluginHandler handler) {
   for (String goal : handler.getGoals()) {
     MavenPlugin plugin =
         MavenPlugin.getPlugin(project.getPom(), handler.getGroupId(), handler.getArtifactId());
     execute(
         project,
         fs,
         getGoal(
             handler.getGroupId(),
             handler.getArtifactId(),
             (plugin != null && plugin.getPlugin() != null
                 ? plugin.getPlugin().getVersion()
                 : null),
             goal));
   }
   return handler;
 }