Maven poms for plugins

Hi,

While working on the MKS plugin i've come to use the maven release plugin and found it nice and usefull : it handles nicely the needed operations to make a release (updating pom and tagging the scm, mainly).

But to make it even better for us, I would like to know if it is possible to propagate the pom version in the plugin.xml.
Any idea ?

3 comments

Thibaut wrote:

Hi,

While working on the MKS plugin i've come to use the maven release plugin and found it nice and usefull : it handles nicely the needed operations to make a release (updating pom and tagging the scm, mainly).

But to make it even better for us, I would like to know if it is possible to propagate the pom version in the plugin.xml.
Any idea ?


This sounds like the job for a Maven plugin. It would be that hard to
create a Maven plugin that would search for the string
"${project.version}" in the plugin.xml file and replace it with the
value of project/version in pom.xml. Get in touch with me if you need
help with this.

0

You do not need to create a plugin for that. Just use the resource filtering that is present in Maven. Use something like:

	
		
			src/main/resources
			true
			
				**/plugin.xml
			
		
				
			src/main/resources
			
				**/plugin.xml
			
		
	
...

]]>

0

yes, i discovered this a few days ago and it seems the right solution.

THanks for your tip !

0

Please sign in to leave a comment.