Instruction for Importing into IntelliJ
Opened this issue · 1 comments
dougnoel commented
- Install IntelliJ Community Version.
- Open Project -> Point to the folder the project is in.
- When prompted in the lower right, install the Cucumber plugin.
- Restart your IDE.
- You may do shared indexes if you like. Note that it is a paid feature after 30 days.
- Go to the Build menu select Build Project
- When prompted in the lower right select an SDK.
- In the SDK dropdown, select a version of Java supported by Sentinel (see the version information at the top of the Sentinel Readme.)
- Click Apply
- Click Ok
- Build-> Build Project
- In the bottom left there's a Build icon with Build. Clicking it shows you what happened in the build.
- In the Project sidebar on the left, Open sentinel/src/test/java/tests.
- Right-click on SentinelTests and select Run from the drop-down. All tests should execute and pass.
Editing Configs
- Run -> Run configurations
- In the Build and run section, there is a textbox with -ea in it. Add commandline arguments in that box AFTER the '-ea '
Running with code coverage
- Build -> Build Configurations
- Remove tests from the add section
- Remove "tests" from the files to add section.
- Select Run with Code coverage (makes sure you run all tests)
Bring Up Maven Window
View -> Tool Windows -> Maven
dougnoel commented
Prefer local version of sentinel over Maven Central
- Download Sentinel and open it up as a project in IntelliJ.
- Go back to sentinel.example project
- Select sentinel.example in the Maven window (View->Tool Windows->Maven)
- Project Structure->Project Settings->Module
- Click the + sign (Add) in the first column and select Import Module from the dropdown
- Select the location of the local sentinel project on your hard drive.
- Click Ok
- Select the Import module from external sources Radio Button.
- Select Maven in the list.
- Press the Create button.
- Press Ok
- Click the Dependencies Tab
- Click + (Add) and select Module Dependency from the dropdown
- Click the OK button.
- Select the Checkbox next to Sentinel in the Export column.
- Click Apply button
- Click Ok in Project Structure
- In the Maven Window (View->Tool Windows->Maven), click the Reload all Maven Projects button (looks like a browser refresh button) in the upper-left hand corner of the Maven Window.