Reputation: 42500
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
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,
In administration, go to repository settings and disable this option.
Upvotes: 1