Parameters for mvn archteypes meanings and standards?

Been going through the Ignition SDK and learned how to use Maven to call the archetypes from Nexus.

I decided to first try to make a vision component by calling mvn archetype:generate -DarchetypeGroupId=com.inductiveautomation.ignitionsdk -DarchetypeArtifactId=vision-component-archetype -DarchetypeVersion=1.2.0

My idea is to make a dropdown that will have selections like Today, This Week, This Month, etc, that will then have two properties that show beginning and ending datetime objects representing the time frame selected from the dropdown.

My question comes when it come sto the paramter input during the archetype - what are the accepted conventions for groupId, artifactId, vesion and package? Any standard naming conventions or any keywords that should specifically be avoided? Lets say that I want my component to be called Date Range Selector - what would be a appropriate parameters to use?

groupId and package should be reverse domain name style.

For example, if I were building a toy module, I might use “com.kevinherron.ignition” or “com.digitalpetri.ignition” as my groupId.

The package should be a fully qualified package name: “com.kevinherron.ignition.vision” or something.

Your artifactId would be better named date-range-selector.

The version should be 1.0.0-SNAPSHOT and keep the -SNAPSHOT suffix until you are going to release something. Maven release artifacts are supposed to be immutable once published, but -SNAPSHOT artifacts can be continually published. Even if it’s only ever published to your maven local repository.

1 Like

Using my company name and your input, I ended up with something like

groupId: com.companyname.ignition
artifactId: date-range-selector
version: 1.0.0-SNAPSHOT
package: com.companyname.ignition.vision

Thanks. Figured its better to learn how this works now than to get into it and potentially have to change this it later.

Most of it is convention, but version should be something Ignition understands if you’ll also use it in the build plugin like we show in the examples: ignition-sdk-examples/pom.xml at 8a8746438eaf398e7a053b5f41a814b9ffc50ce9 · inductiveautomation/ignition-sdk-examples · GitHub

Ignition understands x.y.z and x.y.z-SNAPSHOT but not x.y or x.y-SNAPSHOT.

1 Like

That is good to know. I have not got to using the ignition-maven-plugin yet, I thought I should learn how to use maven just a little bit without it first.