# Downloading files during build time is not allowed
# apply pre-downloaded cassandra-build-cache which is
# required for cassandra to build based on ant build.xml
# Generate cassandra-build-cache when ever update to latest version.
1. Boot up Mariner Core 2.0
2. Refer to cassandra spec and install all build required dependenices.
3. Download cassandra sources and extract under /usr/src
4. cd /usr/src/apache-cassandra-<version>-src
5. Run "export JAVA_HOME=/usr/lib/jvm/msopenjdk-11"
6. Run export ANT_OPTS="-Xmx1024m -XX:MaxPermSize=512m"
7. Run "sudo ant -v clean jar javadoc -Drelease=true -Duse.jdk11=true"
8. Once build completed successfully take build cache as below.
9. cd ~/.m2
9. sudo tar --sort=name \
--mtime="2021-04-26 00:00Z" \
--owner=0 --group=0 --numeric-owner \
--pax-option=exthdr.name=%d/PaxHeaders/%f,delete=atime,delete=ctime \
-cf cassandra-build-cache-<version>.tar.gz repository
10. Update latest build cache in cassandra spec and update to sources server.