Maven i WebSphere - TutorialsPoint

592kB Size 6 Downloads 11 Views

from the introduction of tools and practices of continuous integration for the software development. It is hard to find an enterprise which carries on any activity  ...
Continuous Integration: Maven and WebSphere

Introduction

There is surely no need to convince anybody that there are great benefits resulting from the introduction of tools and practices of continuous integration for the software development. It is hard to find an enterprise which carries on any activity associated with the code that would not use a repository. Many of them also use such software as Cruise Control or Continuum to build and test developed applications automatically. However, not everyone uses these tools to install built software on a test server. This paper presents the possibility of automatic installation of a J2EE application on the IBM WebSphere server using the Maven platform.

Benefits

Actions behind the concept of continuous integration are aimed primarily at reducing the risk accompanying the software development as well as reducing the time of its delivery to the customer. These tasks are carried out by forcing frequent code validation in the repository (i.e. committing) and frequent automatic building (and testing) of applications. In this situation it is clear which changes introduced errors. Developers are making more effort so that the code which goes to the server is free of errors. When these occur, they are corrected immediately. An element which is often overlooked in the continuous integration practices is the automatic installation of built applications on the test server. This operation is often abandoned as it sometimes causes technical difficulties. The benefits flowing from such a setup are, in turn, huge. The primary advantage of continuous integration is the ease of use: the management team has control over the project and the customer is able to track the requirements. This is the most important thing when it comes to applications containing a user interface, in particular applications available via a web browser. There is no need for periodic manual installation and determining if everything goes as expected. The project management, and even the customer, may at any time see the current look of the application, verify if the features previously planned to be implemented are in place, whether they comply with the specifications, etc. The automatic software installation appears to be particularly useful when using the agile methodologies. It is much easier to work and maintain all team members’ knowledge on the direction of the project development, having the opportunity to present it to them at any time. The communication between team members is then more efficient and it is possible to eliminate any misunderstandings much faster.

Another important benefit of an early integration is a quicker detection of errors. In the absence of the automatic building, compilation errors are detected when the programmer synchronizes the invalid code with the repository code and then tries to build and test it in his environment. The automatic building on the server allows for error detection soon after committing the invalid code. The report of the compilation errors or unsuccessful unit tests is sent to all the developers. The error can then be quickly fixed. It is known then that it is better not to synchronize the code in the developer environments in order not to disrupt the work. Moreover, Verax Systems’ experience shows that developers pay more attention to the quality of the code, because it is immediately clear who has made the error. In addition, as mentioned above, although the application builds correctly, it does not always mean that it is free from errors. The automatic installation of the application is therefore aimed at reducing the number of such errors. The fact that anyone can view the application results in increased control and it is easier to eliminate logical errors in the application at an early stage.

Tools

Finally, the technical aspect of the continuous integration is also worth mentioning. The most commonly used tool to manage the project building is Maven, which is designed primarily for Java applications. Maven itself manages the building and integration of a project, but there is also software required that allows the programmer to automatically get the project from the repository and build it. The most commonly used tools are Cruise Control and Continuum. Properly configured project and software make it possible to periodically download the latest version from the repository, build it and perform unit tests. To complete the automatic installation of the application, an additional configuration that is included in the Maven configuration for the project is needed. There are many add-ons available on the Internet that allow for configuration and even for a remote installation of applications. An example might be WAS6 Maven Plugin that allows for remote installation of any J2EE applications on the WebSphere server. This plug-in takes into account such aspects as the server architecture (clusters) and safety.

Summary

As it has already been mentioned in the introduction to the paper, the continuous integration is a process which brings about many benefits and is used in many companies involved in software development. However, it is advisable to consider extending the standard set of activities undertaken in this process with the automatic installation of the developed application. The list of benefits is quite long, so it often pays to spend more time to adapt the configuration for the possibility of monitoring continuously the integrated application.

Comments