|
2 | 2 |
|
3 | 3 | > Manage Java projects in Visual Studio Code
|
4 | 4 |
|
5 |
| -[](https://github.com/microsoft/vscode-java-dependency/actions?query=workflow%3ACI+branch%3Amaster) |
| 5 | +[](https://github.com/microsoft/vscode-java-dependency/actions?query=workflow%3ACI+branch%3Amain) |
6 | 6 |
|
7 | 7 | ## Overview
|
8 | 8 |
|
9 | 9 | A lightweight extension to provide additional Java project explorer features. It works with [Language Support for Java by Red Hat](https://marketplace.visualstudio.com/items?itemName=redhat.java) to provide the following features:
|
10 | 10 |
|
11 |
| -* Project View |
| 11 | +### Project View |
12 | 12 |
|
13 |
| - |
| 13 | + |
14 | 14 |
|
15 |
| -* Create Java Projects |
| 15 | +### Create Java Projects |
16 | 16 |
|
17 |
| - |
| 17 | + |
18 | 18 |
|
19 |
| -* Export Jar |
| 19 | +### Export Jar |
20 | 20 | > Note: For Spring Boot projects, please use the build tool to build the executable jar, for example: `mvn package`.
|
21 | 21 |
|
22 |
| - |
| 22 | + |
| 23 | + |
| 24 | +### Manage Dependencies |
| 25 | + |
| 26 | +You can work with JAR files directly without any build tools. Go to `JAVA PROJECTS` view, find the `Referenced Libraries` node and click the `+` icon: |
| 27 | + |
| 28 | + |
| 29 | + |
| 30 | +If you want to fine-tune this, go to `settings.json` and look for the `java.project.referencedLibraries` entry. |
| 31 | + |
| 32 | +```json |
| 33 | +"java.project.referencedLibraries": [ |
| 34 | + "library/**/*.jar", |
| 35 | + "/home/username/lib/foo.jar" |
| 36 | +] |
| 37 | +``` |
| 38 | + |
| 39 | +You can tell that the glob pattern is supported. And here's more - you can include/exclude certain files, and attach source JARs: |
| 40 | + |
| 41 | +```json |
| 42 | +"java.project.referencedLibraries": { |
| 43 | + "include": [ |
| 44 | + "library/**/*.jar", |
| 45 | + "/home/username/lib/foo.jar" |
| 46 | + ], |
| 47 | + "exclude": [ |
| 48 | + "library/sources/**" |
| 49 | + ], |
| 50 | + "sources": { |
| 51 | + "library/bar.jar": "library/sources/bar-src.jar" |
| 52 | + } |
| 53 | +} |
| 54 | +``` |
23 | 55 |
|
24 | 56 | ## Requirements
|
25 | 57 |
|
|
0 commit comments