SuperAPI AI Directory

eliteforge-new-java-maven-model

Coding & development

View repository

Updated 10-15 20:12

About this skill

Java Maven Model Module

Prefer to run scripts/scaffold_java_maven_model.py to create the module skeleton; do not hand-write the module name,pom.xml, package path, and parent module declaration. The script extracts pom.xml from the description of the root 公司名称、产品名称、服务名称, and completes the naming conversion according to the convention; if the parent pom.xml already has an dependencyManagement entry for an internal module of the same family, it will also be filled in. Empty directories use .gitkeep to ensure they can be tracked by Git.

Workflow

  1. First run --dry-runonce in the root directory of the target repository; if the current directory is not the root directory, pass --repo-root。
  2. Review the moduleName、packageName、groupId、artifactId、parent、managedDependency。
  3. output by the script to confirm it is correct, then execute the formal command to create the <serviceName>-<modelName> module.
  4. After execution, use git diff or directly open the parent pom.xml, confirm that at least <modules>was synchronized, and check whether dependencyManagement。
  5. was filled in according to the repository's existing conventions. Continue to add classes, dependencies, documentation, or tests only when the user explicitly requests it or the repository conventions explicitly require it.

Quick Commands

python3 .agents/skills/eliteforge-new-java-maven-model/scripts/scaffold_java_maven_model.py reasoning-engine
python3 .agents/skills/eliteforge-new-java-maven-model/scripts/scaffold_java_maven_model.py reasoning-engine --repo-root /path/to/repo
python3 .agents/skills/eliteforge-new-java-maven-model/scripts/scaffold_java_maven_model.py reasoning-engine --dry-run

Fixed Rules

  • The module name uses <serviceName>-<modelName>,serviceName and must be read from the description of the root pom.xml .
  • The package name uses cn.<companyName>.<productName>.<serviceName>.<modelName>, all converted to dot style.
  • artifactId uses app-<companyName>-<productName>-<serviceName>-<modelName>, all converted to hyphen style.
  • groupId uses cn.<companyName>.<productName>, all converted to dot style.
  • parent is identified by searching upward from the target directory for the nearest Maven aggregator parent project,<version> is fixed to ${revision}。
  • By default create pom.xml、src/main/java/<packagePath>/.gitkeep、src/main/resources/.gitkeep、src/test/java/.gitkeep。
  • If the parent pom.xml already has <modules>, append the new module; if not, create the <modules> block; do not write it repeatedly.
  • If the parent pom.xml already maintains internal module groupId according to the same app-<company>-<product>-<service>-* and dependencyManagementconventions, then append the managed dependency for the current module; if the repository does not have this convention, do not add it out of thin air.
  • If <serviceName>-runtime-planeexists in the repository, it can be treated as an optional reference module for observing naming and minimal directory habits; if it cannot be found, still create according to the built-in minimal skeleton, without affecting the applicability of the skill.
  • After the scaffolding is complete, review git difffirst to confirm that there is no omission of the parent pom.xml module aggregation or internal dependency management synchronization.
  • If the user also requests business code, tests, or module documentation, first create the module skeleton, then continue executing other skills or repository conventions.