If you fresh clone bookkeeper from github, with an empty Maven repository, Maven tries to download distributedlog-core from apache snapshots and it is not using the binaries built during local compilation.
This can lead to weird behaviour and non reproducible builds
[INFO] -------------------< org.apache.bookkeeper:statelib >-------------------
[INFO] Building Apache BookKeeper :: Stream Storage :: State Library 4.11.0-SNAPSHOT [26/78]
[INFO] --------------------------------[ jar ]---------------------------------
Downloading from apache.snapshots: https://repository.apache.org/snapshots/org/apache/distributedlog/distributedlog-core/4.11.0-SNAPSHOT/maven-metadata.xml
Downloaded from apache.snapshots: https://repository.apache.org/snapshots/org/apache/distributedlog/distributedlog-core/4.11.0-SNAPSHOT/maven-metadata.xml (1.2 kB at 499 B/s)
Downloading from apache.snapshots: https://repository.apache.org/snapshots/org/apache/distributedlog/distributedlog-core/4.11.0-SNAPSHOT/distributedlog-core-4.11.0-20200307.150610-126.pom
Downloaded from apache.snapshots: https://repository.apache.org/snapshots/org/apache/distributedlog/distributedlog-core/4.11.0-SNAPSHOT/distributedlog-core-4.11.0-20200307.150610-126.pom (12 kB at 9.0 kB/s)
Downloading from apache.snapshots: https://repository.apache.org/snapshots/org/apache/distributedlog/distributedlog/4.11.0-SNAPSHOT/maven-metadata.xml
Downloaded from apache.snapshots: https://repository.apache.org/snapshots/org/apache/distributedlog/distributedlog/4.11.0-SNAPSHOT/maven-metadata.xml (622 B at 504 B/s)
Downloading from apache.snapshots: https://repository.apache.org/snapshots/org/apache/distributedlog/distributedlog/4.11.0-SNAPSHOT/distributedlog-4.11.0-20200307.144315-126.pom
Downloaded from apache.snapshots: https://repository.apache.org/snapshots/org/apache/distributedlog/distributedlog/4.11.0-SNAPSHOT/distributedlog-4.11.0-20200307.144315-126.pom (5.6 kB at 5.5 kB/s)
Downloading from apache.snapshots: https://repository.apache.org/snapshots/org/apache/distributedlog/distributedlog-protocol/4.11.0-SNAPSHOT/maven-metadata.xml
Downloaded from apache.snapshots: https://repository.apache.org/snapshots/org/apache/distributedlog/distributedlog-protocol/4.11.0-SNAPSHOT/maven-metadata.xml (1.2 kB at 1.1 kB/s)
Downloading from apache.snapshots: https://repository.apache.org/snapshots/org/apache/distributedlog/distributedlog-protocol/4.11.0-SNAPSHOT/distributedlog-protocol-4.11.0-20200307.144349-126.pom
Downloaded from apache.snapshots: https://repository.apache.org/snapshots/org/apache/distributedlog/distributedlog-protocol/4.11.0-SNAPSHOT/distributedlog-protocol-4.11.0-20200307.144349-126.pom (2.2 kB at 682 B/s)
Downloading from apache.snapshots: https://repository.apache.org/snapshots/org/apache/distributedlog/distributedlog-common/4.11.0-SNAPSHOT/maven-metadata.xml
Downloaded from apache.snapshots: https://repository.apache.org/snapshots/org/apache/distributedlog/distributedlog-common/4.11.0-SNAPSHOT/maven-metadata.xml (1.2 kB at 1.2 kB/s)
Downloading from apache.snapshots: https://repository.apache.org/snapshots/org/apache/distributedlog/distributedlog-common/4.11.0-SNAPSHOT/distributedlog-common-4.11.0-20200307.144328-126.pom
Downloaded from apache.snapshots: https://repository.apache.org/snapshots/org/apache/distributedlog/distributedlog-common/4.11.0-SNAPSHOT/distributedlog-common-4.11.0-20200307.144328-126.pom (4.0 kB at 761 B/s)
Downloading from apache.snapshots: https://repository.apache.org/snapshots/org/apache/distributedlog/distributedlog-core/4.11.0-SNAPSHOT/distributedlog-core-4.11.0-20200307.150610-126.jar
Downloading from apache.snapshots: https://repository.apache.org/snapshots/org/apache/distributedlog/distributedlog-core/4.11.0-SNAPSHOT/distributedlog-core-4.11.0-20200307.150610-126-tests.jar
Downloading from apache.snapshots: https://repository.apache.org/snapshots/org/apache/distributedlog/distributedlog-common/4.11.0-SNAPSHOT/distributedlog-common-4.11.0-20200307.144328-126.jar
Downloading from apache.snapshots: https://repository.apache.org/snapshots/org/apache/distributedlog/distributedlog-protocol/4.11.0-SNAPSHOT/distributedlog-protocol-4.11.0-20200307.144349-126.jar
Downloaded from apache.snapshots: https://repository.apache.org/snapshots/org/apache/distributedlog/distributedlog-core/4.11.0-SNAPSHOT/distributedlog-core-4.11.0-20200307.150610-126.jar (1.0 MB at 176 kB/s)
Downloaded from apache.snapshots: https://repository.apache.org/snapshots/org/apache/distributedlog/distributedlog-protocol/4.11.0-SNAPSHOT/distributedlog-protocol-4.11.0-20200307.144349-126.jar (55 kB at 9.5 kB/s)
Downloaded from apache.snapshots: https://repository.apache.org/snapshots/org/apache/distributedlog/distributedlog-common/4.11.0-SNAPSHOT/distributedlog-common-4.11.0-20200307.144328-126.jar (51 kB at 5.3 kB/s)
To Reproduce
run
mvn clean install -DskipTests -Dmaven.repo.local=YOURDIRECTORY
Expected behavior
Build does not download self binaries from the Internet
BUG REPORT
Describe the bug
If you fresh clone bookkeeper from github, with an empty Maven repository, Maven tries to download distributedlog-core from apache snapshots and it is not using the binaries built during local compilation.
This can lead to weird behaviour and non reproducible builds
To Reproduce
run mvn clean install -DskipTests -Dmaven.repo.local=YOURDIRECTORY
Expected behavior Build does not download self binaries from the Internet