Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 349688

Summary: Provide a tool to reset POM versions to match manifest versions
Product: z_Archived Reporter: Eléna L Simon <elena.simon>
Component: TychoAssignee: Igor Fedorenko <igor>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: igor, t-oberlies
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
.patch for relativePath parameter none

Description Eléna L Simon CLA 2011-06-17 09:42:51 EDT
We want to update the pom version tag in all child modules to be the same as in the manifest. As the pomgenerator is using the manifest-attributes to generate poms it would be nice to have an relativePath command parameter or have an approach where an existing parent pom would be used. 

Our parent pom is in a separate folder (e.g ../<path to project>/builder/pom.xml),
so I can't just generate new child poms and replace the parent pom. At the moment I need to add the relativePath to every child pom manually. Doing so within the plugin would be very helpful.

I have a .patch for the relativePath command parameter, as this is just minor changes to the code. See attached file.´
Comment 1 Eléna L Simon CLA 2011-06-17 09:43:18 EDT
Created attachment 198179 [details]
.patch for relativePath parameter
Comment 2 Igor Fedorenko CLA 2011-08-09 14:12:47 EDT
I am not sure I understand the usecase. Do you want to update pom.xml versions to match bundle manifests?
Comment 3 Eléna L Simon CLA 2011-10-04 02:22:12 EDT
Sorry for the late response. Yes the major usecase is to update pom.xml versions to match bundle manifest.
Comment 4 Igor Fedorenko CLA 2011-10-04 09:28:11 EDT
Ok, I understand the usecase, but I believe this functionality belongs to a new goal in tycho-versions-plugin. tycho-pomgenerator-plugin is for one-time initial generation of pom.xml files.
Comment 5 Tobias Oberlies CLA 2011-10-18 03:17:40 EDT
Comment on attachment 198179 [details]
.patch for relativePath parameter

The proposed patch falls short of the requirements: It is not sufficient to just override the parent pom path - the POM at that location may not match the specified GAV.
Comment 6 Tobias Oberlies CLA 2011-10-18 03:26:43 EDT
It may be a valid use case to generate POMs using an existing parent POM, but since this can be quite tricky to get right, I'm not sure that we want to pursue this idea at all.

For now, I changed the title to match your concrete requirement:
was: "tycho-pomgenerator-plugin should have a parentPom/relativePath command parameter",
now: "Provide a tool to reset POM versions to match manifest versions"

As Igor already proposed, this should probably be implemented as a new goal of the versions plugin. It would be great if you could propose another patch :-)
Comment 7 Eléna L Simon CLA 2011-10-18 03:29:30 EDT
Yeah. Seems like the best idea.

I'll see if I can find enough time to provide another patch. :-)
Though it could take some time.