2023-08-08 16:47:21 +08:00
|
|
|
# gb28181-docking-platform
|
|
|
|
|
2023-08-27 21:26:31 +08:00
|
|
|
gb28181 协议 对接平台
|
|
|
|
gb28181-docking-platform
|
|
|
|
|
|
|
|
|
|
|
|
### 项目打包
|
|
|
|
#### 打包 为 jar
|
|
|
|
```shell
|
|
|
|
mvn clean package
|
|
|
|
```
|
|
|
|
打包后jar在 starter/target/starter.jar
|
|
|
|
|
|
|
|
#### 打包 为 docker 镜像
|
|
|
|
一键脚本(纯docker环境打包 + 编译)
|
|
|
|
```
|
|
|
|
chmod +x ./package-docker.sh
|
|
|
|
./package-docker.sh
|
|
|
|
```
|
|
|
|
打包后的 docker镜像文件位于 项目根目录 gb28181-docking-platform.image
|
|
|
|
|
|
|
|
##### 测试运行
|
|
|
|
```shell
|
|
|
|
docker run --name gb28181 --rm \
|
|
|
|
-v /mnt/sk-w/run/docker/maven/application.yml:/opt/gb28181-docking-platform/application.yml \
|
|
|
|
skcks.cn/gb28181-docking-platform:0.0.1-SNAPSHOT
|
|
|
|
```
|
2023-09-04 17:13:40 +08:00
|
|
|
|
2024-01-11 10:44:34 +08:00
|
|
|
### 清理私仓
|
|
|
|
切换到私仓目录
|
|
|
|
例: cd H:/Repository/skcks.cn/gb28181-docking-platform-mvn-repo
|
|
|
|
```shell
|
|
|
|
rm -rf ./*/*/*/*/0.1.0-SNAPSHOT
|
|
|
|
rm -rf ./*/*/*/*/*/0.1.0-SNAPSHOT
|
|
|
|
```
|
2023-09-04 17:13:40 +08:00
|
|
|
### 打包到本地私仓
|
|
|
|
```shell
|
2024-01-11 09:39:54 +08:00
|
|
|
mvn deploy -s settings.xml -DaltDeploymentRepository=local-repo::default::file:H:/Repository/skcks.cn/gb28181-docking-platform-mvn-repo
|
2023-09-04 17:13:40 +08:00
|
|
|
```
|
2024-03-26 21:44:35 +08:00
|
|
|
git push 推送即可
|
|
|
|
|
|
|
|
### 公共仓库
|
|
|
|
https://central.sonatype.com
|
|
|
|
|
|
|
|
https://central.sonatype.org/publish/requirements/gpg/#signing-a-file
|
|
|
|
|
|
|
|
gpg签名
|
|
|
|
https://central.sonatype.org/publish/requirements/gpg/
|
|
|
|
https://www.gpg4win.org/thanks-for-download.html
|
|
|
|
|
|
|
|
gpg服务器
|
|
|
|
- keyserver.ubuntu.com
|
|
|
|
- keys.openpgp.org
|
|
|
|
- pgp.mit.edu
|
|
|
|
|
|
|
|
settings.xml
|
|
|
|
```xml
|
|
|
|
<settings>
|
|
|
|
<servers>
|
|
|
|
<server>
|
|
|
|
<id>ossrh</id>
|
|
|
|
<username><!-- your token username --></username>
|
|
|
|
<password><!-- your token password --></password>
|
|
|
|
</server>
|
|
|
|
</servers>
|
|
|
|
|
|
|
|
<profiles>
|
|
|
|
<profile>
|
|
|
|
<id>ossrh</id>
|
|
|
|
<activation>
|
|
|
|
<activeByDefault>true</activeByDefault>
|
|
|
|
</activation>
|
|
|
|
<properties>
|
|
|
|
<gpg.executable>gpg</gpg.executable>
|
|
|
|
<gpg.keyname>GPG KEY NAME</gpg.keyname>
|
|
|
|
<gpg.passphrase>GPG KEY PASSWORD</gpg.passphrase>
|
|
|
|
</properties>
|
|
|
|
</profile>
|
|
|
|
</profiles>
|
|
|
|
</settings>
|
|
|
|
```
|
|
|
|
|
|
|
|
#### 解决idea 控制台乱码
|
|
|
|
|
|
|
|
- 设置 > 构建/运行/部署 > 构建工具 > Maven > 运行程序 > VM options
|
|
|
|
- 添加 -Dfile.encoding=GBK
|