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

Add a releaseProfile to generate dependency reduced pom #12367

Merged
merged 2 commits into from
Oct 23, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
15 changes: 15 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@
<update.check.enabled>true</update.check.enabled>
<update.check.host>https://diagnostics.alluxio.io</update.check.host>
<findbugs.skip>false</findbugs.skip>
<create.dependency.reduced.pom>false</create.dependency.reduced.pom>
</properties>

<modules>
Expand Down Expand Up @@ -1487,5 +1488,19 @@
</plugins>
</build>
</profile>
<profile>
<id>release-profile</id>
Copy link
Contributor

Choose a reason for hiding this comment

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

shall we add it here too @Xenorith -Prelease-profile

args := []string{"-T", "2C", "-am", "clean", "install", "-DskipTests", "-Dfindbugs.skip", "-Dmaven.javadoc.skip", "-Dcheckstyle.skip", "-Pno-webui-linter"}

Copy link
Contributor

Choose a reason for hiding this comment

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

from my understanding but correct me if i'm wrong, -Prelease-profile is only necessary when building artifacts to be published to maven. in all other cases, we would not want this profile to be enabled

Copy link
Contributor

Choose a reason for hiding this comment

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

@LuQQiu can you confirm that we do not want to append this profile argument to generate-tarball.go because this doesn't get executed when publishing to maven?

Copy link
Contributor

Choose a reason for hiding this comment

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

Not quite sure if we need it when generating the tarball. But publish to maven doesn't have relationships with generate-tarball.go

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@LuQQiu Thanks for your reply, as publish to maven doesn't have relationships with generate-tarball.go, so I think we don't need to add -Prelease here.

<properties>
<!--
The maven shade plugin has a bug where enabling the `createDependencyReducedPom`
property causes maven to go into an infinite loop (MSHADE-148). This is only an
issue for the Alluxio build if the maven version is 3.3.x or newer.
However, since disabling this property has the side effect of not resolving
variables in the released pom files, we need to enable this during
releases.
-->
<create.dependency.reduced.pom>true</create.dependency.reduced.pom>
</properties>
</profile>
</profiles>
</project>
1 change: 1 addition & 0 deletions shaded/client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@
<configuration>
<createSourcesJar>true</createSourcesJar>
<shadeSourcesContent>true</shadeSourcesContent>
<createDependencyReducedPom>${create.dependency.reduced.pom}</createDependencyReducedPom>
<artifactSet>
<excludes>
<!-- Leave slf4j unshaded so downstream users can configure logging -->
Expand Down
1 change: 1 addition & 0 deletions shaded/hadoop/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@
<configuration>
<!-- Since we don't shade all artifacts, we need to promote the transitive dependencies -->
<promoteTransitiveDependencies>true</promoteTransitiveDependencies>
<createDependencyReducedPom>${create.dependency.reduced.pom}</createDependencyReducedPom>
<relocations>
<relocation>
<pattern>com.google</pattern>
Expand Down