Custom Commands Overview
While Needlecast auto-detects most build commands, you can add custom commands for project-specific workflows.
Adding Custom Commands
- Right-click the Commands panel
- Select Add Custom Command
- Enter command details:
- Name — Display name in the panel
- Command — The actual command line to execute
- Working Directory — Optional, defaults to project root
Command Variables
Use these variables in custom commands:
{projectDir}— Project directory path{env:VAR_NAME}— Environment variable value
Example:
echo "Building in {projectDir}" && mvn -f {projectDir}/pom.xml package
Managing Custom Commands
- Edit — Right-click → Edit
- Delete — Right-click → Delete
- Reorder — Drag up/down in the list
Use Cases
Multi-Step Builds
Chain commands: clean → compile → test → package
Deployment Scripts
Run deployment scripts with project-specific paths
Custom Testing
Run project-specific test suites