Skip to content

feat: ensure url doesn't have version. upgrade version#67

Merged
drtechie merged 3 commits into
developfrom
build-update
May 19, 2025
Merged

feat: ensure url doesn't have version. upgrade version#67
drtechie merged 3 commits into
developfrom
build-update

Conversation

@drtechie

@drtechie drtechie commented May 15, 2025

Copy link
Copy Markdown
Member
  • Update version to v3.1.0
  • Set finalName to ${artifactId}-${version}
  • Add jboss-web.xml for API repositories

Summary by CodeRabbit

  • New Features

    • Added a deployment descriptor to define the application’s context root for JBoss servers.
  • Configuration

    • Updated project version and artifact naming conventions.
    • Changed project name formatting.
    • Introduced a new property for specifying the log directory.
    • Added new configuration properties for JWT secret and logging in the example configuration.
    • Removed logging file properties from the main configuration.
    • Deleted environment-specific configuration files for development, test, and UAT environments.

@coderabbitai

coderabbitai Bot commented May 15, 2025

Copy link
Copy Markdown

Walkthrough

This update modifies build and environment configuration files. The Maven project version and artifact naming are updated, and a new Ant plugin execution is added for property file cleanup. Several environment-specific properties files are deleted, while logging and JWT properties are added or adjusted in remaining configuration files. A JBoss deployment descriptor is introduced.

Changes

File(s) Change Summary
pom.xml Updated project version and name; changed artifact naming to dynamic; added Maven Antrun plugin execution for deleting property files after resource processing.
src/main/environment/ecd_ci.properties Added logging.path=logs/ property before the existing logging file name property.
src/main/environment/ecd_example.properties Added JWT secret, logging path, and logging file name properties; included explanatory comment about logging property precedence.
src/main/environment/ecd_dev.properties
src/main/environment/ecd_test.properties
src/main/environment/ecd_uat.properties
Deleted environment-specific properties files for development, test, and UAT, which contained datasource, API endpoint, JWT, and documentation configuration.
src/main/resources/application.properties Removed logging path and logging file name properties, and their explanatory comment.
src/main/webapp/WEB-INF/jboss-web.xml Added JBoss web deployment descriptor specifying context root /ecd-api.

Sequence Diagram(s)

sequenceDiagram
    participant Developer
    participant Maven
    participant AntrunPlugin
    participant FileSystem

    Developer->>Maven: Run build (package/install)
    Maven->>AntrunPlugin: Execute during process-resources
    AntrunPlugin->>FileSystem: Concatenate property files
    AntrunPlugin->>FileSystem: Delete ${source-properties} file (clean-property-files)
Loading

Poem

In the warren of configs, a shuffle anew,
Old files hop away, and fresh paths debut.
JWT secrets burrow deep, logs nest in their place,
JBoss finds its root, a comfy new space.
With Maven’s magic, the build hops along—
A rabbit’s delight: tidy, nimble, and strong! 🐇


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ 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.
    • Explain this complex logic.
    • 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 explain this code block.
    • @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 explain its main purpose.
    • @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.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

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.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
src/main/environment/ecd_ci.properties (1)

25-25: Add clarity for logging property precedence.
You’ve introduced logging.path=logs/ above logging.file.name. For consistency with other environment files, consider adding a comment such as:

# If both logging.path and logging.file.name are set, only logging.file.name takes effect.
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge Base: Disabled due to data retention organization setting

📥 Commits

Reviewing files that changed from the base of the PR and between 66e2a8b and d35c8e1.

📒 Files selected for processing (8)
  • pom.xml (3 hunks)
  • src/main/environment/ecd_ci.properties (1 hunks)
  • src/main/environment/ecd_dev.properties (0 hunks)
  • src/main/environment/ecd_example.properties (1 hunks)
  • src/main/environment/ecd_test.properties (0 hunks)
  • src/main/environment/ecd_uat.properties (0 hunks)
  • src/main/resources/application.properties (0 hunks)
  • src/main/webapp/WEB-INF/jboss-web.xml (1 hunks)
💤 Files with no reviewable changes (4)
  • src/main/environment/ecd_dev.properties
  • src/main/environment/ecd_uat.properties
  • src/main/resources/application.properties
  • src/main/environment/ecd_test.properties
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Analyze (java)
🔇 Additional comments (6)
src/main/webapp/WEB-INF/jboss-web.xml (1)

1-4: Context-root declaration for JBoss deployment is correct.
The new jboss-web.xml sets the context root to /ecd-api, aligning with the goal of having a versionless URL. Ensure this matches your routing configuration and that no version token is injected at runtime.

src/main/environment/ecd_example.properties (1)

24-26: Logging configuration is well-documented.
The comment and the added properties (logging.path, logging.file.name) clearly define where logs are stored. This matches best practices for environment-specific settings.

pom.xml (4)

14-14: Bump project version to 3.1.0.
The version has been correctly updated from 0.0.1 to 3.1.0. Ensure downstream modules or CI pipelines referencing the old version are updated accordingly.


16-16: Capitalize project name.
Changing <name> to ECD-API improves readability in generated artifacts and documentation. This aligns with the artifactId and version naming convention.


252-252: Use dynamic finalName for artifact.
Switching to ${artifactId}-${version} makes the final WAR filename reflect the current version automatically. This is a good practice.


339-352: Verify property-file cleanup execution.
The new Ant run execution (clean-property-files) deletes the source properties after concatenation. Maven processes executions in declaration order, so this should work. Please confirm that:

  1. ${source-properties} points to the correct file in target/classes.
  2. No later build steps depend on the original source properties file.

springdoc.api-docs.enabled=true
springdoc.swagger-ui.enabled=true

jwt.secret=my-32-character-ultra-secure-and-ultra-long-secret

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue

Avoid committing real secrets in example configs.
The example file contains a concrete JWT secret. Replace it with a clear placeholder (e.g., YOUR_JWT_SECRET_HERE) and document that a real secret must be provided during deployment to prevent accidental exposure.

🤖 Prompt for AI Agents
In src/main/environment/ecd_example.properties at line 23, replace the concrete
JWT secret value with a clear placeholder like YOUR_JWT_SECRET_HERE. Add a
comment or note indicating that a real secret must be provided during deployment
to avoid accidental exposure of sensitive information.

@sonarqubecloud

Copy link
Copy Markdown

@drtechie
drtechie merged commit 23e13fa into develop May 19, 2025
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.

1 participant