The path to the architect 23rd day maven and Ant's Wonderful integration

Source: Internet
Author: User

First, the preface

We used maven in the first four days of universal frame spring. Next, we'll talk about how our unit tests are done under the architecture of SSX, but before we go deep into the solution of MAVEN, because our unit tests need to use junit+ant+ Junitreport such a combination. And ... Since we have used maven, how can we extend the combination of unit tests such as the classic junit+ant? The answer is to combine maven and ant again.

Using the MAVEN task to use Maven dependencies in Ant

An important feature of MAVEN is the use of a central warehouse that stores the libraries needed to rely on and identify applications. Maven2 also supports delivery dependency (transitivedependency), a powerful concept that limits the user's reliance on claims to a minimum. Ant does not support "out-of-the-box" dependency management. In an ant project, all of the libraries required by an application are typically stored in a project directory.

Iii. Use of Maven-ant-task

3.1 Installation Maven-ant-task

We first download the Maven-ant-tasks-2.1.3.jar (I have already uploaded to my resources);

After downloading, put it in our ant lib directory;

3.2 Packing Project

This is a traditional ant packaging process that does not use the Maven dependency library, which is clear from the diagram, right?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.