Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 5 additions & 46 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Merging Pull Requests (for project contributors with write access)

### Pre-requisites

- Install Java Development Kit 8
- Install Java Development Kit 8 or 11
- add `JAVA_HOME` to environment variables
- Install [Maven](http://maven.apache.org/download.cgi)
- add `MAVEN_HOME` to environment variables
Expand All @@ -54,52 +54,11 @@ Merging Pull Requests (for project contributors with write access)
`REG ADD HKLM\SYSTEM\CurrentControlSet\Control\FileSystem /v LongPathsEnabled /t REG_DWORD /d 1`<br>*(might need to type `yes` to override key if it already exists)*<br><br>
2.- Set up `git` by running:<br> `git config --system core.longpaths true`

### Building and Testing
### Building and Unit Testing

>**Note**: Build and test instructions have recently changed. The ```pom.client.xml``` file is no
> longer in the root of the repository and should be not be used as an aggregator moving forward.

This repository uses Maven to build the various modules that make up the Azure SDK for Java. You can build the entire set of modules by running the following command from the root of the repository:

```
mvn -Dgpg.skip clean install
```

This will build, test and install all of the modules into your local Maven cache. Optionally, you
can also skip unit test execution by issuing the following command. This can be useful when you
just want to try out a quick change without having to worry about unit tests.

```
mvn -Dgpg.skip -DskipTests clean install
```

If you only want to work on one module, you may opt to build just that module and its dependencies (e.g. com.azure:azure-messaging-eventhubs):

```
mvn -Dgpg.skip -DskipTests -pl com.azure:azure-messaging-eventhubs -am
```

The ```-pl``` switch takes a comma seperated list of fully qualified module names and the ```-am```
switch tells Maven to _also make_ all of the dependencies within the repository that it depends on. If
you are making changes across two modules you can tell Maven to build them both like this:

```
mvn -Dgpg.skip -DskipTests -pl com.azure:azure-messaging-eventhubs,com.azure:azure-core-amqp -am
```

Some parts of the SDK have multiple modules for a particular service, if you want to avoid typing
in all those module names for the ```-pl``` switch you can just target the appropriate POM file
(e.g. sdk/eventhubs/pom.xml) and execute the following command.

```
mvn -f sdk/eventhubs/pom.xml -Dgpg.skip clean install
```

Note that any dependencies for those modules will need to be in the Maven cache so will want to run
the first command listed above once to get the cache primed with all the dependencies.

>**Note**: Refer to [wiki](https://github.com/Azure/azure-sdk-for-java/wiki/Building) for learning about how to build using Java 11
>and [this wiki](https://github.com/Azure/azure-sdk-for-java/wiki/Unit-Testing) for guidelines on unit testing
Refer to the [build wiki](https://github.com/Azure/azure-sdk-for-java/wiki/Building) for learning how to build Java SDKs
and the [unit testing wiki](https://github.com/Azure/azure-sdk-for-java/wiki/Unit-Testing) for guidelines on unit
testing.

### Live testing

Expand Down