Tag Archives: pom

An error is reported during Java operation due to the problem of static resource export

In this case, you need to add the following configuration in the pom.xml file

 <build>
    <resources>
        <resource>
            <directory>src/main/resources</directory>
            <includes>
                <include>**/*.properties</include>
                <include>**/*.xml</include>
            </includes>
            <filtering>true</filtering>
        </resource>

        <resource>
            <directory>src/main/java</directory>
            <includes>
                <include>**/*.properties</include>
                <include>**/*.xml</include>
            </includes>
            <filtering>true</filtering>
        </resource>
    </resources>
</build>

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&gt ;3.1.1</maven-jar- plugin.version&gt That’s all

    <properties>
        < java.version&gt ;1.8         <spring- cloud.version&gt ; Greenwich.SR1&lt ;/spring- cloud.version&gt ;
        <maven-jar- plugin.version&gt ;3.1.1</maven-jar- plugin.version&gt ;
    </properties>

About maven Pom.xml Personal solutions to reporting errors!!!

A personal solution for Maven’s pom.xml error!!
When importing someone else’s project or creating a project using Maven from the command line, you may encounter errors in the pom.xml file (as shown below).

The reason is the lack of a corresponding JAR package. (It may be that the corresponding JAR package failed to download locally when we updated it) we need to update and download the corresponding JAR package by ourselves; Here are the steps:
C:\Users\ Tian bin\.m2\ Repository: C:\Users\ Tian bin\.m2\ Repository
2. Go to the maven-resources-plugin folder with the correct version number (2.12.4 for me) and click on it. C:\Users\ Tian bin\.m2\ Repository \org\ Apache \ Maven \ Plugins \ Maven-Resources-Plugin

 
3, Delete all files ending with lastUpdated.
4. Open Eclipse, right click on our project Maven> Update project…

 
5. Click OK!

 
Note: if there are other similar this kind of mistake in the pom, in the same way, according to the error message, you know which jar package, lack is to own Maven download updates to the local path to find the jar location (jar is consistent with the name and the name of the folder), delete all ends in lastUpdated files in the folder, finally open eclipse, right-click on our engineering Maven> Update project… , click OK. That’s it!!
 
 
 
 
 
 
 
 
 
 
 
 
 
 

ERROR: Failed to parse POMs (How to Fix)

recently had this problem while working on the Jenkins build release,

ERROR: Failed to parse POMs
java.io.IOException: Can't read POM: /opt/gamma/.jenkins/jobs/indra-parent/workspace/pom.xml
	at jenkins.plugins.maveninfo.extractor.properties.PomPropertiesFinder.findProperties(PomPropertiesFinder.java:54)
	at jenkins.plugins.maveninfo.extractor.MavenInfoExtractor.extract(MavenInfoExtractor.java:58)
	at jenkins.plugins.maveninfo.extractor.MavenInfoEnvironment.tearDown(MavenInfoEnvironment.java:42)
	at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:882)
	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534)
	at hudson.model.Run.execute(Run.java:1720)
	at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:531)
	at hudson.model.ResourceController.execute(ResourceController.java:98)
	at hudson.model.Executor.run(Executor.java:410)

maven has actually been built and turned out to be a pom.xml header

The error was caused by a corrupt XML header which contained merge conflicts.

head is normal after modification for the following

<?xml version="1.0" encoding="UTF-8"?>
<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/xsd/maven-4.0.0.xsd">