Skip to content

Commit d4f4bf1

Browse files
committed
moved(dependencies) discussion from p3 to p4 since that is where we first add a dependency
1 parent 8dbc45b commit d4f4bf1

4 files changed

Lines changed: 12 additions & 12 deletions

File tree

chess/3-web-api/getting-started.md

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -38,18 +38,6 @@ This should result in the following additions to your project.
3838
   └── StandardAPITests.java
3939
```
4040

41-
## Dependencies
42-
43-
There is a lot of 3rd party code that you can download and include in your Java applications. As part of the starter project, we already included packages that run your JUnit tests, process JSON, handle logging, and make HTTP network requests.
44-
45-
We use a cloud based package repository called Maven to manage our dependencies. The starter chess repository already included all the necessary dependencies that you need to this point. You can view these dependencies using IntelliJ by opening the `Project Structure` dialog, going to the `modules` tab, and selecting the `server` module.
46-
47-
![Existing dependencies](existingDependencies.png)
48-
49-
If you need to include additional dependencies in the future, select the module you wish to add a dependency to. Press the `+` button and select `Library/from Maven...`. You then supply the name of the library you want to download. Once it is added, you can specify the `scope` for the dependency. Most dependencies for this class will be with scope "compile", meaning that the dependency is available to all the code in the module when it compiles. There are a few others, including "test", which means it is only available for code used to test the code in the module.
50-
51-
<img src="install-dependency.gif" alt="Install dependency" width="600px" height="auto">
52-
5341
## Getting the Webpage for Testing Setup
5442

5543
Once you have completed **all** of the previous steps you should be able to launch your server and access a testing HTML page. This is a simple frontend that was made to help with basic testing of your server endpoints.

chess/4-database/getting-started.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,18 @@ This should result in the following additions to your project.
2525
   └── DatabaseTests.java
2626
```
2727

28+
## Using Maven to Add Package Dependencies
29+
30+
There is a lot of 3rd party code that you can download and include in your Java applications. As part of the Phase 0 starter Chess project, we already included packages that run your tests (JUint), serialize JSON (Gson), handle logging (Slf4j), and make HTTP network requests (Javalin).
31+
32+
We use a cloud based package repository called **Maven** to manage our dependencies. All of the starter chess dependencies were pull from Maven and included in the project. You can view these dependencies using IntelliJ by opening the `Project Structure` dialog, going to the `modules` tab, and selecting the `server` module.
33+
34+
![Existing dependencies](existingDependencies.png)
35+
36+
Now you need to include some additional dependencies in order to connect to your MySQL database server and hash your passwords. From the `Project Structure` dialog select the module you wish to add a dependency to. Press the `+` button and select `Library/from Maven...`. You then supply the name of the library you want to download. Once it is added, you can specify the `scope` for the dependency. Most dependencies for this class will be with scope "compile", meaning that the dependency is available to all the code in the module when it compiles. There are a few others, including "test", which means it is only available for code used to test the code in the module.
37+
38+
<img src="install-dependency.gif" alt="Install dependency" width="600px" height="auto">
39+
2840
## Dependencies
2941

3042
Add the dependency for the MySQL driver and BCrypt. Associate them with your `server` module.

0 commit comments

Comments
 (0)