Skip to content

🎵 Plays some background music while Maven is building

License

Notifications You must be signed in to change notification settings

xdev-software/music-maven-plugin

Repository files navigation

Latest version Build Quality Gate Status

music-maven-plugin

🎵 Plays some background music while Maven is building.

Usage

Basic

The following configuration will play some "elevator" music in the background as soon as Maven starts building:

<plugin>
    <groupId>software.xdev</groupId>
    <artifactId>music-maven-plugin</artifactId>
    <version>...</version>
    <!-- You might also want to add <inherited>false</inherited> so not every child executes this -->
    <executions>
        <execution>
            <phase>validate</phase>
            <goals>
                <goal>music</goal>
            </goals>
        </execution>
    </executions>
</plugin>

Customizing the music

You can customize the music by adding other sources:

<configuration>
    <sources>
        <musicSource>
            <uri>https://incompetech.com/music/royalty-free/mp3-royaltyfree/Corncob.mp3</uri>
        </musicSource>
        <musicSource>
            <!-- Relative to project directory -->
            <file>my_cool_music.mp3</file>
        </musicSource>
        <musicSource>
            <classpath>/default/Andrew_Codeman_-_03_-_Mussels_short_version.ogg</classpath>
        </musicSource>
    </sources>
    <shuffle>true</shuffle>
</configuration>

Supported codecs

Codec Container
MP3 .mp3
Vorbis .ogg

Note

Container files can also include different codecs. For example .ogg can also contain Opus, Speex, FLAC, ... which are not supported.

Tip

If you want to convert to supported formats you can do so with ffmpeg:
ffmpeg -i music.opus music.ogg

Installation

Installation guide for the latest release

Run the demo

Warning

Might be loud!

  • Checkout the repo
  • Run mvn install

Why?

This is obviously a joke/fun plugin.
You probably shouldn't use it in production or maybe only on April 1st to annoy your colleagues :P

We got the idea during XDEV's christmas party as rfichtner always needs more plugins for funnier Maven presentations and was inspired by this GraalVM issue from joshlong.

Support

If you need support as soon as possible and you can't wait for any pull request, feel free to use our support.

Contributing

See the contributing guide for detailed instructions on how to get started with our project.

Dependencies and Licenses

View the license of the current project or the summary including all dependencies

The license and download information for the built-in music can be found in sources.txt.