-
Notifications
You must be signed in to change notification settings - Fork 3
Integrate avm archetype with Intellij IDEA to generate Avm project
Satya edited this page May 11, 2019
·
10 revisions
Instead of manually creating new maven based Avm project through "mvn archetype:generate .." command, you can configure the archtype in the Intellij. By doing so, you can generate same maven base Avm project using IDEA's New -> Project option.
- Select File -> New -> Project
- Select "Maven" in the left panel
- Select "Create from archetype" and click "Add Archetype.." button
- Enter the following information in the input box
Group Id: org.aion4j
Artifact Id: avm-archetype
Version: 0.6
Note: For latest version of avm archetype, please refer to Avm Archetype project.
- Now you should see avm-archetype in the list of available archetype. You can have multiple versions of same archetype.
- Select File -> New -> Project
- Select "Maven" in the left panel
- Select "Create from archetype"
- Select "org.aion4j:avm-archetype" and expand it
- Select the archetype version, click "Next"
- In next screen, enter Group Id, Artifact Id and Version for your project
Example:
Group Id: org.test
Artifact Id: MyFirstContract
Version: 1.0-SNAPSHOT
- Click "Next" to generate the project
- Verify the information, then click Next and then "Finish" to generate the project.
Voilà, your maven Avm smart contract project is created.
Note: If you see a prompt to "Maven Project needs to be imported" at the right bottom side of the editor, choose "Enable Auto-Import"
- To open an existing Avm project, select File -> Open and choose project folder
- Intellij has in-built support for maven. So it automatically detects any maven based project
- You can also install Intellij's command line launcher to open the project in Intellij from command line
- To install intellij's command line launcher from IDE, select "Tools -> Create Command-line Launcher ..."
- Then you can run the following command inside any project folder to open the project in the editor
$> idea .
- You can select "Terminal" tab in the bottom panel. It shows the command prompt. You can execute any maven command from the terminal window inside the IDE
- Alternatively, you can explore the "Maven" tab at the right side panel of the IDE.