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

HDDS-7574. Not generate dependency-reduced-pom.xml by default #4024

Closed
wants to merge 1 commit into from

Conversation

captainzmc
Copy link
Member

@captainzmc captainzmc commented Dec 1, 2022

What changes were proposed in this pull request?

During the release of 1.3.0, we found two extra files in two directories under ozone-1.3.0-src.tar.gz:
ozone-1.3.0-src/hadoop-ozone/ozonefs-hadoop3-client: dependency-reduced-pom.xml
ozone-1.3.0-src/hadoop-ozone/ozonefs-shaded: dependency-reduced-pom.xml

And the reason is that:
maven-shade-plugin generates dependency-reduced-pom.xml by default. If it is not needed we need to turn it off.

In addition, we also found that there were two more directories in ozone-1.3.0-src.tar.gz. We have not determined the cause of this problem, but this new two directories should have little impact on us.
ozone-1.3.0-src/hadoop-hdds/docs: resources
ozone-1.3.0-src: licenses

What is the link to the Apache JIRA

https://issues.apache.org/jira/browse/HDDS-7574

How was this patch tested?

Can use the following command to generate ozone-1.3.0-src.tar.gz and check if the two directories above if contain dependency-reduced-pom.xml.
mvn clean install -Dmaven.javadoc.skip=true -DskipTests -Psign,dist,src -Dtar

@adoroszlai
Copy link
Contributor

Thanks @captainzmc for working on this.

  • I have found that dependency-reduced-pom.xml is also present in previous releases (checked 1.0.0, 1.1.0, 1.2.1), so this is not a blocker in any case.
  • I think the file should still be generated, as it may be useful for projects that depend on the shaded FS jars. The problem is that it is an artifact of the build, does not belong to the sources.
  • The root cause is probably that the same mvn run is used for generating both binary and source tarballs. We should exclude it from the source tarball explicitly to allow the combined run. Alternatively, we may be able to build the source tarball first, then the binary one.

@captainzmc
Copy link
Member Author

Thanks for @adoroszlai's suggestion. If these files really have no impact, I agree to keep the status quo.

The root cause is probably that the same mvn run is used for generating both binary and source tarballs. We should exclude it from the source tarball explicitly to allow the combined run. Alternatively, we may be able to build the source tarball first, then the binary one.

Strangely, I try to generate only the source tarball with the following command. Found that dependency-reduced-pom.xml still exists. So it's probably not the binary tarball that's causing this problem.

mvn clean install -Dmaven.javadoc.skip=true -DskipTests -Psign,src -Dgpg.keyname="$CODESIGNINGKEY"

@captainzmc
Copy link
Member Author

Let's close this PR. Thanks @adoroszlai for the explanation.

@captainzmc captainzmc closed this Dec 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants