verify-persistence

Validate persistence.xml JNDI names use environment variables for Java EE deployments.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/withmartian-sandbox/ghrc-x-a78d77e2f0a84f43b4d486d418566b5b --skill verify-persistence-withmartian-sandbox
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: verify-persistence
Source: https://github.com/withmartian-sandbox/ghrc-x-a78d77e2f0a84f43b4d486d418566b5b/tree/main/.claude/skills/verify-persistence
Command: npx skills add https://github.com/withmartian-sandbox/ghrc-x-a78d77e2f0a84f43b4d486d418566b5b --skill verify-persistence-withmartian-sandbox

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill helps prevent QA deployment failures by validating that persistence.xml uses environment variables for JNDI values rather than hardcoded names, ensuring deployments are reliable.

Core Features & Use Cases

  • Configuration validation: Read src/main/resources/META-INF/persistence.xml and verify that the main datasource uses ${JDBC_DATASOURCE} and the audit datasource uses ${JDBC_AUDIT_DATASOURCE} rather than hardcoded values.
  • Hard-coded path checks: Detect any hardcoded DDL generation paths such as c:/tmp/ or /home/*/tmp/ and flag them.
  • Reporting: Produce a clear report with issues and recommended fixes; when all checks pass, indicate "Persistence.xml is deployment-ready".
  • Use Case: Integrate into CI/CD pipelines or pre-push hooks to catch misconfigurations before deployment.

Quick Start

Run the verify-persistence check on your project to detect hardcoded persistence.xml values and ensure environment-variable usage.

Frequently Asked Questions about verify-persistence

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I validate persistence.xml for hardcoded JNDI values before deployment?

Detect hardcoded DDL generation paths in persistence.xml by scanning for specific directory patterns like c:/tmp/ or /home/*/tmp/. Flagging these hardcoded paths prevents environment-specific deployment failures and ensures reliable CI/CD pipeline execution.

How does checking environment variables in persistence.xml prevent CI/CD deployment failures?

The persistence.xml validation check fits Java EE or Jakarta EE projects that use persistence.xml in CI/CD pipelines. It specifically targets applications needing datasource configuration validation to prevent misconfigurations during deployment.

What is the best way to flag hardcoded paths in persistence.xml during CI/CD?

The best way to flag hardcoded paths in persistence.xml is to run an automated validation check that detects specific DDL generation paths such as c:/tmp/ or /home/*/tmp/. This process reports findings with current values and recommended fixes.

Can I use a persistence.xml validation check for Java EE projects in a pre-push hook?

Yes, you can integrate a persistence.xml validation check into pre-push hooks or CI/CD pipelines for Java EE projects. It reads the configuration file, verifies environment variable usage for JNDI names, and indicates when the file is deployment-ready.