'modelVersion' is missing.

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

'modelVersion' is missing.

Mark Derricutt-3

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

Cloud Email Hosting & Security


signature.asc (564 bytes) Download Attachment