Skip to content

Commit 447c037

Browse files
committed
updated maven
1 parent 7227cb3 commit 447c037

2 files changed

Lines changed: 76 additions & 5 deletions

File tree

.github/workflows/publish.yml

Lines changed: 73 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -214,11 +214,80 @@ jobs:
214214
}
215215
216216
echo "✅ Deployment completed successfully!"
217+
echo ""
218+
echo "📋 Next Steps:"
219+
echo "1. Check staging repository at: https://central.sonatype.com/"
220+
echo "2. Wait 10-30 minutes for sync to Maven Central"
221+
echo "3. Verify at: https://repo1.maven.org/maven2/io/translateplus/translateplus-java/$VERSION/"
217222
218-
- name: Verify publication
223+
- name: Check Staging Repository Status
224+
env:
225+
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
226+
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
227+
run: |
228+
echo "Checking staging repository status..."
229+
echo "Note: This requires Sonatype Central API access"
230+
echo ""
231+
echo "To check manually:"
232+
echo "1. Go to: https://central.sonatype.com/"
233+
echo "2. Log in with your Sonatype credentials"
234+
echo "3. Check 'Staging Repositories' for your artifact"
235+
echo "4. Status should be 'Closed' or 'Released'"
236+
echo ""
237+
echo "If status is 'Open', you may need to:"
238+
echo "- Close the repository"
239+
echo "- Release the repository"
240+
echo ""
241+
echo "With autoPublish=true, this should happen automatically"
242+
243+
- name: Wait and Verify Maven Central Sync
219244
run: |
220245
VERSION=${{ steps.get_version.outputs.version || steps.set_version.outputs.version }}
221-
echo "Published version: $VERSION"
222-
echo "Check status at: https://central.sonatype.com/"
223-
echo "Artifact will be available at:"
246+
echo "Waiting 30 seconds before checking Maven Central..."
247+
sleep 30
248+
249+
echo "Checking if artifact is available on Maven Central..."
250+
MAX_ATTEMPTS=12
251+
ATTEMPT=0
252+
253+
while [ $ATTEMPT -lt $MAX_ATTEMPTS ]; do
254+
ATTEMPT=$((ATTEMPT + 1))
255+
echo "Attempt $ATTEMPT/$MAX_ATTEMPTS: Checking Maven Central..."
256+
257+
if curl -s -f "https://repo1.maven.org/maven2/io/translateplus/translateplus-java/$VERSION/" > /dev/null 2>&1; then
258+
echo "✅ Artifact is now available on Maven Central!"
259+
echo "URL: https://repo1.maven.org/maven2/io/translateplus/translateplus-java/$VERSION/"
260+
exit 0
261+
else
262+
if [ $ATTEMPT -lt $MAX_ATTEMPTS ]; then
263+
echo "⏳ Not yet available. Waiting 2 minutes before next check..."
264+
sleep 120
265+
fi
266+
fi
267+
done
268+
269+
echo "⚠️ Artifact not yet available on Maven Central after $((MAX_ATTEMPTS * 2)) minutes"
270+
echo "This is normal - sync can take 10-30 minutes"
271+
echo "Please check manually at:"
224272
echo "https://repo1.maven.org/maven2/io/translateplus/translateplus-java/$VERSION/"
273+
echo ""
274+
echo "Also check Sonatype Central for any validation errors:"
275+
echo "https://central.sonatype.com/"
276+
277+
- name: Verify publication
278+
run: |
279+
VERSION=${{ steps.get_version.outputs.version || steps.set_version.outputs.version }}
280+
echo "📦 Published version: $VERSION"
281+
echo ""
282+
echo "🔍 Check these URLs:"
283+
echo "1. Sonatype Central (staging): https://central.sonatype.com/"
284+
echo "2. Maven Central (after sync): https://repo1.maven.org/maven2/io/translateplus/translateplus-java/$VERSION/"
285+
echo ""
286+
echo "⏱️ Sync time: Usually 10-30 minutes after release"
287+
echo ""
288+
echo "📝 Maven dependency:"
289+
echo "<dependency>"
290+
echo " <groupId>io.translateplus</groupId>"
291+
echo " <artifactId>translateplus-java</artifactId>"
292+
echo " <version>$VERSION</version>"
293+
echo "</dependency>"

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,6 @@ target/
1010
MAVEN_CENTRAL_SETUP.md
1111
GPG_SETUP.md
1212
STEP_BY_STEP_SETUP.md
13-
TROUBLESHOOTING.md
13+
TROUBLESHOOTING.md
14+
MAVEN_CENTRAL_SETUP.md
15+
MAVEN_CENTRAL_SYNC.md

0 commit comments

Comments
 (0)