• MAVEN自动发布更新本地和远程仓库


    1.本地仓库的更新

    mvn  clean -Dmaven.test.skip=true install 

    2.远程仓库的更新

    mvn clean -Dmaven.test.skip=true deploy

    3.打包到项目下

    mvn  clean package

    4.跳过测试

    -Dmaven.test.skip=true

    mvn  clean package install

     

     

    2.1工程文件pom.xml的设置

     <build>
            <pluginManagement>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven .plugins</groupId>
                        <artifactId>maven -compiler-plugin</artifactId>
                        <configuration>
                            <source>1.5</source>
                            <target>1.5</target>
                        </configuration>
                    </plugin>
                </plugins>
            </pluginManagement>
            <extensions>
                <extension>
                    <groupId>org.apache.maven .wagon</groupId>
                    <artifactId>wagon-ftp</artifactId>
                    <version>1.0-alpha-6</version>
                </extension>
            </extensions> 
        </build>

        <repositories>
            <repository>
                <id>cdc-respository</id>
                <name>cdc-respository</name>
                <url>http://xxx.xxx.xxx.xx:8080/Maven 2Repository</url>
            </repository>
        </repositories>
        <pluginRepositories>
            <pluginRepository>
                <id>cdc-plugin-respository</id>
                <name>cdc-plugin-respository</name>
                <url>http://xxx.xxx.xxx.xxx:8080/Maven 2Repository</url>
            </pluginRepository>
        </pluginRepositories>

        <distributionManagement>
            <repository>
                <id>my-deploy-respository</id>
                <name>cdc-plugin-respository</name>
                <url>ftp://192.168.2.177/home/mfguser/Maven 2Repository</url>
            </repository>
        </distributionManagement>

    2.2本地用户setting.xml文件的设定  settings.xml

         <server>
          <id>my-deploy-respository</id>
          <username>user</username>
          <password>password</password>
        </server>

  • 相关阅读:
    在Raspberry pi4上架设Minecraft1.17
    解决Android-x86在VMware中不能启动GUI的问题
    WMware player 16在超过两台显示器时的多显示器问题
    制动电阻的阻值和功率计算
    拉卡尼休在石块旷野
    在VirtualBox中调整Raspbian分辨率
    如何在VLC播放器中显示毫秒
    EXCEL高亮选中行/列
    Notepad++加强安全性检查,避免被CIA利用
    AutoCAD AutoLisp 脚本编写
  • 原文地址:https://www.cnblogs.com/xiaoqiang-waer/p/8512648.html
Copyright © 2020-2023  润新知