pom.xml Depending on the error report, the problem of missing artifact XXX is solved
Possible causes pom.xml The dependency configuration format specifies that you manually download the corresponding jar and then install it to the local repository pom.xml After modification
Eclipse imports or creates a new Maven project, pom.xml An error is reported in the configuration file, missing artifact XXX jar. The problem is that the jar package is not found in the specified warehouse after Maven is started.
Possible causes
- there is no such jar package in the central warehouse or local warehouse; some jar packages are charged (for example, Oracle) ojdbc.jar In fact, there is no such resource in Maven Central Library, so it cannot be loaded; pom.xml Configuration items do not match.
pom.xml Dependency configuration format description
// pom.xml
<dependencies>
<dependency>
<groupId>Package1</groupId>
<artifactId>jarName</artifactId>
<version>versionInJar</version>
</dependency>
<dependency>
<groupId>Package2</groupId>
<artifactId>jarName2</artifactId>
<version>1.0.0</version>
</dependency>
......
</dependencies>
Groupid: the relative path of the dependent jar package. The parent-child directory is marked with “.” (example: package.packageNext ); artifactid: dependent jar package name; version: dependent jar package version.
Manually download the corresponding jar, and then install it to the local warehouse
- download the corresponding version of the jar package; open the CMD, preferably in the path to be installed (the installation command is more convenient, directly in the address bar of the path to be installed, enter CMD to quickly open the command window); install here. Take Ojdbc14 as an example, after opening CMD, enter the command as follows:
OL>
mvn install:install-file -Dpackaging=jar -DgroupId= com.oracle -DartifactId=ojdbc14 -Dversion=11.2.0.3.0 -Dfile=ojdbc14-11.2.0.3.0.jar -DgeneratePom=true
Command explanation:
install: compile and package the project to the local warehouse;
install file: install file;
– dgroupid= com.oracle : Specifies that the groupid of the current package is com.oracle ;
– dartifactid = Ojdbc14: Specifies that the current artifact ID is Ojdbc14;
– dversion = 11.2.0.3.0: Specifies that the current package version is 11.2.0.3.0;
– dversion = 11.2.0.3.0 -Dfile = D: ojdbc14-11.2.0.3.0.jar: Specifies the file location of the package to be typed (the reason why you want to open CMD in the path before is to avoid entering an excessively long path);
– dgeneratepom = true: whether to generate a POM file.
- open the Maven project in eclipse, right-click Maven – & gt; update or click open pom.xml File, right-click Maven – & gt; update for project.
pom.xml After modification
<dependency>
<groupId>com.oracle</groupId>
<artifactId>ojdbc14</artifactId>
<version>11.2.0.3.0</version>
</dependency>
Read More:
- Idea2020.2 encountered pom.xml The problem of file error report in Maven plug-in tomcat7
- Failed to read artifact descriptor for xxx:jar Missing
- Solve the error of POM file failed to read artifact descriptor for XXX under IntelliJ idea
- New Maven project– pom.xml report errors
- The spring boot project was first created, pom.xml The error is Maven configuration problem. How to solve it?
- [save] Maven’s pom.xml Labeled xsi:schemaLocation Error report
- Maven project pom.xml The solution of error report in execution of
- Artifact xxx:war exploded: Error during artifact deployment. See server log for details.
- Research on Maven management of Java project pom.xml The jar package error is reported, but the project is running normally
- Import Maven project pom.xml File error
- Solution of maven pom.xml dependency invalidation in IntelliJ
- About maven Pom.xml Personal solutions to reporting errors!!!
- Could not find artifact org.olap4j:olap4j:pom:0.9.7.309-JS-3 in alimaven
- Maven project pom.xml Solutions to error reporting
- Error in pom.xml file of sub module of Maven aggregation project
- Maven of springboot project pom.xml Unknown error in the first line of the file
- Where’s Maven pom.xml Configure aliyun warehouse in
- Application of IntelliJ idea in Maven project pom.xml Add dependency
- Error in pom.xml dependency version number in idea
- The problem of error reporting in Ranger connection hive is solved