Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use inheritance-aggregator model #2589

Merged
Merged
Show file tree
Hide file tree
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
22 changes: 22 additions & 0 deletions pom.client.build.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This section is needed so that when you build this pom file Maven will know where to look for the parent. Without this section, Maven will not look for child module's parent poms.

<groupId>com.microsoft.azure</groupId>
<artifactId>azure-sdk-parent</artifactId>
<version>1.0-SNAPSHOT</version>
<relativePath>./pom.client.xml</relativePath>
</parent>

<artifactId>azure-sdk-parent-build</artifactId>
<version>${parent.version}</version>
<packaging>pom</packaging>

<name>Microsoft Azure SDK Build</name>
<description>This package bundles all the SDKs in a multi-module for build/CI purposes.</description>
<url>https://github.com/Azure/azure-sdk-for-java</url>

<modules>
Copy link
Contributor Author

@jianghaolu jianghaolu Nov 10, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file serves as an aggregator for all the projects. To build all of child modules, run

mvn -f pom.client.build.xml compile

This file will not be consumed by any human. This file can be modified at any time without notifying any group, or testing any existing libraries. When a new SDK is added, it will be added to this list for it to be included in the build process.

There can be many pom files like this one for all kinds of purposes.

<module>./template/client</module>
</modules>
</project>
3 changes: 0 additions & 3 deletions pom.client.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,4 @@
</dependencies>
</dependencyManagement>

<modules>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use inheritance over multi-module for a simpler module management.

As the number of child SDKs grow, each of them is independent, with the only commonality being the parent pom. The parent pom isn't aware of the children either so child projects can change without modifying this section.

This file serves as the universal parent for dependencies, plugins, etc. The only time to modify this file is when we decide to upgrade a dependency version or alter a build process.

<module>./template/client</module>
</modules>
</project>