From fcd7d2b9bccb740d07c975f33c261a478a6423de Mon Sep 17 00:00:00 2001 From: Jianghao Lu Date: Thu, 5 May 2016 11:18:12 -0700 Subject: [PATCH 1/4] Squashed 'runtimes/' changes from 82bdc8b..6cdb496 6cdb496 Merge pull request #12 from Azure/javavnext 90d7f8b Merge pull request #11 from Azure/revert-10-revert-9-pagedListFix 18066d8 Revert "Revert "Fixing UnsupportedOperation exception in PagedList"" 6e44a66 Merge pull request #10 from Azure/revert-9-pagedListFix 8b7b17a Revert "Fixing UnsupportedOperation exception in PagedList" 2e67caa Merge pull request #9 from anuchandy/pagedListFix c3f7a46 Fixing UnsupportedOperation exception in PagedList git-subtree-dir: runtimes git-subtree-split: 6cdb496d23b764143e0471698dc6298d6cb1399d --- .../src/main/java/com/microsoft/azure/PagedList.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/azure-client-runtime/src/main/java/com/microsoft/azure/PagedList.java b/azure-client-runtime/src/main/java/com/microsoft/azure/PagedList.java index f13aca518532..f501163ff03e 100644 --- a/azure-client-runtime/src/main/java/com/microsoft/azure/PagedList.java +++ b/azure-client-runtime/src/main/java/com/microsoft/azure/PagedList.java @@ -47,7 +47,8 @@ public PagedList() { * @param page the {@link Page} object. */ public PagedList(Page page) { - items = page.getItems(); + this(); + items.addAll(page.getItems()); nextPageLink = page.getNextPageLink(); currentPage = page; } From 45778dda03870d1e07155ee9381201a987fc40a0 Mon Sep 17 00:00:00 2001 From: Jianghao Lu Date: Thu, 5 May 2016 10:12:47 -0700 Subject: [PATCH 2/4] Use sonatype as public snapshots --- pom.xml | 35 +++++----------- runtimes/client-runtime/pom.xml | 5 --- .../java/com/microsoft/rest/RestClient.java | 9 ++-- .../com/microsoft/rest/ServiceClient.java | 2 + runtimes/pom.xml | 42 +++++-------------- 5 files changed, 26 insertions(+), 67 deletions(-) diff --git a/pom.xml b/pom.xml index 7c49ba8df72a..6a27e889f8db 100644 --- a/pom.xml +++ b/pom.xml @@ -47,28 +47,8 @@ - azureoss-snapshots-pr - Azure Private Snapshots - http://azureoss.westus.cloudapp.azure.com:8080/nexus/content/repositories/snapshots-pr/ - default - - true - always - - - - adx-snapshots - Azure ADX Snapshots - http://adxsnapshots.azurewebsites.net - default - - true - always - - - - oss-snapshots - Open Source Snapshots + ossrh + Sonatype Snapshots https://oss.sonatype.org/content/repositories/snapshots/ default @@ -80,12 +60,17 @@ - adx-snapshots - Azure ADX Snapshots - ftp://waws-prod-bay-005.ftp.azurewebsites.windows.net/site/wwwroot + ossrh + Maven Central Snapshots + https://oss.sonatype.org/content/repositories/snapshots true default + + ossrh + Maven Central + https://oss.sonatype.org/service/local/staging/deploy/maven2/ + diff --git a/runtimes/client-runtime/pom.xml b/runtimes/client-runtime/pom.xml index 029c12e26022..a7c0b7441b02 100644 --- a/runtimes/client-runtime/pom.xml +++ b/runtimes/client-runtime/pom.xml @@ -105,11 +105,6 @@ - - org.apache.maven.plugins - maven-antrun-plugin - - org.codehaus.mojo build-helper-maven-plugin diff --git a/runtimes/client-runtime/src/main/java/com/microsoft/rest/RestClient.java b/runtimes/client-runtime/src/main/java/com/microsoft/rest/RestClient.java index ffc52643040d..e1a94ee6b7b4 100644 --- a/runtimes/client-runtime/src/main/java/com/microsoft/rest/RestClient.java +++ b/runtimes/client-runtime/src/main/java/com/microsoft/rest/RestClient.java @@ -10,16 +10,15 @@ import com.microsoft.rest.credentials.ServiceClientCredentials; import com.microsoft.rest.retry.RetryHandler; import com.microsoft.rest.serializer.JacksonMapperAdapter; - -import java.net.CookieManager; -import java.net.CookiePolicy; - import okhttp3.Interceptor; import okhttp3.JavaNetCookieJar; import okhttp3.OkHttpClient; import okhttp3.logging.HttpLoggingInterceptor; import retrofit2.Retrofit; +import java.net.CookieManager; +import java.net.CookiePolicy; + /** * An instance of this class stores the client information for making REST calls. */ @@ -92,7 +91,7 @@ public Retrofit retrofit() { * URL instead of the raw one might be returned. * * @return the base URL. - * @see {@link RestClient#setBaseUrl(String...)} + * @see RestClient#setBaseUrl(String...) */ public String baseUrl() { return baseUrlHandler.baseUrl(); diff --git a/runtimes/client-runtime/src/main/java/com/microsoft/rest/ServiceClient.java b/runtimes/client-runtime/src/main/java/com/microsoft/rest/ServiceClient.java index ef2f8cae9cfe..674b6a1bc625 100644 --- a/runtimes/client-runtime/src/main/java/com/microsoft/rest/ServiceClient.java +++ b/runtimes/client-runtime/src/main/java/com/microsoft/rest/ServiceClient.java @@ -20,6 +20,8 @@ public abstract class ServiceClient { /** * Initializes a new instance of the ServiceClient class. + * + * @param baseUrl the service endpoint */ protected ServiceClient(String baseUrl) { this(new RestClient.Builder(baseUrl) diff --git a/runtimes/pom.xml b/runtimes/pom.xml index 98b38905b457..a6f30c1d67dd 100644 --- a/runtimes/pom.xml +++ b/runtimes/pom.xml @@ -44,28 +44,8 @@ - azureoss-snapshots-pr - Azure Private Snapshots - http://azureoss.westus.cloudapp.azure.com:8080/nexus/content/repositories/snapshots-pr/ - default - - true - always - - - - adx-snapshots - Azure ADX Snapshots - http://adxsnapshots.azurewebsites.net - default - - true - always - - - - oss-snapshots - Open Source Snapshots + ossrh + Sonatype Snapshots https://oss.sonatype.org/content/repositories/snapshots/ default @@ -77,12 +57,17 @@ - adx-snapshots - Azure ADX Snapshots - ftp://waws-prod-bay-005.ftp.azurewebsites.windows.net/site/wwwroot + ossrh + Maven Central Snapshots + https://oss.sonatype.org/content/repositories/snapshots true default + + ossrh + Maven Central + https://oss.sonatype.org/service/local/staging/deploy/maven2/ + @@ -201,12 +186,6 @@
*/]]>
- - - org.apache.maven.plugins - maven-release-plugin - 2.5.3 - @@ -238,7 +217,6 @@ - org.apache.maven.plugins maven-release-plugin From 9f6e34c7168a3b08a9ce43737bd830b6d1040ad2 Mon Sep 17 00:00:00 2001 From: Jianghao Lu Date: Thu, 5 May 2016 11:22:41 -0700 Subject: [PATCH 3/4] Parent should not have a parent --- pom.xml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/pom.xml b/pom.xml index 6a27e889f8db..9b5fd00cf176 100644 --- a/pom.xml +++ b/pom.xml @@ -5,12 +5,8 @@ --> 4.0.0 - - com.microsoft.azure - 1.0.0-SNAPSHOT - azure-bom - - + com.microsoft.azure + 1.0.0-SNAPSHOT azure-parent pom From e59b593fa2a1266f05ac65a2813e9c4a17a74d18 Mon Sep 17 00:00:00 2001 From: Jianghao Lu Date: Thu, 5 May 2016 11:28:35 -0700 Subject: [PATCH 4/4] Point to central in README --- README.md | 59 +++++++++++++------------------------------------------ 1 file changed, 14 insertions(+), 45 deletions(-) diff --git a/README.md b/README.md index eaa2d7d2f936..9e91ba06d35b 100644 --- a/README.md +++ b/README.md @@ -4,59 +4,28 @@ This project provides a client library in Java that makes it easy to consume Microsoft Azure services. For documentation please see the [JavaDocs](http://azure.github.io/azure-sdk-for-java). For a list of libraries and how they are organized, please see the [Azure SDK for Java Features Wiki page] (https://github.com/Azure/azure-sdk-for-java/wiki/Azure-SDK-for-Java-Features). #Download -To compile either this repo or your project depending on this, you need snapshot builds in private internal maven repo. Go to http://azuresdkci.cloudapp.net/view/4-Java/job/register-internal-maven/ and register. And then add these to your `$MAVEN_HOME/conf/settings.xml`. +To compile either this repo, you need snapshot builds in sonatype snapshots repository. Add the following to your pom: ```xml - - - - azureoss-snapshots-pr - your username - your password - - -``` -and add the following to your pom: -```xml - - - azureoss-snapshots-pr - Azure Internal Snapshots - http://azureoss.westus.cloudapp.azure.com:8080/nexus/content/repositories/snapshots-pr/ - default - - true - - - - adx-snapshots - Azure ADX Snapshots - http://adxsnapshots.azurewebsites.net/ - default - - true - - - -... - - com.microsoft.azure - azure - 1.0.0-SNAPSHOT - + + + ossrh + Sonatype Snapshots + https://oss.sonatype.org/content/repositories/snapshots/ + default + + true + always + + + ``` or Gradle: ```groovy repositories { - maven { url "http://adxsnapshots.azurewebsites.net/" } - .... -} -... -dependencies { - compile 'com.microsoft.azure:azure:1.0.0-SNAPSHOT' + maven { url "https://oss.sonatype.org/content/repositories/snapshots/" } .... } ``` -You can browse the [snapshot repo](http://adxsnapshots.azurewebsites.net/) and view diffs between builds or master branch. Request a deploy in "Issues" if you find features/bug fixes in master but not in the latest snapshot build. #Getting Started You will need Java v1.7+. If you would like to develop on the SDK, you will also need maven.