homberghp opened a new issue, #8632: URL: https://github.com/apache/netbeans/issues/8632
### Apache NetBeans version Apache NetBeans 26 ### What happened When I try to use a maven file for maven 4, the modelVersion is rejected by NetBeans. It appears as if the rejection stems from a lower Maven version, like the bundled one.  My assumption stems from the fact that a lower maven version reports with the same message. ```shell hom@twohundred:~/homberghp/mvnjpms/jmpsmaven $ mvn -version Apache Maven 3.9.10 (5f519b97e944483d878815739f519b2eade0a91d) Maven home: /usr/share/maven Java version: 21.0.7, vendor: Eclipse Adoptium, runtime: /usr/lib/jvm/jdk-21.0.7+6 Default locale: en_US, platform encoding: UTF-8 OS name: "linux", version: "6.11.0-29-generic", arch: "amd64", family: "unix" hom@twohundred:~/homberghp/mvnjpms/jmpsmaven $ mvn validate [INFO] Scanning for projects... [ERROR] [ERROR] Some problems were encountered while processing the POMs: [FATAL] 'modelVersion' of '4.1.0' is newer than the versions supported by this version of Maven: [4.0.0]. Building this project requires a newer version of Maven. @ line 4, column 19 @ [ERROR] The build could not read 1 project -> [Help 1] [ERROR] [ERROR] The project com.mycompany:jmpsmaven:1.0-SNAPSHOT (/home/hom/homberghp/mvnjpms/jmpsmaven/pom.xml) has 1 error [ERROR] 'modelVersion' of '4.1.0' is newer than the versions supported by this version of Maven: [4.0.0]. Building this project requires a newer version of Maven. @ line 4, column 19 [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 ``` It looks as if the validation of the maven file is done by some other agent than the selected maven version. ### Language / Project Type / NetBeans Component java maven maven 4 ### How to reproduce Create a project and adapt lines 2, 3, and 4 to read like below. Make maven 4 the selected maven version in Tools -> Options -> Java -> Maven -> Version ```xml <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.1.0 http://maven.apache.org/xsd/maven-4.1.0.xsd"> <modelVersion>4.1.0</modelVersion> <groupId>com.mycompany</groupId> <artifactId>jmpsmaven</artifactId> <version>1.0-SNAPSHOT</version> <packaging>jar</packaging> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <maven.compiler.release>21</maven.compiler.release> <exec.mainClass>com.mycompany.jmpsmaven.Jmpsmaven</exec.mainClass> </properties> </project> ``` So everywhere you see 4.0.0 in those line replace by 4.1.0 Just having the file open in the editor already results in the flagged error. ### Did this work correctly in an earlier version? No / Don't know ### Operating System Ubuntu 24.04 ### JDK JDK 21 ### Apache NetBeans packaging Apache NetBeans provided installer, Apache NetBeans binary zip ### Anything else Occurs always. I am trying to cooperate with a Maven maintainer to up the JPMS game for both Maven and NetBeans. ### Are you willing to submit a pull request? Yes -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org For additional commands, e-mail: notifications-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists