Skinny war creation for springboot2 REST application

129 Views Asked by At

I have create skinny war for Springboot2 application. When we are deploying to other environments Is there any other better way to move those runtime jars rather than copying jars to server lib folder

1

There are 1 best solutions below

0
On

You can use the Maven Wagon Plugin.

The Maven Wagon Plugin it allows you to upload resources from your build to a remote location using wagon.

Example of upload of your resorces.

<project>
  [...]
  <build>
    [...]
    <extensions>
      <extension>
        <groupId>org.apache.maven.wagon</groupId>
        <artifactId>wagon-ssh</artifactId>
        <version>3.0.0</version>
      </extension>
    </extensions>

    <plugins>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>wagon-maven-plugin</artifactId>
        <version>2.0.0</version>
        <executions>
          <execution>
            <id>upload-javadoc</id>
            <phase>deploy</phase>
            <goals>
              <goal>upload</goal>
            </goals>
            <configuration>
              <fromDir>local.dir</fromDir>
              <includes>*</includes>
              <excludes>pom.xml</excludes>
              <url>scp://your.remote.host/</url>
              <toDir>remote.dir</toDir>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
  [...]
</project>

For more information , you can find in the link below:

https://www.mojohaus.org/wagon-maven-plugin/usage.html