@@ -80,52 +80,49 @@ echo "[INFO] mvn clean compile"
80
80
mvn clean compile ${MVN_OPTIONS[@]}
81
81
82
82
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
84
83
mvn dependency:resolve dependency:resolve-plugins dependency:go-offline -DmanualInclude=org.codehaus.plexus:plexus-utils:jar:3.0.20 ${MVN_OPTIONS[@]}
85
84
86
85
echo " [INFO] mvn test"
87
86
mvn test ${MVN_OPTIONS[@]}
88
- # -DmanualInclude="jakarta.xml.bind:jakarta.xml.bind-api"
89
87
90
88
echo " [Info] Sign unshaded package and deploy to staging area"
91
89
project_version=$( $THIS_DIR /scripts/get_project_info_from_pom.py $THIS_DIR /pom.xml version)
92
90
echo " [Info] Project version: $project_version "
93
91
$THIS_DIR /scripts/update_project_version.py pom.xml ${project_version} > generated_public_pom.xml
94
92
95
- echo " [INFO] mvn deploy keepalive=false"
96
93
mvn deploy ${MVN_OPTIONS[@]} -Dnot-shadeDep -Dossrh-deploy -Dhttp.keepAlive=false
97
94
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
123
120
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"
130
127
131
128
rm $OSSRH_DEPLOY_SETTINGS_XML
0 commit comments