Skip to content

Instantly share code, notes, and snippets.

@Genzer
Last active February 15, 2024 11:26
Show Gist options
  • Save Genzer/a75d8f7d9edb6f04b642a3ff1663b0af to your computer and use it in GitHub Desktop.
Save Genzer/a75d8f7d9edb6f04b642a3ff1663b0af to your computer and use it in GitHub Desktop.
Temporary deploy an unofficial fix of feign-reactive to CodeArtifact
#!/usr/bin/env bash
set -u -e -o pipefail
git clone https://github.com/ramzes3333/feign-reactive
# Change version to 4.0.4.UNOFFICIAL
find feign-reactive -type f -name 'pom.xml' \
-exec \
sed -i 's|version>4.0.3</|version>4.0.4.UNOFFICIAL</|' {} \;
# Create a minimal Maven Settings to allow mvn to look up
# credentials. The value `id` MUST be used in subsequent steps
cat <<'_XML_' >|settings.xml
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 https://maven.apache.org/xsd/settings-1.0.0.xsd">
<servers>
<server>
<id>anything-will-work</id>
<username>aws</username>
<password>${env.CODEARTIFACT_AUTH_TOKEN}</password>
</server>
</servers>
</settings>
_XML_
# Make sure you have CODEARTIFACT_AUTH_TOKEN set
# to a valid token issued by AWS CodeArtifact.
mvn \
-f feign-reactive/pom.xml \
-s settings.xml \
-DaltDeploymentRepository=anything-will-work::https://example-0123456789.d.codeartifact.ap-southeast-1.amazonaws.com/maven/sample-repository-name/ deploy -DskipTests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment