mps-distribution-build
Skill1.7k starsChanged 2 months agoApache-2.0View on GitHub
Use when bundling a new plain Java/Kotlin plugin into MPS distribution archives, debugging packaging/layout issues in `build/mps*.xml`, tracing where per-plugin artefacts end up, or editing `plugins/mps-build/solutions/mpsBuild/models/build.mps` (the source of truth that generates every `build/mps*.xml`). The skill covers the generated Ant pipeline, plugin-to-distribution wiring, and the per-plugin / aggregator / distribution layers.
Trending
Quiet since October.thin dataabout the whole repository
Who's talking about JetBrains/MPS
- mbeddr/mps-gradle-plugin“Null pointer exception on generate”GitHub · May 18, 2020 · 1 reactions
- nebojsa-vuksic/skill-atlas“Scan every repository of an organization or user”GitHub · Oct 1, 2026
- modelix/modelix.editor“Implement MPS shortcuts”GitHub · Feb 21, 2023
The biggest 3 of 3 mentions linking to the repository that our crawl found. Each line is their own headline.
In this repository83 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- actionsSkill
- bugfix-workflowSkill
- code-styleSkill
- commitsSkill
- debuggingSkill
- mps-aspect-accessoriesSkill
- mps-aspect-actionsSkill
- mps-aspect-behaviorSkill
- mps-aspect-constraintsSkill
- mps-aspect-dataflowSkill
- mps-aspect-editor-menus-and-keymapsSkill
- mps-aspect-editorSkill
- mps-aspect-generation-planSkill
- mps-aspect-generatorSkill
- mps-aspect-intentionsSkill
- mps-aspect-migrationsSkill
- mps-aspect-structure-conceptsSkill
- mps-aspect-textgenSkill
- mps-aspect-typesystemSkill
- mps-baselanguageSkill
- mps-build-languageSkill
- mps-consoleSkill
- mps-dsl-memorySkill
- mps-ide-pluginSkill
- mps-lang-core-xmlSkill
- mps-language-analysisSkill
- mps-language-aspects-overviewSkill
- mps-language-inheritanceSkill
- mps-language-modularitySkill
- mps-mcp-workflowSkill
- mps-model-manipulationSkill
- mps-node-editingSkill
- mps-project-managementSkill
- mps-quotationsSkill
- mps-run-configurationsSkill
- mps-testsSkill
- registrySkill
- skill-optimization-studySkill
- ssrSkill
- teamcity-cliSkill
- actionsSkill
- bugfix-workflowSkill
- code-styleSkill
- commitsSkill
- debuggingSkill
- mps-aspect-accessoriesSkill
- mps-aspect-actionsSkill
- mps-aspect-behaviorSkill
- mps-aspect-constraintsSkill
- mps-aspect-dataflowSkill
- mps-aspect-editor-menus-and-keymapsSkill
- mps-aspect-editorSkill
- mps-aspect-generation-planSkill
- mps-aspect-generatorSkill
- mps-aspect-intentionsSkill
- mps-aspect-migrationsSkill
- mps-aspect-structure-conceptsSkill
- mps-aspect-textgenSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 0 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 30
Author in
build.mps: Add a BuildProject <projectName> with the right BuildLayout (Java/Kotlin source roots, META-INF/plugin.xml, jar … - Very specific: line 33
Smoke step (no full build): Run ant -f build/<projectName>.xml assemble in isolation.
- Very specific: line 35
If the plugin has a test/ source root, add a sibling test-only BuildProject (<projectName>Tests) — see references/test-suite-wiring.md.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
MPS Distribution Build — Ant Pipeline & Plugin Bundling
Loading companion skills
Companion names in this skill are lazy dependencies: load only those relevant to the current task. If this skill came from an MCP server, use the host's skill loader to resolve the companion's unique discovered entry URI on the same host-assigned originating server. If the host has no server-backed skill loader, stop and report that limitation; do not silently fall back to a filesystem copy. If this skill came from a filesystem catalog, load the named sibling from that same catalog at <skills-root>/<skill-name>/SKILL.md, even if remote skill loaders are also available. Do not invent a tool name or server endpoint.
This skill explains how the generated Ant scripts under build/mps*.xml assemble MPS distribution archives, and how to add a new plain Java/Kotlin plugin module (e.g. plugins/mcp-tools) so it ends up in the produced archives. Authoring the model that generates these Ant scripts is covered separately by mps-build-language — this skill focuses on the output side and the plugin-bundling touchpoints.
Critical Directives
- The Ant files are generated. All
build/mps*.xmlfiles carry<!-- Generated by MPS -->. Do not hand-edit them as a permanent solution — author the change inplugins/mps-build/solutions/mpsBuild/models/build.mpsand regenerate. - A new per-plugin
BuildProjectis invisible to the distribution until it is also wired into thempsaggregator BuildProject andmpsDistribution. A plugin can build intobuild/artifacts/<projectName>/but never enter the final zip ifmps.xmlis not updated. - IDEA platform jars under
<MPS>/lib/and<MPS>/plugins/<idea-plugin>/lib/are fetched bybuild.xml platform(Ivy viagetDependencies.xml). They do not exist on a clean checkout, and noBuildProjectdeclares the fetch. Every per-plugin script implicitly requiresant -f build/build.xml platformto have already run. - There is no
${idea.plugins.dir}macro — do not invent one. Reference fetched IDEA-plugin jars via${basedir}/plugins/<idea-plugin>/lib/(matches the IDEA project libraries under.idea/libraries/*.xml). - The
test/source root is not part of the production jar. Test compilation belongs in a sibling test-onlyBuildProject(cf.mpsTesting.xml), not layered onto the production jar. - Validate cheap first: regenerate, then run
ant -f build/<projectName>.xml assemblein isolation before running the fullbuild/run_build.sh.
Common-Path Workflow — Bundle a New Plain Java/Kotlin Plugin
Running example: bundling plugins/mcp-tools (a JAVA_MODULE with Kotlin sources, depending on com.intellij.mcpServer).
- Diagnose where the plugin currently is.
grep -r <plugin-name> build/(empty → no generated Ant script). Look underbuild/artifacts/<projectName>/,build/artifacts/mps/plugins/<x>/, and the final${build.number}*.zipto find which layer is missing it. Seereferences/diagnostics.md. - Pick a shape. Model it like
mpsHttpSupportPlugin(Option A, preferred — full Ant compile pipeline) or likemcpserver/terminal(Option B — pre-built, copied from<MPS>/plugins/<x>/bympsStandalone). Seereferences/plugin-bundling-options.md. - Author in
build.mps. Add aBuildProject <projectName>with the rightBuildLayout(Java/Kotlin source roots,META-INF/plugin.xml, jar packaging, dependencies viaBuildSource_JavaDependencyModule/…ExternalJar). Carry theBuildJavaPluginmarker so the generator emits a plain compile pipeline. Depend onmpsBootstrapCore(and likelympsCore/mpsWorkbench). Seereferences/build-mps-authoring.md. - Wire it into the aggregator. Edit the
mpsaggregator BuildProject so it imports${artifacts.<projectName>}, copies${artifacts.<projectName>}/<plugin-folder>into${build.layout}/plugins/<plugin-folder>, and invokes the new Ant file in itsbuildDependents. Add the same<ant antfile="build/<projectName>.xml" …/>line tompsDistribution.xml'sbuildDependents. - Regenerate
build.mps. A newbuild/<projectName>.xmlwill appear;build/mps.xmlandbuild/mpsDistribution.xmlwill be updated by the same regeneration. - Smoke step (no full build). Run
ant -f build/<projectName>.xml assemblein isolation. Pre-runant -f build/build.xml platformonce so the IDEA jars exist on disk. - Full build via
build/run_build.sh. Verify the three artefact locations inreferences/validation.md. - If the plugin has a
test/source root, add a sibling test-onlyBuildProject(<projectName>Tests) — seereferences/test-suite-wiring.md.
Pipeline at a Glance
build.xml build.txt dependencies.properties
│ │ │
├─ platform ───────────► Ivy fetches IDEA + libs into <MPS>/lib, <MPS>/plugins/*
│ (getDependencies.xml)
│
├─ getResourcesAndBuildAll
│ └─ mpsDistribution.xml buildDependents
│ ├─ mpsTrueBootstrap.xml ──┐
│ ├─ mpsBootstrapCore.xml │ per-plugin Ant scripts
│ ├─ mpsCore.xml │ (compile + jar + layout into
│ ├─ mpsWorkbench.xml │ build/artifacts/<projectName>/)
│ ├─ mpsBuild.xml │
│ ├─ mpsTesting.xml │
│ ├─ mpsPlugins.xml │
│ ├─ mpsJava.xml │
│ ├─ mpsHttpSupportPlugin.xml│
│ ├─ mpsKotlinPlugin.xml │
│ ├─ mpsContextActionsTool.xml│
│ ├─ … (30+ files) ─┘
│ └─ mps.xml (aggregates into build/artifacts/mps/)
│
└─ assemble
└─ mpsDistribution.xml assemble (zips/tars into build/artifacts/mpsDistribution/)Related Skills
mps-build-language— when you are authoring or editing the build language model itself, not just consuming its output.mps-tests— when the plugin you are bundling has a JUnit / MPS test suite that must run in CI.mps-ide-plugin— when the new module is an MPS IDE plugin (plugin.xml, actions, tool windows). Bundling and IDE-plugin authoring are independent steps.mps-aspect-generator— when the failure is in MPS generation rather than packaging.
Reference Index
- Open
references/architecture.mdfor the long form of "how Ant files compose" — entry pointbuild/build.xmltargets, the three layers of generated scripts (mpsTrueBootstrap.xml/mpsBootstrapCore.xml/per-plugin files;mps.xmlaggregator;mpsStandalone.xml), and the final distribution layermpsDistribution.xmlwith its per-platform archives. Open when you need to know where a particular file lives in the pipeline or what itsbuildDependentsdoes. - Open
references/build-mps-source-of-truth.mdwhen editingplugins/mps-build/solutions/mpsBuild/models/build.mps— explains theBuildProjectstructure, the meaning of opaque concept indices (1l3spW,398b33,TrG5h,turDy,2DA0ip,1l3spV,10PD9b), and how regeneration writes thebuild/*.xmlfiles. - Open
references/plugin-bundling-options.mdto choose between Option A (full Ant compile pipeline likempsHttpSupportPlugin) and Option B (pre-built drop intompsStandalone). Includes the rationale for picking Option A for new MPS-authored plugins. - Open
references/build-mps-authoring.mdwhen adding the newBuildProjecttobuild.mps—BuildLayoutshape,BuildSource_JavaModule/BuildSource_JavaContentRoot, theBuildJavaPluginmarker, dependency chain throughmpsBootstrapCore, and the convention for referencing fetched IDEA-plugin jars via${basedir}/plugins/<idea-plugin>/lib/. - Open
references/diagnostics.mdwhen a plugin is missing from the distribution and you need to figure out which layer dropped it — three-step diagnosis usinggrep,build/artifacts/<projectName>/, andbuild/artifacts/mps/plugins/<x>/. - Open
references/validation.mdfor the two-stage validation procedure (cheapant -f build/<projectName>.xml assemblesmoke step, then fullbuild/run_build.sh) and the three artefact locations to verify after a full build. - Open
references/touchpoint-checklist.mdfor the table of files modified by adding a new Option A plugin — what is hand-edited (build.mps), what is regenerated (build/<projectName>.xml,build/mps.xml,build/mpsDistribution.xml), and what stays unchanged (plugins/<plugin>/META-INF/plugin.xml,.iml). - Open
references/test-suite-wiring.mdwhen the new plugin has atest/source root that must run in CI — sibling test-onlyBuildProject, JUnit launcher, and…Tests.xmlaggregator wiring. - Open
references/key-files.mdfor the quick reference of every build file mentioned anywhere in this skill, with one-line descriptions.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

