Using idea development, Maven build error:
Error assembling WAR: Problem creating war: Execution exception (and the archive is probably corrupt but I could not delete it)
The cause of the error is that the memory of the JVM is not enough, so it’s better to configure it. The steps are as follows:
So we modify Maven’s JVM parameters directly in idea,
file-> setting-> Build,Execution,Deployment-> Maven-> Runner
Set the JVM parameter in VM option column, – xmx1g – XX: maxmetaspacesize = 128M
After setting, click Install on the right side to start the compilation, the parameter takes effect, and the maximum heap memory becomes 1g
0
div>
When SSM + Maven project is running, it is prompted that org.springframework.web.servlet.dispatcherserservlet cannot be found
When SSM + Maven project is running, it is prompted that org.springframework.web.servlet.dispatcherserservlet cannot be found
When running SSM project today, an error is reported:
HTTP status 500 – error identifying servlet class org. Springframework. Web. Servlet. Dispatcherservlet
java. Lang. classnotfoundexception: org. Springframework. Web. Servlet. Dispatcherservlet
You can confirm that org. Springframework. Web. Servlet. Dispatcherservlet exists and Maven is imported normally
Problem solving method:
select item – & gt; Right click Properties – & gt; Select deployment asset – & gt; Select Add – & gt; Select Java build path entries – & gt; Next-> Select Maven dependencies – & gt; Finish-> Apply-> OK
It can solve the problem
————————————————
Link to the original text: https://blog.csdn.net/cd19930508/article/details/80256595
Maven plugin development report error- plugin:3.2 :descriptor fai
Maven plugin error execution default descriptor of goal org. Apache. Maven plugins:maven-plugin-plugin :3.2:descriptor failed
The above error occurred when writing Maven plug-in.
Solution
Display the version number of the specified Maven plugin plugin in POM. XML
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-plugin-plugin</artifactId>
<version>3.5.2</version>
</plugin>
</plugins>
</build>
other error
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-plugin-plugin:3.2:descriptor (default-descriptor) on project maven-project: Error extracting plugin descriptor: ‘No mojo definitions were found for plugin
How to Solve
Show the version number of the specified maven-plugin-plugin in pom.xml
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-plugin-plugin</artifactId>
<version>3.5.2</version>
<configuration>
<!-- Or add a descriptor to the mojo class comment -->
<skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
</configuration>
</plugin>
</plugins>
</build>
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:testCompile (default-testCompile) on project xxx: Fatal error compiling: basedir D:\xxx\target\generated-test-sources\test-annotations does not exist -> [Help 1]
Solution
Skip the test during installation
mvn install -DskipTests=true
package xxx does not exist cannot find symbol
When deploying services on Linux, a large number of packages were thrown and no exception was found
[ERROR] /home/jenkins/agent/workspace/pipeline_p-h6sbk-4/src/main/java/com/UserServiceImpl.java:[3,28] package com.alibaba.fastjson does not exist
[ERROR] /home/jenkins/agent/workspace/pipeline_p-h6sbk-4/src/main/java/com/User.java:[9,2] cannot find symbol
[ERROR] symbol: class Data
[ERROR] location: class com.xxx
[ERROR] /home/jenkins/agent/workspace/pipeline_p-h6sbk-4/src/main/java/com/User.java:[3,14] package lombok does not exist
[ERROR] /home/jenkins/agent/workspace/pipeline_p-h6sbk-4/src/main/java/com/User.java:[9,2] cannot find symbol
[ERROR] symbol: class Data
[ERROR] location: class com.xxx
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
This is Maven’s problem
- check whether the settings.xml file is configured. Check & lt; in the settings.xml file; localRepository> If the path is configured correctly, & lt; mirror> Whether the image address is correct and the network is unblocked. Whether the jar package and the corresponding version exist in Maven warehouse. Whether the Maven version configured in pom.xml corresponds to the Linux Installation version ol>
[details] jar conflict resolution in Maven (personal test)
Jar conflicts are the most troublesome in Maven development
[INFO] Scanning for projects...
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[WARNING] 'dependencyManagement.dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: net.sf.ezmorph:ezmorph:jar -> duplicate declaration of version ${ezmorph.version} @ line 1030, column 16
[ERROR] Child module E:\EclipseHomeWork\parent\upiweb-cms of E:\EclipseHomeWork\parent\pom.xml does not exist @
[ERROR] Child module E:\EclipseHomeWork\parent\upiweb-cms0719 of E:\EclipseHomeWork\parent\pom.xml does not exist @
[ERROR] Child module E:\EclipseHomeWork\parent\upiweb-interface of E:\EclipseHomeWork\parent\pom.xml does not exist @
@
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project com.upi.web:upiweb-parent:1.0-SNAPSHOT (E:\EclipseHomeWork\parent\pom.xml) has 3 errors
[ERROR] Child module E:\EclipseHomeWork\parent\upiweb-cms of E:\EclipseHomeWork\parent\pom.xml does not exist
[ERROR] Child module E:\EclipseHomeWork\parent\upiweb-cms0719 of E:\EclipseHomeWork\parent\pom.xml does not exist
[ERROR] Child module E:\EclipseHomeWork\parent\upiweb-interface of E:\EclipseHomeWork\parent\pom.xml does not exist
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
In any case, it is to solve the conflict problem
after reading a lot of blogs or CSDN on the Internet, I feel that they are farting, which is useless at all. At that time, maybe the blogger forwarded or something, in order to cheat the Everbright programmer’s browsing times
in fact, I don’t understand why they sum up, that is, their wrong understanding of the past.
Baidu has n methods, but it can’t solve them
Why install one
What about plug-ins?That’s not nonsense. There must be only one advantage. It’s easy to use. How much time can an easy-to-use plug-in save you
Just go to the installation steps:
file — & gt; settings — & gt; plugs — & gt;
I installed it locally (I was too busy to write this blog before)
After installation, what is the specific function?I believe you will only pay attention to it when you use it
open pom.xml —-> Dependency Analyzer
Then open the sample and compare it:
Then right click: exclude solved
the article comes from the Internet, and the copyright belongs to the author himself. If it infringes the rights and interests of the original author, please contact us for deletion or authorization.
if there is any error, please contact the author for change, thank you, My wechat: void666666 font> font>
The introduction of third-party jar package in mavn project results in classnotfoundexception
Cases
I have a maven built project. There are dependencies between the project modules. I need to use a local jar package, which cannot be configured pom.xml The file is automatically downloaded from the remote warehouse, so I directly import the jar package to one of the projects without passing the pom.xml As a result, other modules that depend on the module cannot reference the jar, and classnotfoundexception appears tion
In this project, there are the following dependencies between modules:
The project needs to introduce fastdfs_ client_ V1.20.jar package is used to operate the fastdfs distributed file system. Both service and controller are involved in the operation. So now we want to put the operation tool class of fastdfs in the common module for sharing. But now the common module directly uses fastdfs_ client_ If v1.20.jar is imported through lib, because this method is not built through maven, so service In other words, even if the tool class is placed in the common module, neither the service nor the web module can access the tool class and import the corresponding package. When running the whole web project and uploading the file to the fastdfs system, classnotfoundexception will appear, unless both the service and the web module can inherit Fastdfs in common module_ client_ The jar package v1.20.jar
Solutions
1. Find the specific location of the package
2. Open the CMD and enter the directory of the third party jar package
3. Run the command to build the jar package manually
mvn install:install-file -Dfile=D:\Users\10856214\workspace-template\fastDfs\lib\fastdfs_client_v1.20.jar -DgroupId=fastdfs_client -DartifactId=fastdfs_client -Dversion=1.20 -Dpackaging=jar -DgeneratePom=true
4. Check the local warehouse to see if the jar package has been added to the local warehouse folder
5. Give the jar package to Maven for management and add it to pom.xml in
<span style="white-space:pre"> </span><dependency>
<span style="white-space:pre"> </span><groupId>fastdfs_client</groupId>
<span style="white-space:pre"> </span><artifactId>fastdfs_client</artifactId>
<span style="white-space:pre"> </span><version>1.20</version>
<span style="white-space:pre"> </span></dependency>
6. Restart Maven install common module to see if the service and web modules have been imported into the common module’s tool classes
net.sf.json .JSONObject maven20381;- 36182;
The last time you need to keep it, there are only two versions of jdk: json-lib-2.1-jdk13.jarand json-lib-2.1-jdk15.jar
: < <dependency&>
: <� � � � � → <groupId&> net.sf.json -lib</groupId&>
: < <artifactId&>json-lib</artifactId&>
: < <version&>2.4</version&>
: < <classifier&>jdk15</classifier&>
: < </dependency&>
Maven Packaging ERROR: Some problems were encountered while processing the POMs
Specific performance in Maven packaging error:
the command used is MVN clean package- Dmaven.test.skip
resolvent
Specifies the settings.xml Configuration file, possibly due to command line execution settings.xml If the file does not match the actual one, use the following command
MVN clean package -- settings{ settings.xml The actual path of}- Dmaven.test.skip
results of enforcement
Maven of springboot project pom.xml Unknown error in the first line of the file
Reason: the plug-in version of Maven is not compatible with IDE
Solution: add & lt; Maven jar to POM- plugin.version> ;3.1.1</maven-jar- plugin.version> That’s all
<properties>
< java.version> ;1.8
<maven-jar- plugin.version> ;3.1.1</maven-jar- plugin.version> ;
</properties>
Spring boot problem 1: error reporting life processing instructions for building a spring boot project
Operating environment
System: Windows 10
jdk:1.7
Development tool: Eclipse 4.6
Springboot version: 1.5.3
version
Build tool: Maven
0
Problems and their background
At the beginning of learning to build a spring boot project, the problems encountered.
After creating a new Maven project, add the pom.xml The file reported an error when adding the parent node (the content is as follows).
<parent>
<groupId> org.springframework.boot< ;/groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.4.2.RELEASE</version>
</parent>
The error information is as follows:
Error parsing lifecycle processing instructions
terms of settlement
According to the search results, two ideas are found
1. It is said that there is a problem with this version of eclipse, and the Maven plug-in needs to be updated.
2. It is said that there is a dependency conflict. You can clear the Maven warehouse and update it again.
The first method was tried, but it didn’t solve the problem. So we tried the second method to clear all the dependencies under. M2/repository/in the user’s home directory. Then, in eclipse, right-click the project — & gt; Maven — & gt; update project. After waiting for the update to complete, the error disappears automatically.
Error picture information:
Idea introduces dependency and starts jar error in opening zip file
Question:
reason:
When Maven download is dependent, the jar may not be downloaded to the local normally due to network reasons. If you start the project reference, an error will be reported, and the local Maven jar cannot be used normally
terms of settlement:
There is a stupid way to find out which jars are open with errors. Find the corresponding jars in the local Maven repository and delete them, pom.xml After testing, no error will be reported
pom.xml Depending on the error report, the problem of missing artifact XXX is solved
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);


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>