Rollup of errors encountered by Maven

Source: Internet
Author: User

Error creating MAVEN project,

1. Project name with Maven Webapp

Solution:

2. Missing jar Package

Could not resolve archetype

Cause: The Maven-archetype-quickstart plugin or plugin is missing from the local library

Solution:

1. Baidu Download: Maven-archetype-quickstart-1.1.jar, put in the Maven installation directory lib, for example: D:\apache-maven-3.3.9\lib

2.cmd window Execution command (go to the path where the jar package is located):

MVN install:install-file-dgroupid=org.apache.maven.archetypes-dartifactid=maven-archetype-quickstart-dversion= 1.1-dpackaging=jar-dfile=maven-archetype-quickstart-1.1.jar

 

Reference: http://www.th7.cn/Program/java/201502/386237.shtml

3. Not even in the Central library

Could not calculate build plan

Reason: Http://repo1.maven.org/maven2 This central warehouse address has been blocked, can not access, so maven used plug-in and jar download failed, and your computer on the local repository, do not download the MAVEN plug-ins and so on

Solution:

1. Copy the local repository. M2 directory to your computer and set <localRepository> as. M2 directory in Maven conf settings.xml.

2. If you have a settings.xml (such as a nexus), you can configure the Nexus address to download it from above.

4. New project, pom file on red x:

Failure to transfer org.apache.maven:maven-artifact:pom:2.0.6 from Http://repo.maven.apache.org/maven2 is cached in The local repository, resolution is not being reattempted until the update interval of the central have elapsed or updates are F orced. Original error:could not transfer artifact org.apache.maven:maven-artifact:pom:2.0.6 from/to Central (HTTP// REPO.MAVEN.APACHE.ORG/MAVEN2): No connector available to access repository Central (http://repo.maven.apache.org/ MAVEN2) of type default using the available factories Pom.xml/hello Line 1 Maven Configuration problem

1.

Open window-->preferences-->myeclipse-->maven4myeclipse--->user settings copy the address inside the local repository.

    1. If you don't have a myeclipse, you'll find:

      c:\users\{your computer account}\.m2\repository (usually in this folder).

      Like mine: C:\users\long\.m2\repository.

    2. Find the repository file and search for maven*.lastupdated. Delete all the documents that have been searched out.

    3. Restart MyEclipse, right-click Project--->maven4myeclipse--->update project ...

    4. Tick force Update of snapshots/releases, then OK exit, if still wrong, do not worry, wait for a while.

2. Error deploying MAVEN Project

1.JDK compilation Error

Unsupported Major.minor version 51.0

Cause: Compiled source JDK and Tomcat use a different version of JDK

FIX: Project------> Right------>properties------>java Compiler------>compiler Compliance level------> Select the JDK version you are using

Rollup of errors encountered by 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.