一.将依赖第三方jar包发布到本地私服
1.打包到maven仓库
#!/bin/sh
mvn install:install-file -Dfile=isnowfox-cms-2.0.0-SNAPSHOT.jar -DgroupId=com.isnowfox.web -DartifactId=isnowfox-cms -Dversion=2.0.0-SNAPSHOT -Dpackaging=jar
mvn install:install-file -Dfile=isnowfox-core-2.0.0-SNAPSHOT.jar -DgroupId=com.isnowfox.web -DartifactId=isnowfox-core -Dversion=2.0.0-SNAPSHOT -Dpackaging=jar
mvn install:install-file -Dfile=isnowfox-dbtool-2.0.0-SNAPSHOT.jar -DgroupId=com.isnowfox.web -DartifactId=isnowfox-dbtool -Dversion=2.0.0-SNAPSHOT -Dpackaging=jar
mvn install:install-file -Dfile=isnowfox-game-2.0.0-SNAPSHOT.jar -DgroupId=com.isnowfox.web -DartifactId=isnowfox-game -Dversion=2.0.0-SNAPSHOT -Dpackaging=jar
mvn install:install-file -Dfile=isnowfox-serialize-2.0.0-SNAPSHOT.jar -DgroupId=com.isnowfox.web -DartifactId=isnowfox-serialize -Dversion=2.0.0-SNAPSHOT -Dpackaging=jar
mvn install:install-file -Dfile=isnowfox-web-2.0.0-SNAPSHOT.jar -DgroupId=com.isnowfox.web -DartifactId=isnowfox-web -Dversion=2.0.0-SNAPSHOT -Dpackaging=jar
mvn install:install-file -Dfile=forkjoin-apikit-2.0.0-SNAPSHOT.jar -DgroupId=org.forkjoin -DartifactId=forkjoin-apikit -Dversion=2.0.0-SNAPSHOT -Dpackaging=jar
mvn install:install-file -Dfile=forkjoin-apikit-core-2.0.0-SNAPSHOT.jar -DgroupId=org.forkjoin -DartifactId=forkjoin-apikit-core -Dversion=2.0.0-SNAPSHOT -Dpackaging=jar
mvn install:install-file -Dfile=forkjoin-apikit-springmvc-2.0.0-SNAPSHOT.jar -DgroupId=org.forkjoin -DartifactId=forkjoin-apikit-springmvc -Dversion=2.0.0-SNAPSHOT -Dpackaging=jar
mvn install:install-file -Dfile=forkjoin-core-2.0.0-SNAPSHOT.jar -DgroupId=org.forkjoin -DartifactId=forkjoin-core -Dversion=2.0.0-SNAPSHOT -Dpackaging=jar
mvn install:install-file -Dfile=forkjoin-jdbckit-2.0.0-SNAPSHOT.jar -DgroupId=org.forkjoin -DartifactId=forkjoin-jdbckit -Dversion=2.0.0-SNAPSHOT -Dpackaging=jar
2.发布到本地私服
#!/bin/sh
mvn deploy:deploy-file -Dfile=isnowfox-cms-2.0.0-SNAPSHOT.jar -DgroupId=com.isnowfox.web -DartifactId=isnowfox-cms -Dversion=2.0.0-SNAPSHOT -Dpackaging=jar -Durl=http://localhost:8081/nexus/content/repositories/snapshots/ -DrepositoryId=nexus-shapshot
mvn deploy:deploy-file -Dfile=isnowfox-core-2.0.0-SNAPSHOT.jar -DgroupId=com.isnowfox.web -DartifactId=isnowfox-core -Dversion=2.0.0-SNAPSHOT -Dpackaging=jar -Durl=http://localhost:8081/nexus/content/repositories/snapshots/ -DrepositoryId=nexus-shapshot
mvn deploy:deploy-file -Dfile=isnowfox-dbtool-2.0.0-SNAPSHOT.jar -DgroupId=com.isnowfox.web -DartifactId=isnowfox-dbtool -Dversion=2.0.0-SNAPSHOT -Dpackaging=jar -Durl=http://localhost:8081/nexus/content/repositories/snapshots/ -DrepositoryId=nexus-shapshot
mvn deploy:deploy-file -Dfile=isnowfox-game-2.0.0-SNAPSHOT.jar -DgroupId=com.isnowfox.web -DartifactId=isnowfox-game -Dversion=2.0.0-SNAPSHOT -Dpackaging=jar -Durl=http://localhost:8081/nexus/content/repositories/snapshots/ -DrepositoryId=nexus-shapshot
mvn deploy:deploy-file -Dfile=isnowfox-serialize-2.0.0-SNAPSHOT.jar -DgroupId=com.isnowfox.web -DartifactId=isnowfox-serialize -Dversion=2.0.0-SNAPSHOT -Dpackaging=jar -Durl=http://localhost:8081/nexus/content/repositories/snapshots/ -DrepositoryId=nexus-shapshot
mvn deploy:deploy-file -Dfile=isnowfox-web-2.0.0-SNAPSHOT.jar -DgroupId=com.isnowfox.web -DartifactId=isnowfox-web -Dversion=2.0.0-SNAPSHOT -Dpackaging=jar -Durl=http://localhost:8081/nexus/content/repositories/snapshots/ -DrepositoryId=nexus-shapshot
mvn deploy:deploy-file -Dfile=forkjoin-apikit-2.0.0-SNAPSHOT.jar -DgroupId=org.forkjoin -DartifactId=forkjoin-apikit -Dversion=2.0.0-SNAPSHOT -Dpackaging=jar -Durl=http://localhost:8081/nexus/content/repositories/snapshots/ -DrepositoryId=nexus-shapshot
mvn deploy:deploy-file -Dfile=forkjoin-apikit-core-2.0.0-SNAPSHOT.jar -DgroupId=org.forkjoin -DartifactId=forkjoin-apikit-core -Dversion=2.0.0-SNAPSHOT -Dpackaging=jar -Durl=http://localhost:8081/nexus/content/repositories/snapshots/ -DrepositoryId=nexus-shapshot
mvn deploy:deploy-file -Dfile=forkjoin-apikit-springmvc-2.0.0-SNAPSHOT.jar -DgroupId=org.forkjoin -DartifactId=forkjoin-apikit-springmvc -Dversion=2.0.0-SNAPSHOT -Dpackaging=jar -Durl=http://localhost:8081/nexus/content/repositories/snapshots/ -DrepositoryId=nexus-shapshot
mvn deploy:deploy-file -Dfile=forkjoin-core-2.0.0-SNAPSHOT.jar -DgroupId=org.forkjoin -DartifactId=forkjoin-core -Dversion=2.0.0-SNAPSHOT -Dpackaging=jar -Durl=http://localhost:8081/nexus/content/repositories/snapshots/ -DrepositoryId=nexus-shapshot
mvn deploy:deploy-file -Dfile=forkjoin-jdbckit-2.0.0-SNAPSHOT.jar -DgroupId=org.forkjoin -DartifactId=forkjoin-jdbckit -Dversion=2.0.0-SNAPSHOT -Dpackaging=jar -Durl=http://localhost:8081/nexus/content/repositories/snapshots/ -DrepositoryId=nexus-shapshot
二、本地私服的配置
1.以管理员的身份运行nexus
2.先config设置Download Remote Indexes为true,然后右键click,repaiy index
3.maven的setting.xml配置nexus
三.更新项目的jar包
mvn clean install -U
四.docker部署
编写dockerfile文件
编译dockerfile,docker build -t name_image .
启动 docker run -t name_image /bin/sh
后面必须要加上这个,网上搜的答案是docker里面没有这个命令,需要加上
docker images 显示所有的镜像文件
docker rmi imageId 删除镜像文件
docker ps -a 查询容器
docker rm containerId 删除容器