Skip to content

Update CI for release through Maven central #122

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jan 20, 2025
Merged

Update CI for release through Maven central #122

merged 4 commits into from
Jan 20, 2025

Conversation

javier-godoy
Copy link
Member

@javier-godoy javier-godoy commented Jan 20, 2025

Change in CI for release through Maven central (#121)

Summary by CodeRabbit

Release Notes

  • Chores

    • Updated project configuration for improved deployment and documentation
    • Removed assembly configuration files
    • Added project URL and distribution management details
  • Documentation

    • Enhanced project metadata
    • Added configuration for generating Javadocs
  • Build Process

    • Modified Maven source plugin execution phase
    • Added Maven Javadoc plugin configuration

@javier-godoy javier-godoy requested a review from paodb January 20, 2025 17:25
Copy link

coderabbitai bot commented Jan 20, 2025

Walkthrough

The pull request involves modifications to the project's build configuration and metadata. The changes include removing two assembly-related files (MANIFEST.MF and assembly.xml), and updating the pom.xml with new project metadata, distribution management settings, and build plugin configurations. These alterations appear to streamline the project's build process and enhance its deployment capabilities for open-source distribution.

Changes

File Change Summary
assembly/MANIFEST.MF Deleted metadata file containing Java application packaging information
assembly/assembly.xml Deleted Maven Assembly Plugin configuration for packaging project
pom.xml - Added project URL
- Introduced distribution management for OSSRH
- Removed maven-assembly-plugin
- Changed maven-source-plugin source attachment phase from verify to package
- Added maven-javadoc-plugin for Javadoc generation

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (2)
pom.xml (2)

45-50: Consider adding snapshotRepository configuration.

While the staging repository configuration is correct, consider adding a snapshotRepository for development versions:

 <distributionManagement>
    <repository>
      <id>ossrh</id>
      <url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
    </repository>
+   <snapshotRepository>
+     <id>ossrh</id>
+     <url>https://s01.oss.sonatype.org/content/repositories/snapshots/</url>
+   </snapshotRepository>
 </distributionManagement>

Line range hint 1-516: Maven Central release configuration is complete.

All required elements for Maven Central deployment are properly configured:

  • Project metadata (URL, SCM, license, developers)
  • Distribution management with OSSRH repository
  • Source and Javadoc generation
  • GPG signing

Consider setting up GitHub Actions workflow for automated releases to Maven Central using these configurations.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ce76c2a and 9ed8c4d.

📒 Files selected for processing (3)
  • assembly/MANIFEST.MF (0 hunks)
  • assembly/assembly.xml (0 hunks)
  • pom.xml (3 hunks)
💤 Files with no reviewable changes (2)
  • assembly/MANIFEST.MF
  • assembly/assembly.xml
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: build-vaadin24
🔇 Additional comments (3)
pom.xml (3)

10-10: LGTM! Required metadata for Maven Central.

The project URL is a required field for Maven Central deployment.


300-300: LGTM! Optimized build lifecycle.

Moving source JAR generation to 'package' phase is a valid optimization as it doesn't depend on verification.


Line range hint 308-332: Verify Vaadin Javadoc URL compatibility.

The Javadoc configuration looks good with proper settings for Maven Central requirements. However, let's verify the Vaadin Javadoc URL pattern:

✅ Verification successful

Javadoc URL configuration is correct and flexible

The Javadoc URL will automatically adapt to the active profile's Vaadin version (23.3.15, 23.3.5, or 24.2.6), ensuring correct documentation links regardless of the build profile used.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify if the Vaadin Javadoc URL pattern is valid for the configured version

# Extract Vaadin version
VAADIN_VERSION=$(grep -A1 '<vaadin.version>' pom.xml | grep -v '<vaadin.version>' | tr -d ' \t</>')

# Check if Javadoc URL exists
echo "Checking Javadoc URL for Vaadin version: $VAADIN_VERSION"
curl -s -I "https://javadoc.io/doc/com.vaadin/vaadin-platform-javadoc/$VAADIN_VERSION" | head -n 1

Length of output: 801


Script:

#!/bin/bash
# First, check if vaadin.version property exists and extract it
echo "Checking for vaadin.version property:"
grep -A1 '<vaadin.version>' pom.xml

# Use a more precise extraction with awk
echo -e "\nExtracting Vaadin version:"
awk '/<vaadin.version>/{getline; print}' pom.xml | sed 's/[[:space:]]//g' | sed 's/<.*>//g'

Length of output: 574


Script:

#!/bin/bash
# Get context around Javadoc plugin to identify its profile
echo "Profile context for Javadoc plugin:"
grep -B10 -A2 "maven-javadoc-plugin" pom.xml

# Get full profile context for Vaadin versions
echo -e "\nProfile context for Vaadin versions:"
grep -B5 -A1 "<vaadin.version>" pom.xml

Length of output: 1360

@paodb paodb merged commit 15b05b1 into master Jan 20, 2025
5 checks passed
@paodb paodb deleted the maven-central branch January 20, 2025 17:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants