Search code examples
javamavenintellij-ideaintellij-pluginmaven-archetype

Display custom archetype properties in Intellij "create project from archetype" wizard


I have a custom maven archetype to define an internal company project structure. This archetype has some required additional properties. E.g.,system-code

<archetype-descriptor>
    <requiredProperties>        
        <requiredProperty key="system-code"/>
        ...
    </requiredProperties>
    ...
</archetype-descriptor>

If I run the artifact through the command line:

$ mvn archetype:generate -DarchetypeGroupId=... -DarchetypeArtifactId=... -DarchetypeVersion=...

The custom property is requested so the user doesn't need to know that this property exsists before running the mvn archetype:generate plugin.

$ Define value for property 'system-code':

What I want to do is something similar when I create a new project from the archetype in Intellij-idea. Following the advices of other SO questions, I've created an artifact-catalog and added the plugin maven artifacts catalog to Idea. So far all is working fine and I can create a new project from the archetype.

enter image description here

However, in the archetype properties dialog, there is no trace of the custom property system-code, and in some use cases the user doesn't have to know this property is required.

enter image description here

If I go ahead creating the project, I expected that maybe the system-code property would be requested in the command line, but that's not the case and the property creation fails precisely because the system-code property is missing.

[ERROR] Property system-code is missing.

If in the properties dialog I manually add the system-code property, all works as expected, but as I said, I think is something not easy to know for the user.

So, the question is if anyone knows if is it posible to display the archetype custom properties somehow in the Intellij-idea new project creation wizard?

Thanks in advance


Solution

  • Unfortunately, IntelliJ IDEA doesn't support it at the moment, you can watch/vote the issue in YouTrack.