josepanguera commented on PR #11516:
URL: https://github.com/apache/iceberg/pull/11516#issuecomment-2468671617

   I'm including here my build scripts to make it work for now if it's of any 
usefulness.
   
   
   `Makefile`
   
   ```Makefile
   SHELL=/bin/bash
   
   SCHEMA_REGISTRY_CONVERTER_VERSION := 1.1.20
   SCHEMA_REGISTRY_CONVERTER_ARTIFACT := 
software.amazon.glue:schema-registry-kafkaconnect-converter:${SCHEMA_REGISTRY_CONVERTER_VERSION}
   SCHEMA_REGISTRY_CONVERTER_JAR := 
schema-registry-kafkaconnect-converter-${SCHEMA_REGISTRY_CONVERTER_VERSION}.jar
   
   # This JAR and its dependency won't be necessary when this issue is fixed
   # https://github.com/apache/iceberg/issues/11489
   WOODSTOX_VERSION := 6.7.0
   WOODSTOX_ARTIFACT := com.fasterxml.woodstox:woodstox-core:${WOODSTOX_VERSION}
   WOODSTOX_JAR := woodstox-core-${WOODSTOX_VERSION}.jar
   
   STAX_VERSION := 4.2.2
   STAX_ARTIFACT := org.codehaus.woodstox:stax2-api:${STAX_VERSION}
   STAX_JAR := stax2-api-${STAX_VERSION}.jar
   
   CONNECTOR_ZIP := iceberg-sink-*-*.zip
   
   .DEFAULT_GOAL := all
   .PHONY: all create-aws-plugin clean
   
   all: $(CONNECTOR_ZIP) $(SCHEMA_REGISTRY_CONVERTER_JAR) $(WOODSTOX_JAR) 
$(STAX_JAR)
        zip $(CONNECTOR_ZIP) $(SCHEMA_REGISTRY_CONVERTER_JAR) $(WOODSTOX_JAR) 
$(STAX_JAR)
   
   $(CONNECTOR_ZIP):
        ./build.sh
   
   $(SCHEMA_REGISTRY_CONVERTER_JAR):
        # You can run this inside a `maven` docker image if you don't have 
`mvn` locally
        mvn dependency:copy -Dartifact=$(SCHEMA_REGISTRY_CONVERTER_ARTIFACT) 
-DoutputDirectory=$(pwd)
   
   $(WOODSTOX_JAR):
        # You can run this inside a `maven` docker image if you don't have 
`mvn` locally
        mvn dependency:copy -Dartifact=$(WOODSTOX_ARTIFACT) 
-DoutputDirectory=$(pwd)
   
   $(STAX_JAR):
        # You can run this inside a `maven` docker image if you don't have 
`mvn` locally
        mvn dependency:copy -Dartifact=$(STAX_ARTIFACT) -DoutputDirectory=$(pwd)
   
   clean:
        @rm -f $(CONNECTOR_ZIP) $(SCHEMA_REGISTRY_CONVERTER_JAR) 
$(WOODSTOX_JAR) $(STAX_JAR)
   ```
   
   `build.sh`
   
   ```shell
   #!/usr/bin/env bash
   
   set -eo pipefail
   
   ICEBERG_VERSION=1.8.0
   
   [[ -n $ICEBERG_LOCATION ]] || {
     echo "ICEBERG_LOCATION environment variable not defined"
     exit 1
   }
   
   [[ -d $ICEBERG_LOCATION ]] || {
     echo "No directory exists at $ICEBERG_LOCATION"
     exit 1
   }
   
   pushd "$ICEBERG_LOCATION"
   ./gradlew -x test -x integrationTest build
   GIT_COMMIT=$(git rev-parse --short HEAD)
   popd
   
   ARTIFACT_FOLDER="kafka-connect/kafka-connect-runtime/build/distributions"
   
ARTIFACT_PATH="$ICEBERG_LOCATION/$ARTIFACT_FOLDER/iceberg-kafka-connect-runtime-$ICEBERG_VERSION-SNAPSHOT.zip"
   cp "$ARTIFACT_PATH" "iceberg-sink-$ICEBERG_VERSION-$GIT_COMMIT.zip"
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to