利用maven命令 打包

打包某一个服务
[maven]常用命令_maven
打包的是local里面的配置文件,即:
[maven]常用命令_Java_02
Windows 命令:
[maven]常用命令_java_03

e:
cd E:\Computer\JavaItoo\ITOO-Dubbo\achievement-parent
mvn clean install -Dmaven.test.skip=true 

打包dev里面的配置文件内容,即:
[maven]常用命令_Java_04
Windows 命令
[maven]常用命令_maven_05

e:
cd E:\Computer\JavaItoo\ITOO-Dubbo\achievement-parent
mvn clean install -Dmaven.test.skip=true -P dev

强制获取私服上更新的内容
Mvn package –U
一次性打包所有itoo服务
添加一个pom文件
pom内容
[maven]常用命令_Java_06

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http:///POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http:///POM/4.0.0 http:///xsd/maven-4.0.0.xsd">

    <parent>
        <groupId>com.dmsdbj.itoo</groupId>
        <artifactId>itoo-root</artifactId>
        <version>1.0.0-SNAPSHOT</version>
    </parent>

    <groupId>com.dmsdbj.itoo</groupId>
    <artifactId>itoo-parent</artifactId>
    <version>1.0.0-SNAPSHOT</version>
    <packaging>pom</packaging>
    <modelVersion>4.0.0</modelVersion>


    <modules>
        <module>achievement-parent</module>
        <module>authorityManagement-parent</module>
        <module>basicInfo-parent</module>
        <module>examinationEvaluation-parent</module>
        <module>itooCloud-parent</module>
        <module>shiro-jwt-authority</module>
        <module>singleTableMaintain-parent</module>
        <module>teachingManagement-parent</module>
    </modules>


</project>

打包命令

mvn clean install -Dmaven.test.skip=true -fail-never

这个命令用来检查代码编译是否报错,-fail-never出错了也可以继续执行后面的编译.
[maven]常用命令_java_07

创建maven的普通java项目
mvn archetype:create
-DgroupId=packageName
-DartifactId=projectName

创建maven的web项目
mvn archetype:create
-DgroupId=packageName
-DartifactId=webappName
-DarchetypeArtifactId=maven-archetype-webapp

发布第三方jar到私服上
mvn deploy:deploy-file -DgroupId=org.csource -DartifactId=fastdfs-client-java -Dversion=1.27 -Dpackaging=jar -Dfile=E:\fastdfs-client-java-1.27.jar -Durl=http://ip:8081/nexus/content/repositories/thirdparty/ -DrepositoryId=thirdparty

发布第三方jar到本地库
mvn install:install-file -DgroupId=org.csource -DartifactId=fastdfs-client-java -Dversion=1.27 -Dpackaging=jar -Dfile=E:\fastdfs-client-java-1.27.jar -Durl=http://ip:8081/nexus/content/repositories/thirdparty/ -DrepositoryId=thirdparty