Skip to content

Latest commit

 

History

History
116 lines (82 loc) · 2.66 KB

File metadata and controls

116 lines (82 loc) · 2.66 KB

jremote Build Scripts

This directory contains convenience scripts for building, testing, and managing the jremote project on both Unix/Linux and Windows platforms.

Quick Start Scripts

All scripts are available in both Batch (.bat) and PowerShell (.ps1) formats for Windows compatibility.

Build Scripts

Script Purpose
build.bat / build.ps1 Clean and compile the project
test.bat / test.ps1 Run all unit and integration tests
package.bat / package.ps1 Create JAR file in target/ directory
install.bat / install.ps1 Install to local Maven repository (~/.m2)
clean.bat / clean.ps1 Remove all build artifacts

CI/CD Scripts

Script Purpose
ci/rev-version.sh Increment version, tag, and push (Bash)
ci/rev-version.bat Increment version, tag, and push (Windows Batch)
ci/rev-version.ps1 Increment version, tag, and push (PowerShell)

Usage Examples

Windows Command Prompt

REM Build the project
build.bat

REM Run tests
test.bat

REM Create JAR package
package.bat

REM Install to local Maven repo
install.bat

REM Clean build artifacts
clean.bat

REM CI version bump (requires git credentials)
ci\rev-version.bat

Windows PowerShell

# Build the project
.\build.ps1

# Run tests
.\test.ps1

# Create JAR package
.\package.ps1

# Install to local Maven repo
.\install.ps1

# Clean build artifacts
.\clean.ps1

# CI version bump (requires git credentials)
.\ci\rev-version.ps1

Linux/macOS

# For CI version bumping
./ci/rev-version.sh

# For regular builds, use Maven directly
mvn clean install
mvn test

Requirements

  • Java 21 or higher
  • Maven 3.6+
  • Git (for CI scripts)

Notes

  • CI Scripts: The rev-version.* scripts are designed for CI/CD pipelines and will:

    • Increment the minor version number
    • Update pom.xml
    • Create a git tag
    • Push changes to the remote repository
  • Permissions: PowerShell scripts may require execution policy changes:

    Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
  • Cross-Platform: All scripts use Maven commands that work identically across platforms. The scripts simply provide convenient wrappers with error handling and user-friendly output.

Direct Maven Commands

You can always use Maven directly instead of these scripts:

mvn clean                 # Clean
mvn compile              # Compile
mvn test                 # Test
mvn package              # Package JAR
mvn install              # Install to local repo
mvn clean install        # Full build and install