logo
53
11
WeChat Login

Spring Boot + Maven + SSH

badge badge badge

In this example, we use Cloud Native Build to package a Spring Boot + Maven project and upload it to the server via SSH.

Prerequisites

  1. Use Cloud Native Build (CNB) to build your project
  2. Environment variables and their usage: Environment Variables
  3. Declarative build cache
  4. Plugins and their usage: Plugin Market
  5. Use Rsync plugin
  6. Use SSH plugin
  7. Configure .ide/Dockerfile for Cloud Native Development

Configuration Secrets

# springboot-maven-ssh-config.yml
REMOTE_HOST: xxx
REMOTE_USERNAME: xxx
REMOTE_PORT: xxx
PRIVATE_KEY: |
    -----BEGIN RSA PRIVATE KEY-----
    xxxxxxxx 
    -----END RSA PRIVATE KEY-----

Remote Development

mvn spring-boot:run

About

maven 构建项目并通过 ssh 上传到服务器

example
3.61 MiB
53 forks11 stars6 branches0 TagREADMEOther license
Language
Java61%
Dockerfile31.6%
HTML7.4%