sortpom wrongly reports the xml element <artifactId>
See original GitHub issueI have a pom file dependency:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
There are no issues reported. But as soon as I add an exclusions block to it:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
</exclusion>
</exclusions>
</dependency>
sortpom complains:
--- sortpom-maven-plugin:2.8.0:verify (default) @ project ---
Verifying file /home/user/Repos/project/pom.xml
The xml element <artifactId> should be placed before <groupId>
The file /home/user/Repos/project/pom.xml is not sorted
I believe the pom file is actually sorted correctly. I have checked the exclusion example in the maven official guide and it got groupId placed before the artifactId
sortpom doesn’t complain about this block
<parent>
<artifactId>spring-boot-starter-parent</artifactId>
<groupId>org.springframework.boot</groupId>
<version>2.0.4.RELEASE</version>
<relativePath></relativePath>
</parent>
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Sort Reporting Plugins · Issue #17 · Ekryd/sortpom - GitHub
The element it is placed under configuration which is sort of a free-text area. So if you want to sort the reportPlugins, you...
Read more >Maven pom sorting issue - Stack Overflow
Currently ,I have placed the modelversion before parent but still ,I am seeing the same error . Pom: <?xml version="1.0" encoding="UTF-8"?> ...
Read more >Maven-SortPom-Plugin - Google Code
xml file if the xml elements are unsorted. This goal ignores text formatting (such as indentation and line breaks) when it verifies if...
Read more >POM Reference - Maven
It is an XML representation of a Maven project held in a file named pom.xml ... This is a listing of the elements...
Read more >553583 – Misleading validation error in pom.xml - Bugs - Eclipse
Eclipse shows the following error for my pom.xml: The element type ... However, this error is wrong and misleading, because the dependency-tag is ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@Ekryd - Thanks for the prompt fix. The problem is solved.
Please have a look at the 2.9.0 version of SortPom. The problem should be solved.