Re: 'modelVersion' is missing.

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Re: 'modelVersion' is missing.

Robert Scholte-8
Hi Mark,

I assume these are parent pom's right?
Are they part of the reactor or are they poms from a remote repository?

The order of resolving parents has changed a bit: it used to look in the cache based on GAV, followed by matching the path of this modelSource.
Now it is kind of the other way around: look in cache by relativePath or read by relativePath, next match the GAV.

Were these poms generated?

thanks,
Robert
On 29-1-2020 22:05:58, Mark Derricutt <[hidden email]> wrote:
Hey all,
Interesting - I just rebuilt my maven dev snapshot ( last build yesterday worked fine ) and now I hit:
[ERROR] Error executing Maven.
org.apache.maven.model.building.ModelBuildingException: 2 problems were encountered while building the effective model for smx3:smx3.upstream.testing.bill-of-materials:1.0.46-SNAPSHOT
[ERROR] 'modelVersion' is missing. @ com.smxemail.tiles:com.smxemail.tiles.release:2.1.71
[ERROR] 'modelVersion' is missing. @ com.smxemail.tiles:com.smxemail.tiles.enforcements:3.1.18
This looks to have been introduced/tripped by commit:
716cc1fe026618 [MNG-5669] same pom.xml is read multiple times
Interesting, it does seem I'm missing the modelVersion element in my maven tiles, so I'm actually fine with this blowing up as I can easily add that and rerelease our tiles.
I suspect this was from:
- modelRequest.setModelSource( new FileModelSource( pomArtifact.getFile() ) ); + modelRequest.setModelSource( new ArtifactModelSource( pomArtifact.getFile(), + pomArtifact.getGroupId(), + pomArtifact.getArtifactId(), + pomArtifact.getVersion() ) );
Just thought I'd query this, and maybe we can note it somewhere in some release notes or something...
Cheers,
Mark
"The ease with which a change can be implemented has no relevance at all to whether it is the right change for the (Java) Platform for all time." — Mark Reinhold.
Mark Derricutt | Senior Developer
Phone: +64 9 302 0515 Fax: +64 9 302 0518
Mobile: +64 21 562 533 Freephone: 0800 SMX SMX (769 769)
Twitter: @talios
SMX Limited: Level 10, 19 Victoria Street West, Auckland, New Zealand
Web: http://smxemail.com [http://smxemail.com]
[Cloud Email Hosting &amp; Security]