Change module version using maven in pom.xml

Hi everyone,

I am new to module developing and I’m facing this problem: I have generated my new project using maven by the follwing command in powershell:
mvn archetype:generate `

"-DarchetypeGroupId=com.inductiveautomation.ignitionsdk" `
"-DarchetypeArtifactId=client-designer-gateway-archetype" `
"-DarchetypeVersion=1.2.0"

and everything went well, because I get all the folders structure and I can also compile and install the module to my Gateway. But, if I want to change the version or the description in pom.xml file just like this:
immagine

I notice that, when I re-install the module, the description has changed but the version not. Infact, when I open the module.xml file in the .modl, I see always the old version string. The commands that i run are:
mvn versions:set -DnewVersion="2.50.1-beta1"
which changes the version number in all the pom.xml files, and then:
mvn versions:commit
If I start a search for the old version string, there are no results but somehow, when run one of the followings:

mvn clean install
mvn clean compile

and then the
mvn clean package command,
in the module.xml I see always the very first version of my module (1.0.0-snapshot).

I use either Vs Code or Intellij, any help would be very useful.

Thanks

1 Like

The maven versions plugin doesn’t update the moduleVersion element in the ignition-maven-plugin configuration found in the build pom.xml.

If you will restrict your versioning scheme to be compatible with Ignition’s versions you can change it from a hard-coded version to something like ${project.version} instead as the examples do.

Thank you for replying, I will do this way :+1: