Hi,

It sounds like you're looking for the parse-version goal of the build-helper-maven-plugin: http://www.mojohaus.org/build-helper-maven-plugin/parse-version-mojo.html. It can decompose the project version into several Maven properties. There is an example of usage here http://www.mojohaus.org/build-helper-maven-plugin/usage.html#Access_the_parsed_components_of_a_project_version.

Guillaume


Le 03/01/2017 à 19:25, org.apache.maven.u...@io7m.com a écrit :
Hello.

I have a small project that contains a plugin for Blender[0]. Plugins
in Blender are Python files that must contain a hash value at the top
of the file containing version information. The version information has
to be numeric constants as Blender actually parses this data rather
than evaluating it in an interpreter.

https://github.com/io7m/smf/blob/develop/io7m-smfj-blender/src/main/resources/__init__.py

Right now, I'm having to remember to manually insert the right version
number each time I increment the Maven version. I'd much rather filter
the Python source file as a resource instead, but unfortunately I'd
need to transform the Maven version string:

   2.3.1 → (2, 3, 1)

Is there an existing plugin that can do this? I assume that it'd be
some sort of templating engine. Unfortunately, all of the search
results for that seem to be in regards to the site plugin.

M

[0] http://blender.org


---
L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel 
antivirus Avast.
https://www.avast.com/antivirus


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org

Reply via email to