Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Add a remote Archetype Catalog in IntelliJ

I am new to IntelliJ but coming from Eclipse I expected Maven support to be far better. It really is but I could not find how to define a remote archetype catalog in IntelliJ (14.1).

All I could find was a way to add a Archetype manually but that is not what I need. I would like to point to a XML file on a remote server that contains the list of all archetypes available.

In Eclipse, it looks like this :

enter image description here

like image 447
Olivier.Roger Avatar asked May 21 '15 15:05

Olivier.Roger


People also ask

Where is archetype of existing Maven project in IntelliJ?

You can also click Manage Catalogs and add a custom repository if you need. Archetype: select the needed Maven archetype. Click Add to specify the custom archetype. Version: the version is specified automatically.

How do I change my archetype in IntelliJ?

Once a maven project is created, whether with archetype or "blank" (I mean with minimum POM), you are free to add dependencies and plugins as you want. But you can't apply another archetype to a created project.

How do I create an archetype from an existing project in IntelliJ?

Creating a new maven project, you can create the project from an existing archetype or add a new archetype: new Project -> Select Maven -> Select the checkbox "create from archetype" Click on Add Archetype button and fill the GroupId, Artifact Id, and version on the "Add Archetype" dialog box.


2 Answers

Maybe you would like to try an Intellij Plugin that I wrote yesterday. It enables you to add remote archetype catalogs to Idea: Maven Archetype Catalog plugin

To make my answer more clear: I had the same issue that it struggles me that you can add Maven Archetype Catalog files in Eclipse, but not in IntelliJ IDEA. So I tried to write a plugin for IntelliJ IDEA, so that you can actually define URLs to archetype-catalog.xml.

The plugin just parses those URLs and provides the Maven Archetypes to the list of available Archetypes in IntelliJ IDEA.

After installing the Plugin you can find a new entry in the Settings menu at File - Settings - Build, Execution and Deployment - Build tools.

like image 120
Dominik Marks Avatar answered Sep 18 '22 07:09

Dominik Marks


I know this is kinda old thread, but in the future if some one will look for it.

This Maven Archetype Catalogs is a plugin for intellij that allows import external archetypes from a URL. It solved my problem on Linux, haven't tried it on Windows.

To add this plugin go to File->Settings->Plugins->Browse repositories in the search bar type "Maven Archetype Catalogs". Install and restart.

To use it go to File -> Settings -> Build, Execution, Deployment -> Build Tools -> Maven Archetype Catalogs. click the '+' and add the archetype-catalog

like image 45
TTaaLL Avatar answered Sep 17 '22 07:09

TTaaLL