Tag Archives: pom.xml

[Solved] pom.xml File Error: web.xml is missing and is set to true

pom. XML file error web xml is missing and < failOnMissingWebXml> Is set to true, but Web XML has been created in webapp – & gt; WEB-INF file added

The reason for the error is: War is selected by packaging in Maven project

Solution:

1 Right click the item – properties -> Deployment Assembly -> Add -> Folder, select the directory Src/main/webapp, click apply and OK.

Note: if the Src/main/webapp directory already exists before selection, you can delete it first, and then perform the operation

2. Select the project, project – clean, and POM XML error will disappear

Error in the first line of pom.xml when importing springboot project

During the integration of Chen Jie report and springboot project, it was found that the first line of pom.xml reported an error after the springboot project was imported into eclipse. The following information was viewed on the Internet. The solutions are as follows:

1. Find the properties node in pom.xml file

2. Add & lt; under the properties node; maven-jar-plugin.version> 3.0.0

3. Right click eclipse — Maven — udate project

New Maven project — pom.xml error [How to Solve]

After creating a maven project using the eclipse version integrated with maven, errors will appear in the configuration file pom.xml in the project and the referenced XSD file (errors are reported in the first and second lines)

One example of error reporting:

Multiple annotations found at this line:
– Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (execution: default-compile, phase: compile)

