如何定时执行Maven的不同阶段 [英] How to time the different stages of maven execution

查看:57
本文介绍了如何定时执行Maven的不同阶段的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的Maven构建非常慢.我想知道是否有一种方法可以分析Maven执行情况,以便找出最耗时的步骤.

I have a maven build that is extremely slow. I would like to know whether there is a way to profile maven execution in order to find out which are the most time-consuming steps.

稍后,我将要比较旧版本(速度更快)的内部版本之间的时间,因此理想情况下,它们应采用可比较/区分/绘制的格式.

Later I will want to compare these times between builds for older versions (which were faster), so they should be ideally in a format that can be compared/diffed/graphed.

推荐答案

此功能已包含在Maven3中.这是相关的票证: https://issues.apache.org/jira/browse/MNG -4639

This functionality has been included in Maven3. Here's the associated ticket: https://issues.apache.org/jira/browse/MNG-4639

如果您需要对Maven2做同样的事情,我建议您构建自己的插件,该插件可以挂接到执行的所有阶段(或者只是您需要跟踪的阶段).

If you need to do the same with Maven2 I'd recommend building yor own plugin that is hooks into all phases of execution ( or just the ones you need to track).

这篇关于如何定时执行Maven的不同阶段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