1. Add the local jar package to maven dependency2. Specify the version of the JDK, and the font3. Make the project into a war packageWrite here temporarily, will update again.Use MAVEN to manage your project's Pom file configuration
The Spring cloud project is typically a parent project with more than one child service, which is the Submodule module.Such as:problem Description: A common jar package is referenced in the parent project, for example, the spring boot dependency is introduced, then the introduction of the jar package in the subproject does not specify version, so the downloaded jar package is unknownAnalyze the problem:Because the jars used in the subproject are all spring cloud-related jar packages, you must sp
The following is a configuration of the Pom.xml file.Projectxmlns= "http://maven.apache.org/POM/4.0.0"Xmlns:xsi= "Http://www.w3.org/2001/XMLSchema-instance"xsi:schemalocation= "http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> modelversion>4.0.0modelversion> groupId>Com.huawei.toolsgroupId> Artifactid>CodexloganalysisArtifactid> Pac
Method One:Locate the jar package file where the error occurred and delete the _maven.repositories fileMethod Two:The index index of the local warehouse in Maven is not updated to causeSolution:Open the menu in Eclipse window-> show view–> other–> maven--maven repositoriesAfter opening, select local Repositories–> loca
of the module;For the parent pom of an inheritance relationship, it does not know which of the submodules it inherits from, but those submodules must beknow what your Father Pom is. In the actual project, the reader will find that a POM is both an aggregate pom and a parent pom
The POM represents the engineering object model. It is the basic build when working with Maven and is an XML file. It is placed under the project root directory and the file is named Pom.xml.The POM contains information about the
configurations
Similar to dependencymanagement, you can also use the pluginmanagement Element Management plug-in. A common usage is that we want all modules of the project to use Maven compiler plugin, Java 1.5, and specify the Java source file encoding as UTF-8, you can configure pluginmanagement In the POM of the parent module as follows:
This configuration w
Tags: HTTP Io ar ad line as TT C XML
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pomLine 9: Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/
Maven error: Failure to transfer classworlds: pom: 1.1-alpha-2 from, mavenclassworlds
Detailed error:Failure to transfer classworlds: pom: 1.1-alpha-2 from http: // localhost: 8081/nexus/content/groups/public was cached in the local repository, resolution will not be reattempted until the update interval of nexus has elapsed or updates are forced. original error
Maven Super POM defines some properties.Three ways to find it
${M2_HOME}/lib/maven-model-builder-3.0.3.jar.
Nevigate toorg/apache/maven/model
Maven Github Project.
https://github.com/apache/maven/blo
An error in Eclipse's tip in its pom file is as follows:Plugin execution not covered by lifecycle Configuration:org.apache.maven.plugins:maven-compiler-plugin:3.1:compile ( Execution:default-compile, Phase:compile)This means that M2E does not define the plug-in when it executes the MAVEN lifecycle management, so there is a hint of an error, in fact M2E provides a
Maven Parent-child relationship
The parent project must be packaged in a pom such as
Child project inherits most of the properties of the parent project using
Parent Project
Sub-project
maven Specifies the packing method type (Jar,war) and the package name,
Specify the name of the packaged file under some direc
1,
Parent
The location of the parent project. The location of the parent project is specified by the group Id,artifact ID and version.
Modelversion
Declaring Pom.xml File compliant versions
GroupId
A globally unique project identifier. Typically use fully qualified Baonilai and other project compartments (e.g., org.apache.maven)
Artifactid
A unique product identifier within a given gorupi
Project-Root element of POM. XML files.
Modelversion-Setting the POM version is similar to setting the project version. Currently, it seems that Maven 2 only allows this value to be 4.0.0.
Groupid-Set the organization or group ID of a project, which is one of the unique identifiers of a project (the other is artifa
:3.2.2.releaseFor example, the following:When using spring. The existence of a transaction is missing, and the transaction is in spring-orm , and will be spring-orm dependent on the projectIn the same way, the spring-orm jar package is then actively dependent on project.The following is the full Pom.xml file information for spring + SPRINGMVC + MyBatis + POI.Use IntelliJ idea to view the pom dependency view
An error in Eclipse's tip in its pom file is as follows:Plugin execution not covered by lifecycle Configuration:org.apache.maven.plugins:maven-compiler-plugin:3.1: Compile (Execution:default-compile, phase:compile)This means that M2E does not define the plug-in when it executes the MAVEN lifecycle management, so there is a hint of an error, in fact M2E provides a
. For example, if you develop a Web application, you might need the Servlet API available in the compilation Classpath to compile a servlet, but you don't want to include the Servlet API in the packaged war, and this servlet API JAR is made by your Provided by the application server or the servlet container. A dependency that has been provided for scope is available at compile classpath (not at runtime). They are not transitive and will not be packaged.Runtime (run-time range)Runtime relies on t
Maven+mybatis+spring encountered the following error while developing:Org.springframework.beans.factory.UnsatisfiedDependencyException:Error creating Bean with Name ' Xxxservice ': Unsatisfied dependency expressed through field ' Xxxmapper '; Nested exception is org.springframework.beans.factory.BeanCreationException:Error creating beans with Name ' Xxxmapper ' defined in file [Xxxmapper.class]: Cannot reso
Cause of the problem:When I used MAVEN to build a Web project, I was not distributed, I put Pojo, DAO, service, web four layer directly in a parent project, and not one of the sub-engineering distinction, but directly packaged into a war packageSo in the construction process there is no spring mapping file found, Web. xml fil
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.