scala-maven-plugin

repository·master·Indexed 20 days ago

https://github.com/davidb/scala-maven-plugin

A Maven plugin used to integrate Scala development into the Maven build lifecycle, providing capabilities for compiling, testing, running, and documenting Scala code.

Tokens
835
Snippets
2
Records
4
Agent score
19%

What's inside scala-maven-plugin

  1. Overview of Scala Maven Plugin

    master

    The scala-maven-plugin (formerly maven-scala-plugin) is a Maven plugin designed to handle Scala code within a Maven project. It provides capabilities for:

    • Compiling Scala source code.
    • Testing Scala code.
    • Running Scala applications.
    • Documenting Scala code.
  2. Release the Scala Maven Plugin

    master

    The following procedures are used for publishing the plugin.

    GPG Signing (macOS Fix)

    To avoid GPG signing issues on macOS (gpg: signing failed: Inappropriate ioctl for device), use this command to sign the pom.xml using a temporary file:

    gpg --use-agent --armor --detach-sign --output $(mktemp) pom.xml

    Automated Release

    To publish to the staging repository using the Maven release plugin:

    ./mvnw release:clean && ./mvnw release:prepare && ./mvnw release:perform

    To perform a release while skipping tests (recommended for faster CI cycles as integration tests can take ~30 minutes):

    ./mvnw release:clean && ./mvnw release:prepare -Darguments="-DskipTests -Dmaven.test.skip=true" && ./mvnw release:perform -Darguments="-DskipTests -Dmaven.test.skip=true"

    Manual Release

    For a manual release process:

    ./mvnw site package source:jar javadoc:jar install:install gpg:sign deploy:deploy changes:announcement-generate -Dmaven.test.skip=true -DperformRelease=true

    Post-Release Steps

    1. Connect to Sonatype OSS.
    2. Close and release the request for scala-maven-plugin in the staging repositories.
    3. Verify the release by browsing the updated mvnsite.
    # Automated release
    ./mvnw release:clean && ./mvnw release:prepare && ./mvnw release:perform
    
    # Release without tests
    ./mvnw release:clean && ./mvnw release:prepare -Darguments="-DskipTests -Dmaven.test.skip=true" && ./mvnw release:perform -Darguments="-DskipTests -Dmaven.test.skip=true"
  3. Standard Maven Commands for the Plugin

    master

    Use the following commands to interact with the plugin development lifecycle:

    CommandDescription
    ./mvnw packageGenerates the plugin JAR
    ./mvnw siteGenerates the plugin website
    ./mvnw integration-testRuns ./mvnw package followed by all integration tests
    ./mvnw integration-test -Dinvoker.test=test1Runs a specific integration test (test1) against all configurations; useful for debugging
    ./mvnw installRuns ./mvnw integration-test and then publishes to your local Maven repository
    ./mvnw install -Dmaven.test.skip=trueRuns ./mvnw install but skips unit and integration tests

    Note on test_scalaHome: To run this specific integration test, you must set the scala.home property in src/it/test_scalaHome/pom.xml to match your local environment.

    ./mvnw package
    ./mvnw site
    ./mvnw integration-test
    ./mvnw integration-test -Dinvoker.test=test1
    ./mvnw install
    ./mvnw install -Dmaven.test.skip=true