https://github.com/xdev-software/music-maven-plugin
🎵 Plays some background music while Maven is building
https://github.com/xdev-software/music-maven-plugin
fun maven-plugin music
Last synced: 4 months ago
JSON representation
🎵 Plays some background music while Maven is building
- Host: GitHub
- URL: https://github.com/xdev-software/music-maven-plugin
- Owner: xdev-software
- License: apache-2.0
- Created: 2024-12-16T07:58:01.000Z (about 1 year ago)
- Default Branch: develop
- Last Pushed: 2025-09-01T04:19:33.000Z (4 months ago)
- Last Synced: 2025-09-04T13:55:04.512Z (4 months ago)
- Topics: fun, maven-plugin, music
- Language: Java
- Homepage: https://xdev.software/en/news/detail/slow-maven-build-we-got-a-solution-for-that
- Size: 4.34 MB
- Stars: 60
- Watchers: 1
- Forks: 6
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Security: SECURITY.md
Awesome Lists containing this project
README
[](https://mvnrepository.com/artifact/software.xdev/music-maven-plugin)
[](https://github.com/xdev-software/music-maven-plugin/actions/workflows/check-build.yml?query=branch%3Adevelop)
# 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:
```xml
software.xdev
music-maven-plugin
...
validate
music
```
> [!TIP]
> To avoiding being self-trolled/not accidentally blasting music in the office space while waiting for the trollees to be trolled, you can set ``-Dmusic.skip`` or a global environment variable ``MAVEN_OPTS="-Dmusic.skip=true"``
### Customizing the music
You can customize the music by adding other sources:
```xml
https://incompetech.com/music/royalty-free/mp3-royaltyfree/Corncob.mp3
my_cool_music.mp3
/default/Andrew_Codeman_-_03_-_Mussels_short_version.ogg
true
```
#### Supported codecs
| Codec | Container |
| --- | --- |
| [MP3](https://en.wikipedia.org/wiki/MP3) | ``.mp3`` |
| [Vorbis](https://en.wikipedia.org/wiki/Vorbis) | [``.ogg``](https://en.wikipedia.org/wiki/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``](https://www.ffmpeg.org/):
> ``ffmpeg -i music.opus music.ogg``
### Spotify
You can also play music from Spotify:
```xml
spotify:track:4cOdK2wGLETKBW3PvgPWqT
false
```
> [!NOTE]
> Requirements/Limitation:
> * The Spotify app needs to be installed.
> * Songs/Playlist can only be started asynchronously; it's not possible to detect when a song/playlist has ended
> * Therefore playing multiple songs/playlists in a loop is not working. You should set ``repeat`` to ``false``.
> * Playback might not always be started automatically by the Spotify app.
> * Playback is started using OS specific processes (e.g. ``cmd`` on Windows, ``osascript`` on macOS and ``dbus-send`` on Linux).
This might not work with certain system setups.
## Installation
[Installation guide for the latest release](https://github.com/xdev-software/music-maven-plugin/releases/latest#Installation)
## 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](https://github.com/rfichtner) always needs more plugins for funnier Maven presentations and was inspired by [this GraalVM issue from joshlong](https://github.com/oracle/graal/issues/5327).
## Support
If you need support as soon as possible and you can't wait for any pull request, feel free to use [our support](https://xdev.software/en/services/support).
## Contributing
See the [contributing guide](./CONTRIBUTING.md) for detailed instructions on how to get started with our project.
## Dependencies and Licenses
View the [license of the current project](LICENSE) or the [summary including all dependencies](https://xdev-software.github.io/music-maven-plugin/dependencies)
The license and download information for the [built-in music](./music-maven-plugin/src/main/resources/default/) can be found in [sources.txt](./music-maven-plugin/src/main/resources/default/sources.txt).