– CoreException: Could not get the value for parameter compilerId for plugin execution default-compile: PluginResolutionException: Plugin org.apache.maven.plugins:maven-compiler-plugin:2.3.2 or one of its dependencies could not be resolved: Could not transfer
artifact org.codehaus.plexus:plexus-compiler-javac:jar:1.8.1 from/to central ( http://repo.maven.apache.org/maven2 ): connection timed out to http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-compiler-javac/1.8.1/plexus-compiler-javac-1.8.1.jar

– Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins :maven-compiler-plugin:2.3.2:testCompile (execution: default-testCompile, phase: test-compile)

Wait, the error information is similar

 

The reason is that there is a problem with the Maven integrated by eclipse (version problem or website access problem), and the newly installed Maven was not successfully added to the M2e plug-in

The solution is as follows:

step. 1 download the appropriate version of Maven from the official website and store it in the appropriate path (or read which jar package file is missing in the error report – the corresponding error report information will provide the website to download the missing file – copy to the corresponding path of the local warehouse)

step. 2 Open eclipse preferences – > Maven-> Usersettings change global settings and user settings to conf/settings.xml under Maven just downloaded

Step.3   Eclipse preferences – > Maven-> Installations click Add to add the Maven folder you just downloaded, and then check the version you downloaded instead of the built-in version.

step. 4 after the above two steps, you have successfully integrated your downloaded Maven version with eclipse. At this time, right-click the item that reported an error before and right-click run as – > Maven clean and run as – > Maven install.

step. 5 (if not already available): right click – > Maven-> Update Project     This step takes a little time. You can see whether the update is completed by looking at the lower right corner of the interface

Error in the first line of pom.xml [How to Solve]

First line: & lt; project xmlns=” 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/m…

The content of the error report is   http://maven.apache.org/POM/4.0.0

The error message probably means that Maven wants to try to download Maven surefire plugin, but can’t download it

Solution:

first determine whether your computer can connect to the network

If you can connect to the network, execute the following command under the path of Maven’s local library:

for /r %i in (*.lastUpdated) do del %i

Finally, try to refresh the Maven project to see if it can succeed

 

Pom.xml add dependency error [How to Solve]

Problem Description: the specific tips are as follows:

faild to read artifact descriptor for orag.springframwork.boot:spring-boot-starter-jdbc:jar:2.1.7

Because I only added these dependencies to pom.xml, but this error is reported

<!– mybatis–>

        <dependency>
            <groupId>org.mybatis.spring.boot</groupId>
            <artifactId>mybatis-spring-boot-starter</artifactId>
            <version>1.3.5</version>
        </dependency>
        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <version>5.1.48</version>
        </dependency>
        <dependency>
            <groupId>com.alibaba</groupId>
            <artifactId>druid-spring-boot-starter</artifactId>
            <version>1.1.18</version>
        </dependency>

Try 1: I wanted to type "jdbc" to join the package, but it didn't bring up automatically

Try 2: close pom.xml and reopen it

The error is still reported, but it seems that there is no error in the left column. In fact, it has been reported

 

Re enter the package with no error prompt in JDBC

Try 3

cmd ==》mvn help:effective-settings

Find Maven stupid warehouse

After deletion, the system can finally bring out the package

Then install it automatically and solve the problem

[Solved] Missing artifact com. oracle:ojdbc6 : jar:11.2.0.1.0 Problem solving ojdbc package pom.xml error

I just learned spring boot. Because the company uses Oracle and Oracle’s ojdbc.jar is charged, there is no such resource in Maven’s central warehouse. Only by configuring the local library can it be loaded into the project

First configure the local Maven warehouse address:

2. Find Oracle jar package

The jar package in my computer is placed at:

D:\app\admin\product\11.2.0\dbhome_ 1\jdbc\lib

Open the directory where the jar package is located: then hold down shift and right-click to open the command line, execute the following command to add ojdbc6.jar package to maven, that is to say, run the following statement. Note: it is not run under C disk, but under this directory

mvn install:install-file -DgroupId=com.oracle -DartifactId=ojdbc6 -Dversion=11.2.0.1.0 -Dpackaging=jar -Dfile=ojdbc6.jar

The command line is as follows:

D:\app\admin\product\11.2.0\dbhome_1\jdbc\lib>mvn install:install-file -DgroupId=com.oracle -DartifactId=ojdbc6 -Dversion=11.2.0.1.0 -Dpackaging=jar -Dfile=ojdbc6.jar                                                                          [INFO] Scanning for projects...                                                 Downloading: http://maven.aliyun.com/nexus/content/groups/public/org/apache/maven/plugins/maven-clean-plugin/2.5/maven-clean-plugin-2.5.pom                     Downloaded: http://maven.aliyun.com/nexus/content/groups/public/org/apache/maven/plugins/maven-clean-plugin/2.5/maven-clean-plugin-2.5.pom (3.9 kB at 12 kB/s)  Downloading: http://maven.aliyun.com/nexus/content/groups/public/org/apache/maven/plugins/maven-plugins/22/maven-plugins-22.pom                                 Downloaded: http://maven.aliyun.com/nexus/content/groups/public/org/apache/maven/plugins/maven-plugins/22/maven-plugins-22.pom (13 kB at 85 kB/s)               Downloading: http://maven.aliyun.com/nexus/content/groups/public/org/apache/maven/plugins/maven-clean-plugin/2.5/maven-clean-plugin-2.5.jar                     Downloaded: http://maven.aliyun.com/nexus/content/groups/public/org/apache/maven/plugins/maven-clean-plugin/2.5/maven-clean-plugin-2.5.jar (25 kB at 138 kB/s)  Downloading: http://maven.aliyun.com/nexus/content/groups/public/org/apache/maven/plugins/maven-install-plugin/2.4/maven-install-plugin-2.4.pom                 Downloaded: http://maven.aliyun.com/nexus/content/groups/public/org/apache/maven/plugins/maven-install-plugin/2.4/maven-install-plugin-2.4.pom (6.4 kB at 37 kB/s)                                                                              Downloading: http://maven.aliyun.com/nexus/content/groups/public/org/apache/maven/plugins/maven-install-plugin/2.4/maven-install-plugin-2.4.jar                 Downloaded: http://maven.aliyun.com/nexus/content/groups/public/org/apache/maven/plugins/maven-install-plugin/2.4/maven-install-plugin-2.4.jar (27 kB at 125 kB/s)                                                                              [INFO]                                                                          [INFO] ------------------------------------------------------------------------ [INFO] Building Maven Stub Project (No POM) 1                                   [INFO] ------------------------------------------------------------------------ [INFO]                                                                          [INFO] --- maven-install-plugin:2.4:install-file (default-cli) @ standalone-pom ---                                                                             Downloading: http://maven.aliyun.com/nexus/content/groups/public/org/codehaus/plexus/plexus-utils/3.0.5/plexus-utils-3.0.5.pom                                  Downloaded: http://maven.aliyun.com/nexus/content/groups/public/org/codehaus/plexus/plexus-utils/3.0.5/plexus-utils-3.0.5.pom (2.5 kB at 15 kB/s)               Downloading: http://maven.aliyun.com/nexus/content/groups/public/org/codehaus/plexus/plexus/3.1/plexus-3.1.pom                                                  Downloaded: http://maven.aliyun.com/nexus/content/groups/public/org/codehaus/plexus/plexus/3.1/plexus-3.1.pom (19 kB at 118 kB/s)                               Downloading: http://maven.aliyun.com/nexus/content/groups/public/org/codehaus/plexus/plexus-digest/1.0/plexus-digest-1.0.pom                                    Downloaded: http://maven.aliyun.com/nexus/content/groups/public/org/codehaus/plexus/plexus-digest/1.0/plexus-digest-1.0.pom (1.1 kB at 5.4 kB/s)                Downloading: http://maven.aliyun.com/nexus/content/groups/public/org/codehaus/plexus/plexus-components/1.1.7/plexus-components-1.1.7.pom                        Downloaded: http://maven.aliyun.com/nexus/content/groups/public/org/codehaus/plexus/plexus-components/1.1.7/plexus-components-1.1.7.pom (5.0 kB at 32 kB/s)     Downloading: http://maven.aliyun.com/nexus/content/groups/public/org/codehaus/plexus/plexus/1.0.8/plexus-1.0.8.pom                                              Downloaded: http://maven.aliyun.com/nexus/content/groups/public/org/codehaus/plexus/plexus/1.0.8/plexus-1.0.8.pom (7.2 kB at 50 kB/s)                           Downloading: http://maven.aliyun.com/nexus/content/groups/public/org/codehaus/plexus/plexus-container-default/1.0-alpha-8/plexus-container-default-1.0-alpha-8.pom                                                                              Downloaded: http://maven.aliyun.com/nexus/content/groups/public/org/codehaus/plexus/plexus-container-default/1.0-alpha-8/plexus-container-default-1.0-alpha-8.pom (7.3 kB at 46 kB/s)                                                           Downloading: http://maven.aliyun.com/nexus/content/groups/public/classworlds/classworlds/1.1-alpha-2/classworlds-1.1-alpha-2.jar                                Downloading: http://maven.aliyun.com/nexus/content/groups/public/org/codehaus/plexus/plexus-digest/1.0/plexus-digest-1.0.jar                                    Downloading: http://maven.aliyun.com/nexus/content/groups/public/org/codehaus/plexus/plexus-utils/3.0.5/plexus-utils-3.0.5.jar                                  Downloaded: http://maven.aliyun.com/nexus/content/groups/public/org/codehaus/plexus/plexus-digest/1.0/plexus-digest-1.0.jar (12 kB at 66 kB/s)                  Downloaded: http://maven.aliyun.com/nexus/content/groups/public/classworlds/classworlds/1.1-alpha-2/classworlds-1.1-alpha-2.jar (38 kB at 189 kB/s)             Downloaded: http://maven.aliyun.com/nexus/content/groups/public/org/codehaus/plexus/plexus-utils/3.0.5/plexus-utils-3.0.5.jar (230 kB at 462 kB/s)              [INFO] Installing D:\app\admin\product\11.2.0\dbhome_1\jdbc\lib\ojdbc6.jar to E:\eclipse\spring-tool-suite-3.9.0.RELEASE-e4.7.0-win32-x86_64\sts-bundle\sts-3.9.0.RELEASE\repository\com\oracle\ojdbc6\11.2.0.1.0\ojdbc6-11.2.0.1.0.jar         [INFO] Installing C:\Users\admin\AppData\Local\Temp\mvninstall887833532666323655.pom to E:\eclipse\spring-tool-suite-3.9.0.RELEASE-e4.7.0-win32-x86_64\sts-bundle\sts-3.9.0.RELEASE\repository\com\oracle\ojdbc6\11.2.0.1.0\ojdbc6-11.2.0.1.0.pom                                                                               [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS                                                            [INFO] ------------------------------------------------------------------------ [INFO] Total time: 3.636 s                                                      [INFO] Finished at: 2018-01-02T21:31:04+08:00                                   [INFO] Final Memory: 10M/362M                                                   [INFO] ------------------------------------------------------------------------                                               

Finally, find the pom.xml of the project, introduce the following code, right-click the project name, find maven, find update project, and update it

<!-- oracle database driver -->
<dependency>
 <groupId>com.oracle</groupId>
 <artifactId>ojdbc6</artifactId>
 <version>11.2.0.1.0</version>
</dependency>