There are two ways to configure MAVEN environment configuration, I recommend the use of the second, that is, using the local MAVEN installation files, personal feeling this can be convenient to manage the storage location of the download jar, error message output, can be clearly seen in the DOS window, although the more troublesome, Each time a DOS command is struck, but a batch file can be written to resol
Maven learning notes (1): Maven coordinates and dependencies, maven learning notes
Maven was introduced to the company and soon became fascinated by the features that Maven does not need to manually copy numerous jar packages to the project. As I am new to this technology, i
the user directory represented by ~/.m2/repository/,~3.3.2, Remote Storage1, Central warehouse: MAVEN default remote warehouse, URL address: http://search.maven.org/ 2: A special Remote Storage, it is built in the local area network warehouse Four, life cycle 4.1, what is the life cycle?The MAVEN lifecycle is designed to abstract and unify all build processes,
How MAVEN plug-ins runMaven runs a command with each life cycle, and each life cycle executes to see which plug-ins are configured in the Pom.xml file and then run it.Maven's lifecycle is tied to plug-ins to accomplish actual build tasks. More specifically, the phase of the lifecycle is tied to the goals of the plug-in to accomplish a specific build task. The specific functionality is implemented by the plug-in (Plugin). A plug-in can achieve multiple
Some recent projects need to be managed by MAVEN, one of which is to add the previous Eclipse Java Project Project and Web project to MAVEN management, and another scenario is to pull the MAVEN project on SVN locally, Some of the tricky issues encountered in using eclipse, the problem process, and the solution are as follows:1. When you start eclipse after instal
Failed to execute goal on Project: cocould not resolve dependencies for project cs2c. nkscloudweb: nkscloudweb3: War: 3.0: The following artifacts cocould not be resolved:Maven-plugins: Maven-cobertura-plugin: Plugin: 1.3, Maven-plugins: Maven-findbugs-plugin: Plugin: 1.3.1: cocould not find artifact Maven-plugins:
method is the same as above.
After the configuration is correct, run the command mvn clean deploy, and Maven will deploy the components built and output by the project to the remote repository corresponding to the configuration. If the current version of the project is a snapshot version, the repository address of the snapshot version. Otherwise, the repository address of the released version is deployed.
the project is deployed.1, we delete the two items of test, because tests are used for testing and do not need to be deployed.2, set the Maven jar package to be published under Lib.ADD, Java Build Path Entries, Maven Dependencies, FinishSetup CompleteClick OKWhen you are finished, the project structure looks like this:In this way, a Web project built with
Hellofriends.jar, and Hellofriends.jar is directly dependent on the Hello.jar, then Makefriends.jar also relies on Hello.jar, which is transitive dependence, but this dependence is indirectly based on As shown in the following: 2.4. Optional dependency three, warehouse management 3.1, MAVEN warehouseThe location for unified storage of all Maven shared builds is the warehouse3.2.
dependenceMakefriends.jar directly depends on the Hellofriends.jar, and Hellofriends.jar is directly dependent on the Hello.jar, then Makefriends.jar also relies on Hello.jar, which is transitive dependence, but this dependence is indirectly based on As shown in the following: 2.4. Optional dependency three, warehouse management 3.1, MAVEN warehouseThe location for unified storage of all Maven shared buil
This section describes the dependency scope of Maven:
In the scope of the Pom. xml dependency label. In eclipse, there are compiling paths, Maven paths for compiling, running, and testing.
1. Scope is test, which is the test path. Most of them are JUnit jar packages.
2. the scope is compile, which is the default level and is effective during compilation and testing.
3. scope is provided, which is valid dur
The reason: Eclipse did not find Maven dependencies after introducing the MAVEN project. Make the code error, as shown in the following figure:
and the normal MAVEN project is this.
To solve the problem, reload, so that the Maven jar is imported. There are several ways.
And here is an ultra strong method. As sho
I. Pre-conditionsThe system environment is:[Email protected] application]# cat/etc/redhat-releaseCentOS Release 6.7 (Final)[Email protected] application]# uname-r2.6.32-573.el6.x86_64The installation package that needs to be prepared is:Subversion-1.6.1.tar.gzSubversion-deps-1.6.1.tar.gzApache-maven-3.3.3-bin.tar.gzSecond, SVN part[Email protected] application]# pwd/application#上传subversion -1.6.1.tar.gz and subversion-deps-1.6.1.tar.gz to this direct
= Maven-Archetype-site to generate site-type projects.At the same time, some good open-source software uses Maven and can also be used as a good project template, such as equinox (simplified version of appfuse). Its pom defines hiberante, spring... You can use ant New-dapp. Name = Name to quickly generate a project prototype, and then cut the POM file to meet the needs of your project.With this standard, p
MAVEN is a project building tool based on the Java platform.The starting point of the design:In the process of software development, no matter what the project, what technology to use, which programming language, we have to repeat the same development steps: coding, compiling, testing, generating documents, packaging and publishing. In fact, in addition to writing the source code, the other steps are completely repetitive trivial work, these trivial w
[Maven] maven introduction, maven Introduction
Maven
Java Community standard project management tools. Maven is a cross-platform project management tool. As a successful open-source project organized by Apache, it mainly serves to build projects on the java platform and mana
example, running MVN clean, This clean is a phase of the clean life Cycle. A little bit around? Know that there is a clean life cycle and there is a clean phase. The clean life cycle consists of three phases:?pre-clean performs some work that needs to be done before clean?clean remove all previous build files?post-clean Perform some work-branching diagrams that need to be completed immediately after clean:Clean in mvn Clean is the clean that is above, and in a lifetime, at the time of running a
Use the Maven Archetype plug-in to build a Maven project prototype template, archetypemaven
Create a prototype Template
1. Run the command archetype: generate in an empty directory. After downloading the necessary jar package, enter the built-in Prototype number;
1 Choose archetype: 2 1: internal -> org.apache.maven.archetypes:maven-archetype-archetype (An arche
, an error will be reported, find the remote repository and download it to your local device for use. As maven continues to use download components, its local repository will become larger and larger.
6. A component can be used by other Maven projects only after it is in the local repository.
7, the central repository is maven
Maven (III): maven project structure and running mechanism, and maven Running Mechanism
In the previous article, we talked about how to create a maven project. Now we can go back to that project.
Project Structure
Src/main/java: java code directory
Src/main/resources: Resource Directory, such as spring. xml file and p
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.