From e03f636ae2ca95980338c30a137f99bdf3b3eaa6 Mon Sep 17 00:00:00 2001 From: Weidong Xu Date: Wed, 3 Jun 2020 11:16:50 +0800 Subject: [PATCH] update on depencencies --- sdk/keyvault/mgmt/pom.xml | 4 ---- sdk/management/docs/AUTH.md | 2 +- sdk/management/gulpfile.js | 10 +++++----- sdk/management/pom.xml | 7 +------ sdk/management/samples/pom.xml | 2 +- .../samples/CreateVirtualMachinesInParallel.java | 3 +-- .../samples/ManageVirtualMachinesInParallel.java | 2 +- .../CreateCosmosDBWithEventualConsistency.java | 12 ++++++------ .../cosmosdb/samples/ManageHACosmosDB.java | 12 ++++++------ 9 files changed, 22 insertions(+), 32 deletions(-) diff --git a/sdk/keyvault/mgmt/pom.xml b/sdk/keyvault/mgmt/pom.xml index a58977765cd0..4aca9290f115 100644 --- a/sdk/keyvault/mgmt/pom.xml +++ b/sdk/keyvault/mgmt/pom.xml @@ -56,10 +56,6 @@ azure-mgmt-graph-rbac 2.0.0-SNAPSHOT - - com.azure - azure-security-keyvault-certificates - com.azure azure-security-keyvault-keys diff --git a/sdk/management/docs/AUTH.md b/sdk/management/docs/AUTH.md index 94fd4b25f0f7..62359bef34c2 100644 --- a/sdk/management/docs/AUTH.md +++ b/sdk/management/docs/AUTH.md @@ -55,7 +55,7 @@ The value of `AZURE_AUTHORITY_HOST` can be set via [`KnownAuthorityHosts`](https Sample code to create a `AzureProfile`: ```java -//AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE, true); +//AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE); AzureProfile profile = new AzureProfile("", "", AzureEnvironment.AZURE); ``` diff --git a/sdk/management/gulpfile.js b/sdk/management/gulpfile.js index ac680a45aac2..d363414edea1 100644 --- a/sdk/management/gulpfile.js +++ b/sdk/management/gulpfile.js @@ -111,7 +111,7 @@ function codegen(project, cb) { const readmeFile = specRoot + '/' + mappings[project].source; console.log('Generating "' + project + '" from spec file ' + readmeFile); - var generator = '--fluent=true'; + var generator = '--fluent'; if (mappings[project].fluent !== null && mappings[project].fluent === false) { generator = ''; } @@ -120,13 +120,13 @@ function codegen(project, cb) { ? `--use=${path.resolve(args['autorest-java'])} ` : ''; - const regenManager = args['regenerate-manager'] ? ' --regenerate-manager=true ' : ''; + const regenManager = args['regenerate-manager'] ? ' --regenerate-manager ' : ''; const outDir = path.resolve(mappings[project].dir); cmd = autoRestExe + ' ' + readmeFile + ' --java ' + - ' --azure-arm=true ' + - ' --track1-naming=true --generate-client-as-impl=true --implementation-subpackage=models --sync-methods=all --required-parameter-client-methods=true --add-context-parameter=true --context-client-method-parameter=true --client-side-validations=true --client-logger=true ' + + ' --azure-arm ' + + ' --track1-naming --generate-client-as-impl --implementation-subpackage=models --sync-methods=all --required-parameter-client-methods --add-context-parameter --context-client-method-parameter --client-side-validations --client-logger ' + generator + ` --java.namespace=${mappings[project].package} ` + ` --java.output-folder=${outDir} ` + @@ -165,7 +165,7 @@ function deleteFolderRecursive(path) { }; async function prepareBuild() { - return shell.task('mvn package javadoc:aggregate -DskipTests=true -q'); + return shell.task('mvn package javadoc:aggregate -DskipTests -q'); } async function prepareStage() { diff --git a/sdk/management/pom.xml b/sdk/management/pom.xml index eeef4ee130f2..f1851acbf70d 100644 --- a/sdk/management/pom.xml +++ b/sdk/management/pom.xml @@ -66,11 +66,6 @@ azure-core-management 1.0.0-beta.8-SNAPSHOT - - com.azure - azure-security-keyvault-certificates - 4.1.0-beta.2 - com.azure azure-security-keyvault-keys @@ -84,7 +79,7 @@ com.azure azure-storage-blob - 12.6.0 + 12.6.1 com.github.spotbugs diff --git a/sdk/management/samples/pom.xml b/sdk/management/samples/pom.xml index 8d0fce3ab597..30a85e68e3b9 100644 --- a/sdk/management/samples/pom.xml +++ b/sdk/management/samples/pom.xml @@ -101,7 +101,7 @@ com.azure azure-cosmos - 4.0.1-beta.1 + 4.0.1-beta.3 io.fabric8 diff --git a/sdk/management/samples/src/main/java/com/azure/management/compute/samples/CreateVirtualMachinesInParallel.java b/sdk/management/samples/src/main/java/com/azure/management/compute/samples/CreateVirtualMachinesInParallel.java index 78f263c56989..5a2dc2c2b27f 100644 --- a/sdk/management/samples/src/main/java/com/azure/management/compute/samples/CreateVirtualMachinesInParallel.java +++ b/sdk/management/samples/src/main/java/com/azure/management/compute/samples/CreateVirtualMachinesInParallel.java @@ -19,14 +19,13 @@ import com.azure.management.resources.fluentcore.model.CreatedResources; import com.azure.management.resources.fluentcore.profile.AzureProfile; import com.azure.management.storage.StorageAccount; +import org.apache.commons.lang.time.StopWatch; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; -import org.apache.commons.lang3.time.StopWatch; - /** * Azure compute sample for creating multiple virtual machines in parallel. */ diff --git a/sdk/management/samples/src/main/java/com/azure/management/compute/samples/ManageVirtualMachinesInParallel.java b/sdk/management/samples/src/main/java/com/azure/management/compute/samples/ManageVirtualMachinesInParallel.java index ec35db02ffc2..e9e4749ef953 100644 --- a/sdk/management/samples/src/main/java/com/azure/management/compute/samples/ManageVirtualMachinesInParallel.java +++ b/sdk/management/samples/src/main/java/com/azure/management/compute/samples/ManageVirtualMachinesInParallel.java @@ -22,7 +22,7 @@ import java.util.Collection; import java.util.List; -import org.apache.commons.lang3.time.StopWatch; +import org.apache.commons.lang.time.StopWatch; /** * Azure Compute sample for managing virtual machines - diff --git a/sdk/management/samples/src/main/java/com/azure/management/cosmosdb/samples/CreateCosmosDBWithEventualConsistency.java b/sdk/management/samples/src/main/java/com/azure/management/cosmosdb/samples/CreateCosmosDBWithEventualConsistency.java index 00248388189d..559974493a0b 100644 --- a/sdk/management/samples/src/main/java/com/azure/management/cosmosdb/samples/CreateCosmosDBWithEventualConsistency.java +++ b/sdk/management/samples/src/main/java/com/azure/management/cosmosdb/samples/CreateCosmosDBWithEventualConsistency.java @@ -8,12 +8,12 @@ import com.azure.core.http.policy.HttpLogDetailLevel; import com.azure.core.management.AzureEnvironment; import com.azure.core.management.exception.ManagementException; -import com.azure.cosmos.ConnectionPolicy; import com.azure.cosmos.ConsistencyLevel; import com.azure.cosmos.CosmosClient; import com.azure.cosmos.CosmosClientBuilder; import com.azure.cosmos.CosmosClientException; import com.azure.cosmos.CosmosDatabase; +import com.azure.cosmos.DirectConnectionConfig; import com.azure.identity.DefaultAzureCredentialBuilder; import com.azure.management.Azure; import com.azure.management.cosmosdb.CosmosDBAccount; @@ -105,11 +105,11 @@ public static boolean runSample(Azure azure) { private static void createDBAndAddCollection(String masterKey, String endPoint) throws CosmosClientException { try { CosmosClient cosmosClient = new CosmosClientBuilder() - .setEndpoint(endPoint) - .setKey(masterKey) - .setConnectionPolicy(ConnectionPolicy.getDefaultPolicy()) - .setConsistencyLevel(ConsistencyLevel.SESSION) - .buildClient(); + .endpoint(endPoint) + .key(masterKey) + .directMode(DirectConnectionConfig.getDefaultConfig()) + .consistencyLevel(ConsistencyLevel.SESSION) + .buildClient(); // Define a new database using the id above. CosmosDatabase myDatabase = cosmosClient.createDatabase(DATABASE_ID, 400).getDatabase(); diff --git a/sdk/management/samples/src/main/java/com/azure/management/cosmosdb/samples/ManageHACosmosDB.java b/sdk/management/samples/src/main/java/com/azure/management/cosmosdb/samples/ManageHACosmosDB.java index 109cf8e678f5..c189bb8886f7 100644 --- a/sdk/management/samples/src/main/java/com/azure/management/cosmosdb/samples/ManageHACosmosDB.java +++ b/sdk/management/samples/src/main/java/com/azure/management/cosmosdb/samples/ManageHACosmosDB.java @@ -8,12 +8,12 @@ import com.azure.core.http.policy.HttpLogDetailLevel; import com.azure.core.management.AzureEnvironment; import com.azure.core.management.exception.ManagementException; -import com.azure.cosmos.ConnectionPolicy; import com.azure.cosmos.ConsistencyLevel; import com.azure.cosmos.CosmosClient; import com.azure.cosmos.CosmosClientBuilder; import com.azure.cosmos.CosmosClientException; import com.azure.cosmos.CosmosDatabase; +import com.azure.cosmos.DirectConnectionConfig; import com.azure.identity.DefaultAzureCredentialBuilder; import com.azure.management.Azure; import com.azure.management.cosmosdb.CosmosDBAccount; @@ -119,11 +119,11 @@ public static boolean runSample(Azure azure) { private static void createDBAndAddCollection(String masterKey, String endPoint) throws CosmosClientException { try { CosmosClient cosmosClient = new CosmosClientBuilder() - .setEndpoint(endPoint) - .setKey(masterKey) - .setConnectionPolicy(ConnectionPolicy.getDefaultPolicy()) - .setConsistencyLevel(ConsistencyLevel.SESSION) - .buildClient(); + .endpoint(endPoint) + .key(masterKey) + .directMode(DirectConnectionConfig.getDefaultConfig()) + .consistencyLevel(ConsistencyLevel.SESSION) + .buildClient(); // Define a new database using the id above. CosmosDatabase myDatabase = cosmosClient.createDatabase(DATABASE_ID, 400).getDatabase();