Run Scheduler with Intellij Idea
程序员文章站
2022-03-02 22:47:13
...
Preparation
- Intellij Idea ULTIMATE (mine is 17.02)
- Plugins
- Lombok
- Save Actions
Build project
After download hue-scheduler
with git clone. Run "mvn package" to build the project.
Open Idea
Need to pre set some environment variables, so we can write script according to eclipse.sh
.
I share mine.
#!/bin/bash
SET_ENV_DIR=$WORK_SPACE_DIR/set-env.sh
if [ -f $SET_ENV_DIR ]
then
source $SET_ENV_DIR
`/opt/idea-IU-172.3317.76/bin/idea.sh` >& /dev/null &
else
echo "no source file in ${WORK_SPACE_DIR}"
fi
Import projects
- Select
New
->Project from Existing Sources
-> Selecthue-scheduler
- Select
Import project from external model
->Maven
-> PressNext
- Enable check box
Search for projects recursively
, and enable check boxImport Maven projects automatically
-> PressNext
- Press
Next
utilFinish
Config server
- Add Tomcat application server
- Open Settings dialog: From menu bar,
File
->Settings...
- Open Application Servers setting:
Build, Execution, Deployment
->Application Servers
- Add Tomcat: Click the top-leftmost
+
symbel -> Select your Tomcat install path -> ClickOK
- Apply settings: Click
Apply
-> ClickOK
- Open Settings dialog: From menu bar,
- Create Tomcat server
- Open Run Configurations: From menu bar,
Run
->Edit configurations
- Add local Tomcat server: Click the top-leftmost
+
symbel ->Tomcat Server
->Local
-> A local Tomcat server created
- Open Run Configurations: From menu bar,
- Config Tomcat
- VM options: Select a local Tomcat server -> config VM options from
Server
tag. - Deployment setting: Select
Deployment
tag -> click the+
symbel ->Artifact
-> Select thehue-scheduler-front:war exploded
artifact to deploy - Config application context: input
/hue-scheduler-front
- Apply configurations: Click
Apply
-> ClickOK
- VM options: Select a local Tomcat server -> config VM options from
- Config Project Structure
- Wipe out some incorrect content root: Open
Project Structure
-> Clickhue-scheduler-front
-> SelectSources
tag -> Wipe out WrongContent Root
- Wipe out some unnecessary modules: Open
Project Structure
-> Deletehue-scheduler-front-aggregator
andhue-scheduler-client-lib
. (Actually, what we need ishue-scheduler-client-lib-server-side
that will be added next). - Now, You can boot Server for test.
- Wipe out some incorrect content root: Open
Config class path and deployment assembly
- Import project
hue-scheduler-client-lib
, it will be shown ashue-scheduler-client-lib-aggregator
- Select module
hue-scheduler-front
, and open module setting dialog. - Select
Dependencies
tag, removehue-scheduler-client-lib-server-side
library file, and add importedhue-scheduler-client-lib-server-side
module - Select
Artifacts
from left panel, and selecthue-scheduler-front:war exploded
, and selectOutput Layout
- Select
WEB-INF
->lib
-> Removehue-scheduler-client-lib
library file - Select
WEB-INF
->classes
->+
->Module Output
-> Choosehue-scheduler-client-lib-server- side
- Select
- Apply configurations: Click
Apply
-> ClickOK
上一篇: IntelliJ IDEA
推荐阅读
-
IntelliJ IDEA 2020如何设置背景图片的方法步骤
-
IntelliJ IDEA2020新增禅模式和LightEdit模式
-
IntelliJ Idea SpringBoot 数据库增删改查实例详解
-
Intellij IDEA 热部署处理方法(图解)
-
新版本IntelliJ IDEA 构建maven,并用Maven创建一个web项目(图文教程)
-
Intellij IDEA搭建vue-cli项目的方法步骤
-
所有Intellij IDEA Cannot Resolve Symbol XXX问题的解决方法汇总
-
IntelliJ IDEA 中使用jRebel进行 Java 热部署教程图解
-
IntelliJ IDEA部署web项目,Tomcat没有出现Artifacts
-
IntelliJ IDEA Ultimate、Community、EAP版本的区别