The role of dependency type dependency type in Maven

Source: Internet
Author: User

Look at the following POM configuration

...<dependency> <groupId>xxx</groupId> <artifactId>yyy</artifactId> <TYPE>EJB </type></dependency>, .....

This <type> many MAVEN-related materials have not been mentioned, and the Internet search for Chinese resources, these articles are compile, runtime, test and so on is the concept of the scope of "dependency type" <type> concept. Moreover, there are very few explanations for this <type>.

I also looked at Maven 3 cookbook after finding some words, anti-launch type of the role.

Read the original text (P134. How it works ... ):

Adding the type of apk to the dependency allows the Maven Android plugin to find the Android package of the application.

It's not hard to see,<type>apk</type> telling Maven to use Maven Android plugin to handle <type> for apk dependencies. The presumption <type>ejb</type> is to tell Maven to work with Maven EJB plugin. If you want to know how EJB plugin handles this type of dependency, check out the detailed description of the EJB plugin, which is a lot of information on the plugin.


This article is from the "Bitterjava" blog, make sure to keep this source http://rickqin.blog.51cto.com/1096449/1738774

The role of dependency type dependency type in Maven

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.