Joey Yi Zhao
Joey Yi Zhao

Reputation: 42500

How to deploy a jar built by spring-boot through maven?

I use mvn deploy command to deploy my jar file to nexus server and it works fine for regular jar. But it doesn't work if the jar is packaged by spring-boot-plugin. The header of the jar file is a linux system service script which will be rejected by nexus.

Below is my spring-boot plugin settings:

<plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <version>2.0.2.RELEASE</version>
                <configuration>
                    <executable>true</executable>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>repackage</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

How can I make nexus accepts spring-boot executable jar file?

Upvotes: 4

Views: 729

Answers (1)

GauravJ
GauravJ

Reputation: 2262

Disable strict content type validation in your nexus server and you should be able to upload your jar. It can be found as below,

enter image description here

In administration, go to repository settings and disable this option.

Upvotes: 1

Related Questions