Some knowledge of Maven {Maven practice}

Source: Internet
Author: User

Maven is a cross-platform tool. It is not only a build tool, but also a tool for managing dependencies.
It eliminates duplicates of components and provides a central repository, which can help us automatically download components.
---------------------------------------------------------------------
Any component in the world can be uniquely identified by Maven coordinates.
Groudid: defines the actual project to which the current Maven project belongs.
Naming rules: organization name. Actual Project Name
Artifactid: defines a Maven Project (module) in the actual project ).
Naming rules: Enter the actual project name-Module name to facilitate component search.
Version: defines the current version of the maven project.
Packaging: defines the packaging method for Maven projects.
Classifier: Used to help define some ancillary components of component output.
---------------------------------------------------------------------
Warehouse
Maven selects Maven components shared by Maven projects, which can be stored in a unified manner at a specific location, which is the repository.
Two types of warehouses are available: Local warehouses and remote warehouses. Maven searches for the local repository based on the coordinates. If the repository does not exist, it searches for the remote repository. For example
If neither warehouse exists, Maven reports an error.

One of the special remote repositories is the central repository, which is the remote repository that comes with the maven core.
Special Remote Warehouse 2: private server. In order to save bandwidth and time, a private warehouse server should be set up in the LAN. Use it to proxy all external
You can also deploy internal projects on private servers for use by other projects.

A component can be used by other Maven projects only after it is in the local repository.
Scenario 1: Download Maven dependency from the remote repository to the local repository.
Scenario 2: Install the components of the local project to the maven repository.

The MVN clean install command is used to install the build output file of the project to the local repository.

For Maven, each user has only one local repository, but many remote repositories can be configured and accessed.

For private servers, when Maven needs to download and build, it requests from private servers. If this component does not exist on private servers,
Then download from the external remote repository. In addition, it can cache components that cannot be downloaded from external warehouses.
A major role of private servers is to deploy third-party components, including components generated within the Organization and components that cannot be directly obtained from external warehouses.

 

========================================================== ======================================

1. libapk
An apklib is simply an android Library Project, compressed as a zip file with a. apklib
Extension.
Note that the apklib will include content of... /Src/main/Java source directory,... /Libs
Native library directory and... /RES Resource Directory.

+ Androidgridviewcompatlib.apk lib
+ SRC
+ Res
+ Androidmanifest. xml
+ Project. Properties

2. debugging and installing APK may occur if the memory is insufficient.
Installation Error: install_failed_container_error

3,
Customize the location of the local repository directory
<Setting>
<Localrepository> D: \ XX </localrepository>
</Setting>

4. snapshot version
The Snapshot version is unstable.

5. snapshot version
For example, 2.1-shapshot, Maven automatically timestamps the component.
2.1-20091214.221414-13.

6,
Ndk stands for Native Development Kit.

1. ndk is a collection of tools.
Ndk provides a series of tools to help developers quickly develop C (or C ++) dynamic libraries, and can automatically package so and Java applications into APK together. These tools are of great help to developers. Ndk integrates with the cross compiler and provides MK files to isolate differences such as CPU, platform, and Abi, developers can create so simply by modifying the MK file (indicating "which files need to be compiled" and "Compilation feature requirements. Ndk can automatically package so and Java applications, greatly reducing developers' packaging work.

2. ndk provides a stable and functional API header file statement.
Google explicitly states that this API is stable and supports the currently released API in all subsequent versions. From the ndk version, we can see that these Apis support very limited functions, including: C standard library (libc), standard Math Library (libm), and compression library (libz), log Library (liblog ).

 

Some knowledge of Maven {Maven practice}

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.