Run Scheduler with Intellij Idea

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

  1. Select New -> Project from Existing Sources -> Select hue-scheduler
  2. Select Import project from external model -> Maven -> Press Next
  3. Enable check box Search for projects recursively, and enable check box Import Maven projects automatically -> Press Next
  4. Press Next util Finish

Config server

  1. Add Tomcat application server
    1. Open Settings dialog: From menu bar, File -> Settings...
    2. Open Application Servers setting: Build, Execution, Deployment -> Application Servers
    3. Add Tomcat: Click the top-leftmost + symbel -> Select your Tomcat install path -> Click OK
    4. Apply settings: Click Apply -> Click OK
  2. Create Tomcat server
    1. Open Run Configurations: From menu bar, Run -> Edit configurations
    2. Add local Tomcat server: Click the top-leftmost + symbel -> Tomcat Server -> Local -> A local Tomcat server created
  3. Config Tomcat
    1. VM options: Select a local Tomcat server -> config VM options from Server tag.
    2. Deployment setting: Select Deployment tag -> click the + symbel -> Artifact-> Select the hue-scheduler-front:war exploded artifact to deploy
    3. Config application context: input /hue-scheduler-front
    4. Apply configurations: Click Apply -> Click OK
  4. Config Project Structure
    1. Wipe out some incorrect content root: Open Project Structure -> Click hue-scheduler-front -> Select Sources tag -> Wipe out Wrong Content Root
    2. Wipe out some unnecessary modules: Open Project Structure -> Delete hue-scheduler-front-aggregator and hue-scheduler-client-lib. (Actually, what we need is hue-scheduler-client-lib-server-side that will be added next).
    3. Now, You can boot Server for test.

Config class path and deployment assembly

  1. Import project hue-scheduler-client-lib, it will be shown as hue-scheduler-client-lib-aggregator
  2. Select module hue-scheduler-front, and open module setting dialog.
  3. Select Dependencies tag, remove hue-scheduler-client-lib-server-side library file, and add imported hue-scheduler-client-lib-server-side module
  4. Select Artifacts from left panel, and select hue-scheduler-front:war exploded, and select Output Layout
    1. Select WEB-INF -> lib -> Remove hue-scheduler-client-lib library file
    2. Select WEB-INF -> classes -> + -> Module Output -> Choose hue-scheduler-client-lib-server- side
  5. Apply configurations: Click Apply -> Click OK
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • afinalAfinal是一个android的ioc,orm框架 https://github.com/yangf...
    passiontim阅读 15,663评论 2 45
  • Spring Cloud为开发人员提供了快速构建分布式系统中一些常见模式的工具(例如配置管理,服务发现,断路器,智...
    卡卡罗2017阅读 135,324评论 19 139
  • 看到文章名字很多人就会想,这个小编又是一个标题党,蜂蜜明明是甜的,甜的就是有糖份的,喝他不发胖就好了怎么可能有减分...
    习惯与瘦身阅读 2,444评论 0 1
  • 朝来夕往华年度,可堪忍、经寒暑。隔着栏杆看陌路,风尘未远,榆杨已树,又送斜阳去。 客行正在徘徊处,乌鹊啁啁瓦檐暮。...
    铨斋阅读 4,324评论 0 20
  • 告别了十二年的寒窗苦读,告别了昔日的老师同学,告别了那个温暖的家,我再次启程了新的生活。2016年的八月底...
    宣超群阅读 1,638评论 0 1