Skip to content

Commit

Permalink
ServiceBus: POM dependency and Enabled Spotbugs and Checkstyle (#3441)
Browse files Browse the repository at this point in the history
* fix(POM): resolved pom dependency and remove unneccesary version

* fix(version): remove adal4j version and add group id to child pom

* delete(pom): delete azure-servicebus.pom and no issue introduced

* fix(intellij): fix space

* live-text: add live test config

* fix(connect-str-live): renaming connection str and use bracket

* fix(test): add support to ignore all living test when they are not in live mode

* fix(space): convert tabs to spaces

* fix(checkstyle): fixes bracket-at-new-line checkstyle

* fix(code-review): add license, delete plugin, add common test dependency

* fix(configuration): enabled spotbugs and check style, the ServiceBus: SpotBugs and CheckStyle enabled #3447 PR is closed

* fix(checkstyle): fixes additonal if for checkstyle

* fixes to corresponds to conniey feedback

* fix(AfterClass): no After class in TestBase class

* fix(Unsued Import): remove unused import
  • Loading branch information
mssfang authored May 2, 2019
1 parent 5c5b936 commit 0f05332
Show file tree
Hide file tree
Showing 43 changed files with 2,333 additions and 2,661 deletions.
4 changes: 3 additions & 1 deletion .azure-pipelines/client.test.live.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ jobs:
pomFilePath: './storage/data-plane/pom.xml'
AzureAppConfiguration:
pomFilePath: './applicationconfig/client/pom.xml'
AzureServiceBus:
pomFilePath: './servicebus/data-plane/pom.xml'

pool:
vmImage: 'vs2017-win2016'
Expand Down Expand Up @@ -50,7 +52,7 @@ jobs:
BLOB_STORAGE_ACCOUNT_KEY: $(java-storage-test-blob-account-key)
AZCONFIG_CONNECTION_STRING: $(java-azconfig-test-connection-string)
MICROSOFT_AD_TENANT_ID: $(microsoft-active-directory-tenant-id)

AZURE_SERVICEBUS_CONNECTION_STRING: $(java-servicebus-test-connection-string)
- task: PublishTestResults@2
condition: succeededOrFailed()
inputs:
Expand Down
7 changes: 7 additions & 0 deletions eng/spotbugs-aggregate-report/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
<azure-eventhubs.version>2.3.0</azure-eventhubs.version>
<azure-eventhubs-eph.version>2.5.0</azure-eventhubs-eph.version>
<azure-keyvault.version>1.2.0</azure-keyvault.version>
<azure-servicebus.version>2.0.0</azure-servicebus.version>
<azure-storage-blob.version>10.5.0</azure-storage-blob.version>
</properties>

Expand Down Expand Up @@ -103,6 +104,11 @@
<artifactId>azure-core-test</artifactId>
<version>${azure-core-test.version}</version>
</dependency>
<dependency>
<groupId>com.microsoft.azure</groupId>
<artifactId>azure-servicebus</artifactId>
<version>${azure-servicebus.version}</version>
</dependency>
</dependencies>

<build>
Expand Down Expand Up @@ -136,6 +142,7 @@
<source>..\..\keyvault\data-plane\azure-keyvault-core\src\main\java</source>
<source>..\..\keyvault\data-plane\azure-keyvault-extensions\src\main\java</source>
<source>..\..\keyvault\data-plane\azure-keyvault-webkey\src\main\java</source>
<source>..\..\servicebus\data-plane\azure-servicebus\src\main\java</source>
</sources>
</configuration>
</execution>
Expand Down
21 changes: 20 additions & 1 deletion pom.client.xml
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,13 @@
<groovy-eclipse-batch.version>2.4.16-03</groovy-eclipse-batch.version>
<client-runtime.version.v2>2.1.1</client-runtime.version.v2>
<slf4j-api.version>1.7.5</slf4j-api.version>
<slf4j-log4j12.version>1.7.0</slf4j-log4j12.version>
<azure-core.version>1.0.0-SNAPSHOT</azure-core.version>
<azure-core-auth.version>1.0.0-SNAPSHOT</azure-core-auth.version>
<azure-core-management.version>1.0.0-SNAPSHOT</azure-core-management.version>
<reactor-netty.version>0.8.3.RELEASE</reactor-netty.version>
<netty.version>4.1.33.Final</netty.version>
<async-http-client.version>2.5.2</async-http-client.version>

<!-- Test Dependency Versions -->
<azure-core-test.version>1.0.0-SNAPSHOT</azure-core-test.version>
Expand Down Expand Up @@ -262,6 +264,12 @@
<version>${slf4j-api.version}</version>
</dependency>

<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>${slf4j-log4j12.version}</version>
</dependency>

<dependency>
<groupId>io.projectreactor.netty</groupId>
<artifactId>reactor-netty</artifactId>
Expand All @@ -280,6 +288,12 @@
<version>${junit.version}</version>
</dependency>

<dependency>
<groupId>org.asynchttpclient</groupId>
<artifactId>async-http-client</artifactId>
<version>${async-http-client.version}</version>
</dependency>

<!-- Test dependencies -->
<dependency>
<groupId>com.azure</groupId>
Expand Down Expand Up @@ -628,10 +642,14 @@
<title>Azure Core - Authentication</title>
<packages>com.azure.core.auth*</packages>
</group>
<group>
<title>Azure Service Bus</title>
<packages>com.microsoft.azure.servicebus*</packages>
</group>
<group>
<title>Azure Storage</title>
<packages>com.microsoft.azure.storage*</packages>
</group>
</group>
</groups>
<links>
<link>https://docs.oracle.com/javase/8/docs/api/</link>
Expand Down Expand Up @@ -1059,6 +1077,7 @@
<module>./core</module>
<module>./eventhubs/data-plane</module>
<module>./keyvault/data-plane</module>
<module>./servicebus/data-plane</module>
<module>./storage/data-plane</module>
</modules>
</project>
2 changes: 1 addition & 1 deletion servicebus/data-plane/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ The standard way to manage Azure resources is by using [Azure Resource Manager](
### How do I run the unit tests?

Tests are simple JUnit tests. They can be run from the command line or any IDE that supports running JUnit tests.
Only prerequisite to running tests is setting an environment variable named 'AZURE_SERVICEBUS_JAVA_CLIENT_TEST_CONNECTION_STRING' to the connection string
Only prerequisite to running tests is setting an environment variable named 'AZURE_SERVICEBUS_CONNECTION_STRING' to the connection string
of the namespace in which the tests will create entities. The tests create entities in the namespace and run tests and delete the created entities.
And test classes also have methods to specify whether to create entities per test or once for all tests in a suite. Creating entities per test is better
as it keeps test independent of each other.
Expand Down
83 changes: 0 additions & 83 deletions servicebus/data-plane/azure-servicebus/azure-servicebus.pom

This file was deleted.

184 changes: 88 additions & 96 deletions servicebus/data-plane/azure-servicebus/pom.xml
Original file line number Diff line number Diff line change
@@ -1,100 +1,92 @@
<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">
<name>azure-servicebus</name>
<description>Java library for Azure Service Bus</description>
<modelVersion>4.0.0</modelVersion>
<artifactId>azure-servicebus</artifactId>
<version>${client-current-version}</version>
<url>https://github.com/Azure/azure-service-bus-java</url>
<!-- Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the MIT License. -->
<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>
<groupId>com.microsoft.azure</groupId>
<artifactId>azure-servicebus</artifactId>
<version>2.0.0</version>

<parent>
<groupId>com.microsoft.azure</groupId>
<artifactId>azure-servicebus-parent</artifactId>
<version>2.0.0</version><!-- Need not change for every release -->
</parent>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
</properties>
<name>Microsoft Azure SDK for Service Bus</name>
<description>Java library for Azure Service Bus</description>
<url>https://github.com/Azure/azure-sdk-for-java</url>

<build>
<resources>
<resource>
<directory>resources</directory>
<filtering>true</filtering>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.5</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<optimize>true</optimize>
<showDeprecation>true</showDeprecation>
<showWarnings>true</showWarnings>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.20</version>
<configuration>
<forkCount>0</forkCount> <!-- Speeds up test execution using multiple JVMs. Set it to 0 if you want to run test sequentially in the build vm itself -->
<reuseForks>true</reuseForks>
</configuration>
</plugin>
</plugins>
</build>
<parent>
<groupId>com.microsoft.azure</groupId>
<artifactId>azure-servicebus-parent</artifactId>
<version>2.0.0</version><!-- Need not change for every release -->
<relativePath>../pom.xml</relativePath>
</parent>

<dependencies>
<dependency>
<groupId>org.apache.qpid</groupId>
<artifactId>proton-j</artifactId>
<version>${proton-j-version}</version>
</dependency>
<dependency>
<groupId>com.microsoft.azure</groupId>
<artifactId>qpid-proton-j-extensions</artifactId>
<version>1.1.0</version>
</dependency>
<dependency>
<groupId>com.microsoft.azure</groupId>
<artifactId>adal4j</artifactId>
<version>1.3.0</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit-version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j-version}</version>
</dependency>
<!--<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-jdk14</artifactId>
<version>${slf4j-version}</version>
</dependency>-->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>${slf4j-version}</version>
</dependency>
<!--<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>${slf4j-version}</version>
</dependency>-->
<dependency>
<groupId>org.asynchttpclient</groupId>
<artifactId>async-http-client</artifactId>
<version>2.5.2</version>
</dependency>
</dependencies>
<distributionManagement>
<site>
<id>azure-java-build-docs</id>
<url>${site.url}/site/${project.artifactId}</url>
</site>
</distributionManagement>

<scm>
<url>scm:git:https://github.com/Azure/azure-sdk-for-java</url>
</scm>

<properties>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
</properties>

<build>
<resources>
<resource>
<directory>resources</directory>
<filtering>true</filtering>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<forkCount>0</forkCount> <!-- Speeds up test execution using multiple JVMs. Set it to 0 if you want to run test sequentially in the build vm itself -->
<reuseForks>true</reuseForks>
</configuration>
</plugin>
</plugins>
</build>

<dependencies>
<dependency>
<groupId>org.apache.qpid</groupId>
<artifactId>proton-j</artifactId>
</dependency>
<dependency>
<groupId>com.microsoft.azure</groupId>
<artifactId>qpid-proton-j-extensions</artifactId>
</dependency>
<dependency>
<groupId>com.microsoft.azure</groupId>
<artifactId>adal4j</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</dependency>
<dependency>
<groupId>org.asynchttpclient</groupId>
<artifactId>async-http-client</artifactId>
</dependency>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-core-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
</project>
Loading

0 comments on commit 0f05332

Please sign in to comment.