官术网_书友最值得收藏!

Monitoring the build

The most popular way of starting a Maven build is by using the mvn clean install command. This will build all the Maven modules under your project and install the artifacts to your local repository. For a simple project, the entire build process will take less than a minute. However, for a large project, to create an online build with a clean repository could even take more than 3 hours: this is not an exaggeration. If you look at the WSO2 Carbon complete code base, the complete build process takes more than four hours to run with all the test cases. During a long-running build process, it is extremely important that we monitor the build properly.

Note

WSO2 Carbon is a framework that is written on top of OSGi to build servers. All WSO2 products, which are 100 percent open source and released under Apache 2.0 license, are built on top of WSO2 Carbon. WSO2 Carbon code base is available at https://svn.wso2.org/repos/wso2/carbon/.

The following screenshot shows an overview of the JVisualVM tool running a Maven build:

Monitoring the build

Note

JVisualVM is a Java virtual machine monitoring, troubleshooting, and profiling tool. To learn more about it, refer http://docs.oracle.com/javase/6/docs/technotes/tools/share/jvisualvm.html.

The JVisualVM tool that comes with the JDK distribution can be used to monitor a running Maven build. First, we need to start the Maven build and then start JVisualVM using the following command:

$ jvisualvm

This command will start the JVisualVM tool. Once the tool gets started, select org.codehaus.plexus.classworlds.launcher.Launcher from the Applications tab to monitor the running Maven build. You can gather many important statistics using JVisualVM, and based on that you can optimize your system resources for an optimal Maven build.

The following screenshot shows JVisualVM statistics of a running Maven build:

Monitoring the build
主站蜘蛛池模板: 上虞市| 龙南县| 鄂伦春自治旗| 瑞丽市| 万宁市| 上蔡县| 呼和浩特市| 托里县| 东莞市| 怀仁县| 河源市| 浦城县| 安康市| 龙海市| 南江县| 伽师县| 龙江县| 宁阳县| 翁牛特旗| 昌都县| 牙克石市| 宁都县| 黔江区| 晋宁县| 屯留县| 黔西| 广西| 土默特左旗| 周口市| 临夏县| 靖边县| 邯郸市| 克拉玛依市| 安庆市| 象山县| 沈阳市| 镇远县| 咸阳市| 平远县| 岱山县| 大同市|