Import a plugin project
Updated at 1775987882000Let's say you have downloaded the source code of the ezyblog project [here](https://ezyplatform.com/market/items/ezyblog?tab=versions) and you want to import the project into IntelliJ, you can follow these steps.
Preparation
- Make sure you have installed ezyplatform without using Docker beforehand.
- Ensure that you have installed ezyplatform sdk beforehand.
- Make sure you have built the necessary libraries and set up environment variables. If not, you can refer to this article.
Install the necessary plugins.
- Unzip the source code zip file you just downloaded, for example
ezyblog-0.0.1-sources.zip, and you will receive theezyblogfolder. - Find the
module.propertiesfile to check for dependencies. For ezyblog, you can find the file atezyblog/module.properties. You will see a list of dependencies:
# Other properties project_name=EzyBlog dependencies=ezyarticle
- Now start ezyplatform, access the admin interface, and add the
ezyarticleplugin if you don't know how to add a plugin, you can refer to [this article](https://youngmonkeys.org/ezyplatform/guides/add-a-plugin-to-your-ezyplatform). - After adding the plugin, go back to the ezyblog folder, open the terminal, and run the command
bash export.shon Linux orexport.baton Windows. You may encounter the following error:
[ERROR] Failed to execute goal on project ezyblog-theme: Could not resolve dependencies for project org.youngmonkeys:ezyblog-theme:jar:0.0.1: The following artifacts could not be resolved: org.youngmonkeys:ezyarticle-sdk:jar:0.0.1, org.youngmonkeys:ezyarticle-web-plugin:jar:0.0.1: Could not find artifact org.youngmonkeys:ezyarticle-sdk:jar:0.0.1 at specified path /xxx/ezyplatform/web/plugins/ezyarticle/lib/ezyarticle-sdk-0.0.1.jar
This issue is caused by a version mismatch of EzyArticle between your source code and EzyPlatform. Please use the EzyPlatform SDK dependency synchronization command to align the plugin versions used in your project with those in EzyPlatform.
Now go back to the terminal of the
ezyblog directory you previously opened and run the command bash export.sh on Linux or export.bat on Windows, and you will see no more errors. However, if you encounter a java.lang.NullPointerException error, download the latest ezyplatform-sdk version.- Now restart ezyplatform.
- In the admin interface, find the
ezyblogtheme and activate it. - Restart admin, and then start the web.
- Access http://localhost:8080, if you see the ezyblog interface displayed, the installation was successful.
- Now turn off admin and web, and import ezyblog into IntelliJ.
- Rebuild ezyblog by double-clicking on "install" on the right side of IntelliJ.
If you encounter build errors, it may be related to IntelliJ not recognizing the EZYPLATFORM_HOME environment variable. You can refer to this article for troubleshooting.
- You can run the
EzyBlogThemeStartupTestclass to initialize the ezyblog theme from IntelliJ.