Skip to content

Commit ce70818

Browse files
committed
Bug fixes
1 parent f9c3b3c commit ce70818

10 files changed

Lines changed: 2164 additions & 1593 deletions

File tree

docs/extensionAPI/vscode-api.md

Lines changed: 2117 additions & 1497 deletions
Large diffs are not rendered by default.

docs/java/extensions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ DateApproved: 11/14/2017
88
MetaDescription: Popular Java Extensions for VS Code
99
MetaSocialImage: TBD
1010
---
11-
# Java extensions for VS Code
11+
# Java Extensions for VS Code
1212

1313
Visual Studio Code provides many features as an editor. In addition to that, you can install some high quality extensions to add features to VS Code for Java development.
1414

16.5 KB
Loading
-6.84 KB
Loading
31.3 KB
Loading

docs/java/java-container.md

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ MetaSocialImage: TBD
1212

1313
This 15 minutes tutorial will walk you through the process of building a [Docker](https://docker.com/) image for running a Java application in Visual Studio Code.
1414

15-
## Scenario
16-
1715
We will continue using the same Spring Boot application we built in our first [Java Tutorial](/docs/java/java-tutorial.md).
1816

1917
[Docker](https://docker.com/) is a Linux container management toolkit which allows users to publish container images and consume those published by others. A Docker image is a recipe for running a containerized process. In this tutorial, we will build an Docker image for the web app, run the image locally and then finally deploy it to the cloud.
@@ -65,16 +63,24 @@ Test the web app by browsing to `http://localhost:8080` using a web browser. You
6563

6664
![Greeting from Spring](images/java-tutorial/greeting-from-spring.png)
6765

68-
## Deploying images to Azure App Service
66+
## Push your image to Docker Hub
6967

70-
With the Docker Explorer, you can deploy images from DockerHub Registries or Azure Container Registries, directly to an Azure App Service instance. This functionality requires installing the [Azure Account](https://marketplace.visualstudio.com/items?itemName=ms-vscode.azure-account) extension and an Azure Subscription. If you do not have an Azure subscription, [sign up today](https://azure.microsoft.com//free/?b=16.48) for a free 30 day account and get $200 in Azure Credits to try out any combination of Azure services.
68+
You can deploy your docker image to Azure from either public or private container registory. In this tutorial, we will use Docker Hub. If you do not have a DockerHub account, create one from [Docker Hub](https://hub.docker.com/)
7169

72-
The first time you expand the DockerHub node, you'll be prompted to log into your DockerHub account.
70+
The first time you expand the DockerHub node in Docker Explorer, you'll be prompted to log into your DockerHub account.
7371

7472
![DockerHub Login](images/java-container/docker-hub-login.gif)
7573

7674
Your user name and password are stored in your operating system credentials vault (for example, MacOS keychain or Windows Credential Store) so that you don't need to log in every time. You can log out of DockerHub by right clicking on the DockerHub label and choosing **Log Out**. This will delete the credentials from the OS store.
7775

76+
Then push your image to DockHub. Make sure the name of your image starts with your Docker ID.
77+
78+
![Push Image](images/java-container/docker-push.png)
79+
80+
## Deploying images to Azure App Service
81+
82+
With the Docker Explorer, you can deploy images from DockerHub Registries or Azure Container Registries, directly to an Azure App Service instance. This functionality requires installing the [Azure Account](https://marketplace.visualstudio.com/items?itemName=ms-vscode.azure-account) extension and an Azure Subscription. If you do not have an Azure subscription, [sign up today](https://azure.microsoft.com//free/?b=16.48) for a free 30 day account and get $200 in Azure Credits to try out any combination of Azure services.
83+
7884
To log into Azure, run **Azure Login** from the **Command Palette** (`kb(workbench.action.showCommands)`). You can then sign into your account using the **Device Login** flow. Click on **Copy & Open** to open your default browser.
7985

8086
![Azure Login](images/java-container/device-login.png)
@@ -93,4 +99,4 @@ From here you will be prompted for a Resource Group, location, an App Service Pl
9399

94100
* If you're interested in another hot topic, serverless, please take a look at our [Java serverless Tutorial](/docs/java/java-serverless.md)
95101
* To learn more about Java Debugging features, see [Java Debugging Tutorial](/docs/java/java-debugging.md)
96-
* To learn more about Java on Azure, check out [Azure for Java developers](https://docs.microsoft.com//java/azure/)
102+
* To learn more about Java on Azure, check out [Azure for Java developers](https://docs.microsoft.com//java/azure/)

docs/java/java-tutorial.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ Order: 1
33
Area: java
44
TOCTitle: Java Tutorial
55
ContentId: 12d8264b-643f-4745-a7ea-8433dedb1331
6-
PageTitle: Java Web App Tutorial in VS Code
6+
PageTitle: Build Java Web App With VS Code
77
DateApproved: 11/14/2017
88
MetaDescription: Java tutorial showing Java language support in the Visual Studio Code editor.
99
MetaSocialImage: TBD
1010
---
11-
# Build a Java web app in VS Code
11+
# Build Java Web App With VS Code
1212

1313
This 5 minutes tutorial shows you how to create a simple Java web application with Visual Studio Code. You'll learn how to run and debug it locally, and prepare for running it in the cloud.
1414

@@ -22,9 +22,11 @@ A simple Spring Boot Getting Started web app
2222

2323
Before running and deploying this sample, you must have JDK and Maven on your local development environment. If not, please install them.
2424

25-
Download and install the Java SE Development Kit (JDK):
25+
Download and install the Java SE Development Kit (JDK), version 8:
2626

27-
<a class="tutorial-next-btn" href="http://www.oracle.com/technetwork/java/javase/downloads/index.html" target="_blank" style="background-color:#68217A">Download JDK</a>
27+
<a class="tutorial-next-btn" href="http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html" target="_blank" style="background-color:#68217A">Download JDK</a>
28+
29+
>**Note**: The `JAVA_HOME` environment variable must be set to the install location of the JDK to complete this tutorial.
2830
2931
Download Apache Maven version 3 or greater:
3032

@@ -38,9 +40,11 @@ Install Apache Maven for your local development environment:
3840

3941
Clone the [Spring Boot Getting Started](https://github.com/spring-guides/gs-spring-boot) sample project to your local machine. You can clone a Git repository with the **Git: Clone** command in the **Command Palette** (`kb(workbench.action.showCommands)`). Paste `https://github.com/microsoft/gs-spring-boot.git` as the URL of the remote repository and then decide the parent directory under which to put the local repository. After that, you can open the cloned repository in VS Code.
4042

43+
>**Note**: You can install Visual Studio Code from https://code.visualstudio.com/ and Git from https://code.visualstudio.com/.
44+
4145
![Clone Spring Repository](images/java-tutorial/clone-repository.gif)
4246

43-
Open any of the Java files in the repository. If you haven't got the Java related extensions installed with your VS Code, you would be recommended to install the Java extension pack. Just follow the instruction and install the Java Extension Pack from Microsoft.
47+
Open any of the Java files in the repository. If you haven't got the Java related extensions installed with your VS Code, you would be recommended to install the Java extension pack. Just follow the instruction and install the Java Extension Pack from Microsoft. Reload VS Code after the installation.
4448

4549
![Install Java Extensions](images/java-tutorial/install-extensions.gif)
4650

docs/java/java-webapp.md

Lines changed: 8 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ Order: 2
33
Area: java
44
TOCTitle: Java Web App
55
ContentId: 98ddf1d3-6a8e-4b0f-a44d-e57cfdf2348c
6-
PageTitle: Deploy Java Web App to Azure
6+
PageTitle: Deploy Java Web App to Cloud
77
DateApproved: 11/14/2017
88
MetaDescription: Java web app tutorial showing how to deploy a Java web app to Azure
99
MetaSocialImage: TBD
1010
---
11-
# Deploy a Java Web App to Azure
11+
# Deploy Java Web App to Cloud
1212

1313
In our [first tutorial](/docs/java/java-tutorial.md), we've build a Java web app running locally. This tutorial will show you how to run it in the cloud.
1414

@@ -22,11 +22,11 @@ If you don't have an Azure subscription, you can sign up for a [free Azure accou
2222

2323
The [Azure Command-Line Interface (CLI)](https://docs.microsoft.com/cli/azure/overview):
2424

25-
<a class="tutorial-next-btn" href="https://docs.microsoft.com//cli/azure/install-azure-cli" target="_blank" style="background-color:#68217A">Install Azure CLI 2.0</a>
25+
<a class="tutorial-next-btn" href="https://docs.microsoft.com/cli/azure/install-azure-cli" target="_blank" style="background-color:#68217A">Install Azure CLI 2.0</a>
2626

2727
[comment]: <> (Replace it with using App Service Extension once Java support is ready)
2828

29-
## Create an Azure service principal
29+
## Login with Azure CLI
3030

3131
We'll use the [Integrated Terminal](/docs/editor/integrated-terminal.md) in VS Code. To open the terminal you can either:
3232

@@ -44,69 +44,13 @@ az login
4444

4545
Follow the instructions to complete the sign-in process.
4646

47-
Create an Azure service principal:
47+
## Update your project to use Azure CLI for authentication
4848

49-
```bash
50-
az ad sp create-for-rbac --name "uuuuuuuu" --password "pppppppp"
51-
```
52-
53-
where `uuuuuuuu` is the user name and `pppppppp` is the password for the service principal.
54-
55-
Azure responds with JSON that resembles the following example:
56-
57-
```bash
58-
{
59-
"appId": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa",
60-
"displayName": "uuuuuuuu",
61-
"name": "http://uuuuuuuu",
62-
"password": "pppppppp",
63-
"tenant": "tttttttt-tttt-tttt-tttt-tttttttttttt"
64-
}
65-
```
66-
67-
> You will use the values from this JSON response when you configure the Maven plugin to deploy your web app to Azure. The `aaaaaaaa`, `uuuuuuuu`, `pppppppp`, and `tttttttt` are placeholder values, which are used in this example to make it easier to map these values to their respective elements when you configure your Maven `settings.xml` file in the next section.
68-
69-
## Configure Maven to use your Azure service principal
70-
71-
Open your Maven `settings.xml` file in a text editor. There are two locations where the `settings.xml` file may live:
72-
73-
* The Maven install: ${maven.home}/conf/settings.xml
74-
* A user’s install: ${user.home}/.m2/settings.xml
75-
76-
Below are some examples:
77-
78-
* Windows: `%ProgramFiles%\apache-maven\3.5.0\conf\settings.xml`
79-
* Mac installed by Homebrew: `/usr/local/Cellar/maven/3.5.0/libexec/conf`
80-
81-
Add your Azure service principal settings from the previous section of this tutorial to the `<servers>` collection in the `settings.xml` file.
82-
83-
For example:
84-
85-
```bash
86-
<servers>
87-
<server>
88-
<id>azure-auth</id>
89-
<configuration>
90-
<client>aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa</client>
91-
<tenant>tttttttt-tttt-tttt-tttt-tttttttttttt</tenant>
92-
<key>pppppppp</key>
93-
<environment>AZURE</environment>
94-
</configuration>
95-
</server>
96-
</servers>
97-
```
98-
99-
Where:
49+
Open your `pom.xml` file in your project folder (complete). Find and remove the below snippet in azure-webapp-maven-plugin configuration section so we will authenticate with Azure using Azure CLI, which we've already logged in with.
10050

101-
Element | Description
102-
---|---
103-
`<id>` | Specifies a unique name which Maven uses to look up your security settings when you deploy your web app to Azure.
104-
`<client>` | Contains the `appId` value from your service principal.
105-
`<tenant>` | Contains the `tenant` value from your service principal.
106-
`<key>` | Contains the `password` value from your service principal.
107-
`<environment>` | Defines the target Azure cloud environment, which is `AZURE` in this example. (A full list of environments is available in the [Maven Plugin for Azure Web Apps](TBD) documentation)
51+
![Remove Authentication](images/java-webapp/remove-auth.png)
10852

109-
Save and close the `settings.xml` file.
53+
>**Note**: This specific configuration will instead using Service Principal for authentication. More details could be found at [Configure Maven to use your Azure Service Principal](https://docs.microsoft.com/en-us/azure/app-service/app-service-web-deploy-spring-boot-app-with-maven-plugin#configure-maven-to-use-your-azure-service-principal)
11054
11155
## Build and deploy your web app to Azure
11256

scripts/api-doc/doc.js

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
"use strict";
21
/*---------------------------------------------------------------------------------------------
32
* Copyright (c) Microsoft Corporation. All rights reserved.
43
* Licensed under the MIT License. See License.txt in the project root for license information.
54
*--------------------------------------------------------------------------------------------*/
6-
var marked = require("marked");
7-
var model_1 = require("./model");
5+
var marked = require('marked');
6+
var model_1 = require('./model');
87
function doc(value) {
98
var data = JSON.parse(value);
109
var start = data.children[0].children[0]; //vscode-docs/issues/162
@@ -50,14 +49,14 @@ var Builder = (function () {
5049
}
5150
}
5251
// Namespaces
53-
for (var _b = 0, namespaces_1 = namespaces; _b < namespaces_1.length; _b++) {
54-
var item = namespaces_1[_b];
52+
for (var _b = 0; _b < namespaces.length; _b++) {
53+
var item = namespaces[_b];
5554
this._onContainerType(item, true);
5655
}
5756
// Types
5857
types.sort(function (a, b) { return a.name.localeCompare(b.name); });
59-
for (var _c = 0, types_1 = types; _c < types_1.length; _c++) {
60-
var item = types_1[_c];
58+
for (var _c = 0; _c < types.length; _c++) {
59+
var item = types[_c];
6160
this._onContainerType(item);
6261
}
6362
return this._builder.join('');
@@ -97,15 +96,15 @@ var Builder = (function () {
9796
'Static', 'Constructors', 'Properties', 'Methods',
9897
'Enumeration members'
9998
];
100-
for (var _d = 0, titles_1 = titles; _d < titles_1.length; _d++) {
101-
var title = titles_1[_d];
99+
for (var _d = 0; _d < titles.length; _d++) {
100+
var title = titles[_d];
102101
var items = groups[title];
103102
if (!items || items.length === 0) {
104103
continue;
105104
}
106105
this._h4(title);
107-
for (var _e = 0, items_1 = items; _e < items_1.length; _e++) {
108-
var child = items_1[_e];
106+
for (var _e = 0; _e < items.length; _e++) {
107+
var child = items[_e];
109108
switch (child.kind) {
110109
case model_1.Kind.Variable:
111110
case model_1.Kind.Property:
@@ -196,7 +195,7 @@ var Builder = (function () {
196195
this._builder.push('\n\n' + value + '\n\n');
197196
};
198197
return Builder;
199-
}());
198+
})();
200199
// ---- helpers to get html from md-comments and type & item info
201200
function md(value, bucket) {
202201
if (value) {
@@ -231,8 +230,8 @@ function comment2HtmlString(comment, useReturn) {
231230
// as list items
232231
for (var key in tags) {
233232
var values = tags[key];
234-
for (var _b = 0, values_1 = values; _b < values_1.length; _b++) {
235-
var value = values_1[_b];
233+
for (var _b = 0; _b < values.length; _b++) {
234+
var value = values[_b];
236235
if (value) {
237236
md("* *" + key + "* - " + value, parts);
238237
}
@@ -254,8 +253,8 @@ function itemName2HtmlString(item, parent) {
254253
}
255254
else {
256255
var parts = [];
257-
for (var _i = 0, typeParameter_1 = typeParameter; _i < typeParameter_1.length; _i++) {
258-
var typeParam = typeParameter_1[_i];
256+
for (var _i = 0; _i < typeParameter.length; _i++) {
257+
var typeParam = typeParameter[_i];
259258
parts.push(typeParam.name);
260259
}
261260
result = name + '&lt;' + parts.join(', ') + '&gt;';

scripts/api-doc/model.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
1-
"use strict";
21
/*---------------------------------------------------------------------------------------------
32
* Copyright (c) Microsoft Corporation. All rights reserved.
43
* Licensed under the MIT License. See License.txt in the project root for license information.
54
*--------------------------------------------------------------------------------------------*/
6-
Object.defineProperty(exports, "__esModule", { value: true });
7-
var Kind;
85
(function (Kind) {
96
Kind[Kind["ExternalModule"] = 1] = "ExternalModule";
107
Kind[Kind["Module"] = 2] = "Module";
@@ -20,4 +17,5 @@ var Kind;
2017
Kind[Kind["Constructor"] = 512] = "Constructor";
2118
Kind[Kind["Method"] = 2048] = "Method";
2219
Kind[Kind["Property"] = 1024] = "Property";
23-
})(Kind = exports.Kind || (exports.Kind = {}));
20+
})(exports.Kind || (exports.Kind = {}));
21+
var Kind = exports.Kind;

0 commit comments

Comments
 (0)