Skip to content

Dependency management setup#2876

Merged
weshaggard merged 22 commits intoAzure:masterfrom
g2vinay:dependency-management-setup
Jan 26, 2019
Merged

Dependency management setup#2876
weshaggard merged 22 commits intoAzure:masterfrom
g2vinay:dependency-management-setup

Conversation

@g2vinay
Copy link
Member

@g2vinay g2vinay commented Jan 25, 2019

Introduces new pom structure for parent and all children pom including keyvault and its sub modules.
Single parent pom is created (pom.client.xml).
Yml files are updated to use pom.client.xml
Keyvault and its children modules are cleaned up and restructured.
Parent Pom (pom.client.xml) takes dependency on Microsoft wide Java Parent pom: (https://github.com/Microsoft/maven-java-parent)
Introduces, spotbugs, checkstyle and javadoc checks from Microsoft wide Java parent pom.
Cleans up unneeded libraries and plugins from main and submodules.

Other changes:
Keyvault cryptography tests resources reading was fixed.

@azuresdkci
Copy link
Contributor

Can one of the admins verify this patch?

Copy link
Member

@JonathanGiles JonathanGiles left a comment

Choose a reason for hiding this comment

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

Looks good to me. There are follow-on clean-ups and tweaks we should do (especially ensuring all the build plugins are required, tidying up some descriptions, etc), but nothing to block merging in my opinion.

<!-- Dependency Versions -->
<jackson.version>2.9.6</jackson.version>
<azure-client-runtime.version>1.3.0</azure-client-runtime.version>
<client-runtime.version>1.6.1</client-runtime.version>
Copy link
Contributor

@lenala lenala Jan 25, 2019

Choose a reason for hiding this comment

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

I wonder how this line and the azure-client-runtime version do not conflict; ideally they should be same or close...

Copy link
Member

Choose a reason for hiding this comment

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

This is a good point. I would also love to see us bring some of these dependencies up to date - 1.3.0 is a year old at this point, and as we bring in track one SDK components, we should try to get them moving towards the more recent releases, e.g. 1.6.5.


<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
Copy link
Contributor

Choose a reason for hiding this comment

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

You removed azure-compiler-plugin from azure-keyvault-extensions, but left here, is there any specific reason for that?

Copy link
Member Author

Choose a reason for hiding this comment

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

removed it.
Thanks for spotting it.

- bash: |
LOG_PARAMS='-Dorg.slf4j.simpleLogger.defaultLogLevel=error -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn'
mvn test -Dhttp.keepAlive=false -Dsurefire.rerunFailingTestsCount=3 $LOG_PARAMS -f pom.client.build.xml
mvn test -Dhttp.keepAlive=false -Dsurefire.rerunFailingTestsCount=3 $LOG_PARAMS -f pom.client.xml
Copy link
Member

Choose a reason for hiding this comment

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

What about the client.yml? Is the plan to update the pipeline variable after this merges? We should consider adding a variable for this project file as well.

Copy link
Member Author

Choose a reason for hiding this comment

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

updated the client.test.live.yml file to have pomFile variable.

<relativePath>../pom.xml</relativePath>
</parent>

<groupId>com.microsoft.azure</groupId>
Copy link
Member

Choose a reason for hiding this comment

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

Isn't this defaulted from the parent POM? Is there any reason to duplicated in the individual projects?

Copy link
Member

Choose a reason for hiding this comment

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

We should default the other properties like versioning and developer, etc in the parent POM as well to avoid needing them in all the individual projects.

Copy link
Member Author

Choose a reason for hiding this comment

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

The group Ids were introduced to improve readability. Other properties already existed.
Helps to add dependency for the project, without looking at other poms for info about group Ids or versions.

Copy link
Member

Choose a reason for hiding this comment

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

It might help with some local views of the project but it adds more harm then good in my opinion as it enables more projects to stay in sync, in particular for the version number, the fewer places we have to edit that the better. So I still suggest that a number of common properties should be lifted into one of the parent POM's in the structure. Of course that can happen as a clean-up PR and not block this PR.

Copy link
Member

@JonathanGiles JonathanGiles Jan 26, 2019

Choose a reason for hiding this comment

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

I'm fine to centralise versions where it makes sense. I would rather not centralise group ID for now though. I would say this should be done subsequently so that it does not hold merging. We should get this merged ASAP

Copy link
Member

Choose a reason for hiding this comment

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

I agree.

@weshaggard
Copy link
Member

Looks like our DevOps build job is failing https://dev.azure.com/azure-sdk/public/_build/results?buildId=3174, although it isn't reporting as failing. I filed issue #2880 to investigate why the job isn't correctly being marked as failed but please investigate the failures to get them addressed.

@@ -1,19 +1,14 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
Copy link
Member

Choose a reason for hiding this comment

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

I assume the plan is to follow-up with another PR later to remove this file once you can update the azure pipeline to point to the new project file.

Copy link
Member Author

Choose a reason for hiding this comment

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

yeah, once the migration is successfully done. The plan is to delete this file.

@weshaggard
Copy link
Member

@JonathanGiles a number of errors are showing up https://dev.azure.com/azure-sdk/public/_build/results?buildId=3173 but I also see "2019-01-25T02:45:29.1847285Z [WARNING] checkstyle:check violations detected but failOnViolation set to false". Is the failOnViolation controlled by one of these parent POMs?

@g2vinay
Copy link
Member Author

g2vinay commented Jan 25, 2019

@JonathanGiles a number of errors are showing up https://dev.azure.com/azure-sdk/public/_build/results?buildId=3173 but I also see "2019-01-25T02:45:29.1847285Z [WARNING] checkstyle:check violations detected but failOnViolation set to false". Is the failOnViolation controlled by one of these parent POMs?

Replying to this.
failOnError and failOnViolation are set to false in this parent pom:
https://github.com/Microsoft/maven-java-parent/blob/master/java-8-parent/pom.xml
This is the Microsoft wide Java parent POM.
The plan is to fix and/or report the errors and violations in the next iterations.

@weshaggard
Copy link
Member

The plan is to fix and/or report the errors and violations in the next iterations.

I don't like having ignored errors showing up in our logs it will do nothing but cause noise and confusion. We should fix those ASAP or disable the rules that are now failing that weren't before.

@JonathanGiles
Copy link
Member

The plan is to identify the issues that checkstyle identifies and work to resolve them all with urgency. We want to fail on warning as soon as we are clean. The problem right now is that the repo has added code before we enabled the checks, so we are on the backfoot. Everyone is on the same page here.

@weshaggard
Copy link
Member

Ok as long as we have a plan I'm fine although I expect folks that see the logs will believe there are errors, just as I did, so lets get them cleaned up ASAP. @g2vinay I've assigned issue #2880 to track cleaning these up.

@weshaggard weshaggard merged commit 8650425 into Azure:master Jan 26, 2019
@JonathanGiles JonathanGiles added the Client This issue points to a problem in the data-plane of the library. label Feb 13, 2019
@g2vinay g2vinay deleted the dependency-management-setup branch July 13, 2023 01:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Client This issue points to a problem in the data-plane of the library.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

Comments