Maven druid build optimization
[COLM'26] SkillLearnBench is the first benchmark for evaluating continual learning methods that automatically generate agent skills.
npx -y skills add cxcscmu/SkillLearnBench --skill maven-druid-build-optimizationAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
What its author says it does
Copied from the file, not written here
How to build Apache Druid efficiently with Maven while skipping unnecessary checks and OOM-prone modules. Use this skill when building patched Druid versions, when rebuilding after security fixes, or when the web-console module causes out-of-memory errors.
SKILL.md
3.3 KB, 764 tokens by cl100k_base, as published. Nobody here has run it
Maven Druid Build Optimization
Overview
Apache Druid is a large project with extensive code quality checks and a heavy web-console module. When building a patched version or in memory-constrained environments, selective skipping of modules and checks optimizes build time and resource usage.
Build Command Structure
The standard optimized build for patched Druid skips:
- Web-console module (
-pl '!web-console') - Frontend build with Node.js dependencies, causes OOM - Unit tests (
-DskipTests) - Can be skipped when applying security patches - Code quality checks - Multiple style, security, and analysis tools
Full Build Command for Patched Druid
cd /root/druid
mvn clean package \
-DskipTests \
-Dcheckstyle.skip=true \
-Dpmd.skip=true \
-Dforbiddenapis.skip=true \
-Dspotbugs.skip=true \
-Danimal.sniffer.skip=true \
-Denforcer.skip=true \
-Djacoco.skip=true \
-Ddependency-check.skip=true \
-pl '!web-console' \
-pl indexing-service \
-am
Understanding the Flags
Module Selection
-pl '!web-console'- Exclude web-console from build (prevents OOM)-pl indexing-service- Include only indexing-service module-am(--also-make) - Build dependencies of selected modules
Test Skipping
-DskipTests- Skip test compilation and execution
Quality Check Skips
These skip code quality tools that can be safely bypassed for patched code:
-Dcheckstyle.skip=true- Checkstyle code style checks-Dpmd.skip=true- PMD static analysis-Dforbiddenapis.skip=true- Forbidden APIs checks-Dspotbugs.skip=true- SpotBugs security analysis-Danimal.sniffer.skip=true- Animal Sniffer API compatibility-Denforcer.skip=true- Maven Enforcer rules-Djacoco.skip=true- Code coverage-Ddependency-check.skip=true- Dependency vulnerability checking
Build Phases
clean- Remove previous build artifactspackage- Compile and create JAR files
Build Output Location
Built artifacts (JAR files) are located at:
druid-indexing-service/target/druid-indexing-service-<version>-<classifier>.jar
Memory Management
If you still encounter OOM errors:
-
Increase Maven heap:
export MAVEN_OPTS="-Xmx2g" -
Build specific modules sequentially:
mvn clean package -pl 'druid-core' -DskipTests -Dcheckstyle.skip=true ... mvn package -pl 'druid-indexing-service' -am -DskipTests -Dcheckstyle.skip=true ...
Verification After Build
After a successful build, verify the JAR was created:
ls -lh druid-indexing-service/target/*.jar
The verifier will deploy the JAR to /opt/druid/lib/ and restart the Druid service before running tests.
Build Troubleshooting
- Timeout issues: Increase Maven timeout:
mvn -DmultiModuleProjectDirectory=. ... - Out of memory: Use
-Xmx4gor higher in MAVEN_OPTS - Module not found: Verify module names with
mvn -pl help:describe - Dependency issues: Run
mvn dependency:treeto verify dependency resolution
Gives 0 of the 12 instructions most performance cost skills give in 764 tokens
Counted across 803 of the 1,058 authors here whose files we hold, read 2026-08-06
- keep skill files under 500 linesin 82 of 803, across 17 files
- use imperative form in instructionsin 81 of 803, across 10 files
- draft assertions while test runs are in progressin 75 of 803, across 9 files
- create two to three realistic test promptsin 74 of 803, across 8 files
- write skill descriptions to be pushyin 72 of 803, across 7 files
- save test cases to evals jsonin 72 of 803, across 6 files
- ask questions about edge cases and input formatsin 71 of 803, across 6 files
- save timing data immediately when runs completein 70 of 803, across 5 files
- include all trigger conditions in the skill descriptionin 69 of 803, across 3 files
- launch all test runs in a single turnin 69 of 803, across 3 files
- capture intent before writing a skillin 67 of 803, across 1 file
- import directly instead of barrel filesin 52 of 803, across 15 files
Said here and by no other author read
- exclude the web-console module
- skip unit tests
- skip code quality checks
- build specific modules with dependencies
- increase maven heap size
- build specific modules sequentially
Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.