12

I want to add SplashScreen-Image: <image name> to the manifest file.

How do I do this with Spring Boot's Maven Plugin? If this is not possible, how do I create a single executable jar using maven with additional properties?

M.P. Korstanje
  • 8,279
  • 3
  • 33
  • 49

1 Answers1

28

The answer was kinda obvious in hindsight. Spring-Boot's maven plugin rewrites the original manifest file so using the maven jar plugin the manifest can be written as normal. Like this:

<build>
    <plugins>
        <plugin>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
        </plugin>

        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-jar-plugin</artifactId>
            <configuration>
                <archive>
                    <manifestEntries>
                        <splashscreen-image>${image.name}</splashscreen-image>
                    </manifestEntries>
                </archive>
            </configuration>
        </plugin>

    </plugins>
</build>
M.P. Korstanje
  • 8,279
  • 3
  • 33
  • 49