non-parseable pom.properties

已回答

When importing modules from existing sources, pom.properties files in target folders are creating maven projects which will cause “Non-parseable POM” errors when doing maven synch on the maven module:
 

only way of getting rid of it is to manually unlink the maven project :/

any ideas how to avoid this but to only import cleaned source structures?

0
Could you check if "Exclude build directory %PROJECT_ROOT%/target" is unchecked in  Settings | Build, Execution, Deployment | Build Tools | Maven | Importing ?
0

It is checked … Also the problem occures in sub modules in multi module maven projects, so the exclusion of %PROJECT_ROOT%/target seems quite useless here anyway
----- 

It will not even make sense if this would be unchecked: the files names are “pom.properties” not “pom.xml” :D 

----- 

It also does not matter if I choose “New → Project from existing sources …”  or “New → Module from existing sources …” 
Problem occurs in both cases …

Additionally I found out that the problem also occurs when importing clean sources:

  •  executing “mvn clean” 
  • “New → Project from existing sources …”
  •  executing “mvn install” 
  • right click on root “Maven → Sync Project”
     

Only way to get rid of it is to manually unlink those “modules” → after that the problem is gone for good 

----

btw: IntelliJ IDEA 2025.1.2 (Ultimate Edition)

0

UPDATE:
The problem is only reproducible when activating recursive scanning during import in “settings for new projects”:
 


----

I had activated this because the modules did not got recognized before …

That and also problems with unknown packages from maven dependencies got introduced by an unknown plugin!

I deactivated ALL plugins but maven and properties, unchecked the recursively checkbox and now it works as expected… …

----

nonetheless it is a bug that pom.properties are getting recognized as pom.xml and so also get parsed like an XML ;) 

0
Thanks for sharing the fix. I was able to find the existing bug IDEA-267237 (https://youtrack.jetbrains.com/issue/IDEA-267237) . We will test it with the latest version and report it to the developer to be checked.
1

请先登录再写评论。