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

ZOOKEEPER-3802: Fix rat checks in full-build and fatjar #1326

Closed
wants to merge 1 commit into from
Closed

ZOOKEEPER-3802: Fix rat checks in full-build and fatjar #1326

wants to merge 1 commit into from

Conversation

ctubbsii
Copy link
Member

Ensure apache-rat:check passes with and without -Pfull-build and/or -Pfatjar

Specifically, this change does:

  1. Use wildcards for rat check excludes, so the build passes whether rat
    detects the fils at the build execution root or within the activated
    module, so the rat check works whether or not the full-build or
    fatjar profiles are activated.
  2. Ensures properties set at zookeeper-contrib that control rat,
    spotbugs, and checkstyle, are properly passed down to the contrib
    submodules when fatjar is activated, by ensuring the intermediate
    parent pom for zookeeper-contrib is activated when any of its
    submodules are activated.
  3. Also use version of spotbugs that works with newer JDKs so the full
    build, including rat checks, can be tested with newer JDKs.

Ensure apache-rat:check passes with and without -Pfull-build and/or -Pfatjar

Specifically, this change does:

1. Use wildcards for rat check excludes, so the build passes whether rat
   detects the fils at the build execution root or within the activated
   module, so the rat check works whether or not the full-build or
   fatjar profiles are activated.
2. Ensures properties set at zookeeper-contrib that control rat,
   spotbugs, and checkstyle, are properly passed down to the contrib
   submodules when fatjar is activated, by ensuring the intermediate
   parent pom for zookeeper-contrib is activated when any of its
   submodules are activated.
3. Also use version of spotbugs that works with newer JDKs so the full
   build, including rat checks, can be tested with newer JDKs.
@ctubbsii
Copy link
Member Author

This should superseded #1325, which does not fix rat checks for all build combinations, and also skips rat checks for files in the fatjar profile when the full-build profile is activated.

Copy link
Contributor

@eolivelli eolivelli left a comment

Choose a reason for hiding this comment

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

I see what you mean.
This is very awesome!

Does this patch work on branch-3.6?
Otherwise can you please create the one for branch-3.6?

Thank you

@ctubbsii
Copy link
Member Author

Does this patch work on branch-3.6?

This patch was designed for branch-3.6, specifically.

I can make sure #1314 is updated with the same changes for 3.7/master.

@eolivelli
Copy link
Contributor

eolivelli commented Apr 19, 2020

Very good.
I will test it tomorrow.
Hopefully we will find another sponsor for this patch soon

@phunt
Copy link
Contributor

phunt commented Apr 19, 2020

+1 lgtm.

@eolivelli
Copy link
Contributor

eolivelli commented Apr 19, 2020

Thanks @phunt
I will merge tomorrow and try to build a new rc.

Thank you @ctubbsii

eolivelli pushed a commit that referenced this pull request Apr 20, 2020
Ensure apache-rat:check passes with and without -Pfull-build and/or -Pfatjar

Specifically, this change does:

1. Use wildcards for rat check excludes, so the build passes whether rat
   detects the fils at the build execution root or within the activated
   module, so the rat check works whether or not the full-build or
   fatjar profiles are activated.
2. Ensures properties set at zookeeper-contrib that control rat,
   spotbugs, and checkstyle, are properly passed down to the contrib
   submodules when fatjar is activated, by ensuring the intermediate
   parent pom for zookeeper-contrib is activated when any of its
   submodules are activated.
3. Also use version of spotbugs that works with newer JDKs so the full
   build, including rat checks, can be tested with newer JDKs.

Author: Christopher Tubbs <ctubbsii@apache.org>

Reviewers: Enrico Olivelli <eolivelli@apache.org>, Patrick Hunt <phunt@apache.org>

Closes #1326 from ctubbsii/fix-rat-build-36
eolivelli pushed a commit that referenced this pull request Apr 20, 2020
Ensure apache-rat:check passes with and without -Pfull-build and/or -Pfatjar

Specifically, this change does:

1. Use wildcards for rat check excludes, so the build passes whether rat
   detects the fils at the build execution root or within the activated
   module, so the rat check works whether or not the full-build or
   fatjar profiles are activated.
2. Ensures properties set at zookeeper-contrib that control rat,
   spotbugs, and checkstyle, are properly passed down to the contrib
   submodules when fatjar is activated, by ensuring the intermediate
   parent pom for zookeeper-contrib is activated when any of its
   submodules are activated.
3. Also use version of spotbugs that works with newer JDKs so the full
   build, including rat checks, can be tested with newer JDKs.

Author: Christopher Tubbs <ctubbsii@apache.org>

Reviewers: Enrico Olivelli <eolivelli@apache.org>, Patrick Hunt <phunt@apache.org>

Closes #1326 from ctubbsii/fix-rat-build-36

(cherry picked from commit 2400149)
Signed-off-by: Enrico Olivelli <eolivelli@apache.org>
@eolivelli
Copy link
Contributor

This patch works like a charm !
@ctubbsii

@eolivelli
Copy link
Contributor

github did not close this PR

@eolivelli eolivelli closed this Apr 20, 2020
@ctubbsii ctubbsii deleted the fix-rat-build-36 branch April 20, 2020 18:43
@ctubbsii
Copy link
Member Author

GitHub only closes PRs if it sees the key phrase in the master branch, because it assumes you're operating off a workflow that merges all changes to master eventually.

fadhilkurnia added a commit to fadhilkurnia/zookeeper that referenced this pull request Nov 2, 2020
Ensure apache-rat:check passes with and without -Pfull-build and/or -Pfatjar

Specifically, this change does:

1. Use wildcards for rat check excludes, so the build passes whether rat
   detects the fils at the build execution root or within the activated
   module, so the rat check works whether or not the full-build or
   fatjar profiles are activated.
2. Ensures properties set at zookeeper-contrib that control rat,
   spotbugs, and checkstyle, are properly passed down to the contrib
   submodules when fatjar is activated, by ensuring the intermediate
   parent pom for zookeeper-contrib is activated when any of its
   submodules are activated.
3. Also use version of spotbugs that works with newer JDKs so the full
   build, including rat checks, can be tested with newer JDKs.

Author: Christopher Tubbs <ctubbsii@apache.org>

Reviewers: Enrico Olivelli <eolivelli@apache.org>, Patrick Hunt <phunt@apache.org>

Closes apache#1326 from ctubbsii/fix-rat-build-36

# Conflicts:
#	pom.xml
#	zookeeper-it/pom.xml
fadhilkurnia added a commit to fadhilkurnia/zookeeper that referenced this pull request Nov 2, 2020
Ensure apache-rat:check passes with and without -Pfull-build and/or -Pfatjar

Specifically, this change does:

1. Use wildcards for rat check excludes, so the build passes whether rat
   detects the fils at the build execution root or within the activated
   module, so the rat check works whether or not the full-build or
   fatjar profiles are activated.
2. Ensures properties set at zookeeper-contrib that control rat,
   spotbugs, and checkstyle, are properly passed down to the contrib
   submodules when fatjar is activated, by ensuring the intermediate
   parent pom for zookeeper-contrib is activated when any of its
   submodules are activated.
3. Also use version of spotbugs that works with newer JDKs so the full
   build, including rat checks, can be tested with newer JDKs.

Author: Christopher Tubbs <ctubbsii@apache.org>

Reviewers: Enrico Olivelli <eolivelli@apache.org>, Patrick Hunt <phunt@apache.org>

Closes apache#1326 from ctubbsii/fix-rat-build-36

# Conflicts:
#	pom.xml
#	zookeeper-it/pom.xml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants