Skip to content

Commit

Permalink
Merge pull request #683 from jianghaolu/master
Browse files Browse the repository at this point in the history
Use sonatype as public snapshots
  • Loading branch information
jianghaolu committed May 5, 2016
2 parents 86eaef1 + e59b593 commit b240d13
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 118 deletions.
59 changes: 14 additions & 45 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
<servers>
<!-- other server settings -->
<server>
<id>azureoss-snapshots-pr</id>
<username>your username</username>
<password>your password</password>
</server>
</servers>
```
and add the following to your pom:
```xml
<repositories>
<repository>
<id>azureoss-snapshots-pr</id>
<name>Azure Internal Snapshots</name>
<url>http://azureoss.westus.cloudapp.azure.com:8080/nexus/content/repositories/snapshots-pr/</url>
<layout>default</layout>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
<repository>
<id>adx-snapshots</id>
<name>Azure ADX Snapshots</name>
<url>http://adxsnapshots.azurewebsites.net/</url>
<layout>default</layout>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
...
<dependency>
<groupId>com.microsoft.azure</groupId>
<artifactId>azure</artifactId>
<version>1.0.0-SNAPSHOT</version>
</dependency>
<repositories>
<repository>
<id>ossrh</id>
<name>Sonatype Snapshots</name>
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
<layout>default</layout>
<snapshots>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
</snapshots>
</repository>
</repositories>
```
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.
Expand Down
43 changes: 12 additions & 31 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,8 @@
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.microsoft.azure</groupId>
<version>1.0.0-SNAPSHOT</version>
<artifactId>azure-bom</artifactId>
</parent>

<groupId>com.microsoft.azure</groupId>
<version>1.0.0-SNAPSHOT</version>
<artifactId>azure-parent</artifactId>
<packaging>pom</packaging>

Expand Down Expand Up @@ -47,28 +43,8 @@

<repositories>
<repository>
<id>azureoss-snapshots-pr</id>
<name>Azure Private Snapshots</name>
<url>http://azureoss.westus.cloudapp.azure.com:8080/nexus/content/repositories/snapshots-pr/</url>
<layout>default</layout>
<snapshots>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
</snapshots>
</repository>
<repository>
<id>adx-snapshots</id>
<name>Azure ADX Snapshots</name>
<url>http://adxsnapshots.azurewebsites.net</url>
<layout>default</layout>
<snapshots>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
</snapshots>
</repository>
<repository>
<id>oss-snapshots</id>
<name>Open Source Snapshots</name>
<id>ossrh</id>
<name>Sonatype Snapshots</name>
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
<layout>default</layout>
<snapshots>
Expand All @@ -80,12 +56,17 @@

<distributionManagement>
<snapshotRepository>
<id>adx-snapshots</id>
<name>Azure ADX Snapshots</name>
<url>ftp://waws-prod-bay-005.ftp.azurewebsites.windows.net/site/wwwroot</url>
<id>ossrh</id>
<name>Maven Central Snapshots</name>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
<uniqueVersion>true</uniqueVersion>
<layout>default</layout>
</snapshotRepository>
<repository>
<id>ossrh</id>
<name>Maven Central</name>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>

<dependencyManagement>
Expand Down
5 changes: 0 additions & 5 deletions runtimes/client-runtime/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,6 @@
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
</plugin>

<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
42 changes: 10 additions & 32 deletions runtimes/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,28 +44,8 @@

<repositories>
<repository>
<id>azureoss-snapshots-pr</id>
<name>Azure Private Snapshots</name>
<url>http://azureoss.westus.cloudapp.azure.com:8080/nexus/content/repositories/snapshots-pr/</url>
<layout>default</layout>
<snapshots>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
</snapshots>
</repository>
<repository>
<id>adx-snapshots</id>
<name>Azure ADX Snapshots</name>
<url>http://adxsnapshots.azurewebsites.net</url>
<layout>default</layout>
<snapshots>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
</snapshots>
</repository>
<repository>
<id>oss-snapshots</id>
<name>Open Source Snapshots</name>
<id>ossrh</id>
<name>Sonatype Snapshots</name>
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
<layout>default</layout>
<snapshots>
Expand All @@ -77,12 +57,17 @@

<distributionManagement>
<snapshotRepository>
<id>adx-snapshots</id>
<name>Azure ADX Snapshots</name>
<url>ftp://waws-prod-bay-005.ftp.azurewebsites.windows.net/site/wwwroot</url>
<id>ossrh</id>
<name>Maven Central Snapshots</name>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
<uniqueVersion>true</uniqueVersion>
<layout>default</layout>
</snapshotRepository>
<repository>
<id>ossrh</id>
<name>Maven Central</name>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>

<dependencyManagement>
Expand Down Expand Up @@ -201,12 +186,6 @@
<br />*/</code>]]></bottom>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.5.3</version>
</plugin>
</plugins>
<pluginManagement>
<plugins>
Expand Down Expand Up @@ -238,7 +217,6 @@
</environmentVariables>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
Expand Down

0 comments on commit b240d13

Please sign in to comment.