Import a plugin project
Updated at 1712627212000Preparation
- 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 theezyblog
folder. - Find the
module.properties
file 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
ezyarticle
plugin if you don't know how to add a plugin, you can refer to this article. - After adding the plugin, go back to the ezyblog folder, open the terminal, and run the command
bash export.sh
on Linux orexport.bat
on 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 is because of the difference in the ezyarticle version between the source code and ezyplatform. Find the folder ezyplatform/admin/plugins/ezyarticle/lib
, and you will see the actual version of ezyarticle:
For example, mine is 0.0.5
. Then open the ezyblog/pom.xml
file and change the version of ezyarticle to 0.0.5
as follows:
<properties> <!--suppress UnresolvedMavenProperty --> <ezyplatform.home>${env.EZYPLATFORM_HOME}</ezyplatform.home> <ezyarticle.version>0.0.5</ezyarticle.version> </properties>
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
ezyblog
theme 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
EzyBlogThemeStartupTest
class to initialize the ezyblog theme from IntelliJ.