Skip to content

Commit b33b5fd

Browse files
download dependencies and release
1 parent 324a590 commit b33b5fd

File tree

1 file changed

+31
-34
lines changed

1 file changed

+31
-34
lines changed

unshaded_deploy.sh

+31-34
Original file line numberDiff line numberDiff line change
@@ -80,52 +80,49 @@ echo "[INFO] mvn clean compile"
8080
mvn clean compile ${MVN_OPTIONS[@]}
8181

8282
echo "[INFO] mvn dependency resolve"
83-
# mvn dependency:resolve dependency:resolve-plugins -DmanualInclude=org.codehaus.plexus:plexus-utils:jar:3.0.20 ${MVN_OPTIONS[@]} -Dmaven.wagon.http.pool=false
8483
mvn dependency:resolve dependency:resolve-plugins dependency:go-offline -DmanualInclude=org.codehaus.plexus:plexus-utils:jar:3.0.20 ${MVN_OPTIONS[@]}
8584

8685
echo "[INFO] mvn test"
8786
mvn test ${MVN_OPTIONS[@]}
88-
# -DmanualInclude="jakarta.xml.bind:jakarta.xml.bind-api"
8987

9088
echo "[Info] Sign unshaded package and deploy to staging area"
9189
project_version=$($THIS_DIR/scripts/get_project_info_from_pom.py $THIS_DIR/pom.xml version)
9290
echo "[Info] Project version: $project_version"
9391
$THIS_DIR/scripts/update_project_version.py pom.xml ${project_version} > generated_public_pom.xml
9492

95-
echo "[INFO] mvn deploy keepalive=false"
9693
mvn deploy ${MVN_OPTIONS[@]} -Dnot-shadeDep -Dossrh-deploy -Dhttp.keepAlive=false
9794

98-
# echo "[INFO] Close and Release"
99-
# snowflake_repositories=$(mvn ${MVN_OPTIONS[@]} \
100-
# org.sonatype.plugins:nexus-staging-maven-plugin:1.6.7:rc-list \
101-
# -DserverId=$MVN_REPOSITORY_ID -Dnot-shadeDep versions:set -DnewVersion=$project_version-unshaded -Dmaven.javadoc.skip=true -Dmaven.source.skip=true \
102-
# -DnexusUrl=https://oss.sonatype.org/ | grep netsnowflake | awk '{print $2}')
103-
# IFS=" "
104-
# if (( $(echo $snowflake_repositories | wc -l)!=1 )); then
105-
# echo "[ERROR] Not single netsnowflake repository is staged. Login https://oss.sonatype.org/ and make sure no netsnowflake remains there."
106-
# exit 1
107-
# fi
108-
# if ! mvn ${MVN_OPTIONS[@]} \
109-
# org.sonatype.plugins:nexus-staging-maven-plugin:1.6.7:rc-close \
110-
# -DserverId=$MVN_REPOSITORY_ID \
111-
# -DnexusUrl=https://oss.sonatype.org/ \
112-
# -DstagingRepositoryId=$snowflake_repositories \
113-
# -Dnot-shadeDep versions:set -DnewVersion=$project_version-unshaded -Dmaven.javadoc.skip=true -Dmaven.source.skip=true\
114-
# -DstagingDescription="Automated Close"; then
115-
# echo "[ERROR] Failed to close. Fix the errors and try this script again"
116-
# mvn ${MVN_OPTIONS[@]} \
117-
# nexus-staging:rc-drop \
118-
# -DserverId=$MVN_REPOSITORY_ID \
119-
# -DnexusUrl=https://oss.sonatype.org/ \
120-
# -DstagingRepositoryId=$snowflake_repositories -Dnot-shadeDep versions:set -DnewVersion=$project_version-unshaded -Dmaven.javadoc.skip=true -Dmaven.source.skip=true\
121-
# -DstagingDescription="Failed to close. Dropping..."
122-
# fi
95+
echo "[INFO] Close and Release"
96+
snowflake_repositories=$(mvn ${MVN_OPTIONS[@]} \
97+
org.sonatype.plugins:nexus-staging-maven-plugin:1.6.7:rc-list \
98+
-DserverId=$MVN_REPOSITORY_ID -Dnot-shadeDep versions:set -DnewVersion=$project_version-unshaded -Dmaven.javadoc.skip=true -Dmaven.source.skip=true \
99+
-DnexusUrl=https://oss.sonatype.org/ | grep netsnowflake | awk '{print $2}')
100+
IFS=" "
101+
if (( $(echo $snowflake_repositories | wc -l)!=1 )); then
102+
echo "[ERROR] Not single netsnowflake repository is staged. Login https://oss.sonatype.org/ and make sure no netsnowflake remains there."
103+
exit 1
104+
fi
105+
if ! mvn ${MVN_OPTIONS[@]} \
106+
org.sonatype.plugins:nexus-staging-maven-plugin:1.6.7:rc-close \
107+
-DserverId=$MVN_REPOSITORY_ID \
108+
-DnexusUrl=https://oss.sonatype.org/ \
109+
-DstagingRepositoryId=$snowflake_repositories \
110+
-Dnot-shadeDep versions:set -DnewVersion=$project_version-unshaded -Dmaven.javadoc.skip=true -Dmaven.source.skip=true\
111+
-DstagingDescription="Automated Close"; then
112+
echo "[ERROR] Failed to close. Fix the errors and try this script again"
113+
mvn ${MVN_OPTIONS[@]} \
114+
nexus-staging:rc-drop \
115+
-DserverId=$MVN_REPOSITORY_ID \
116+
-DnexusUrl=https://oss.sonatype.org/ \
117+
-DstagingRepositoryId=$snowflake_repositories -Dnot-shadeDep versions:set -DnewVersion=$project_version-unshaded -Dmaven.javadoc.skip=true -Dmaven.source.skip=true\
118+
-DstagingDescription="Failed to close. Dropping..."
119+
fi
123120

124-
# mvn ${MVN_OPTIONS[@]} \
125-
# org.sonatype.plugins:nexus-staging-maven-plugin:1.6.7:rc-release \
126-
# -DserverId=$MVN_REPOSITORY_ID \
127-
# -DnexusUrl=https://oss.sonatype.org/ \
128-
# -DstagingRepositoryId=$snowflake_repositories -Dnot-shadeDep versions:set -DnewVersion=$project_version-unshaded -Dmaven.javadoc.skip=true -Dmaven.source.skip=true\
129-
# -DstagingDescription="Automated Release"
121+
mvn ${MVN_OPTIONS[@]} \
122+
org.sonatype.plugins:nexus-staging-maven-plugin:1.6.7:rc-release \
123+
-DserverId=$MVN_REPOSITORY_ID \
124+
-DnexusUrl=https://oss.sonatype.org/ \
125+
-DstagingRepositoryId=$snowflake_repositories -Dnot-shadeDep versions:set -DnewVersion=$project_version-unshaded -Dmaven.javadoc.skip=true -Dmaven.source.skip=true\
126+
-DstagingDescription="Automated Release"
130127

131128
rm $OSSRH_DEPLOY_SETTINGS_XML

0 commit comments

Comments
 (0)