• maven打包上传到本地中央库


    pom文件中添加插件如下

    <build>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <configuration>
                        <source>${java.version}</source>
                        <target>${java.version}</target>
                        <testSource>${java.version}</testSource>
                        <testTarget>${java.version}</testTarget>
                    </configuration>
                </plugin>
                <!--配置生成源码包-->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>3.0.1</version>
                    <executions>
                        <execution>
                            <id>attach-sources</id>
                            <goals>
                                <goal>jar</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
        </build>
    
        <distributionManagement>
            <repository>
                <id>releases</id>
                <name>Nexus Release Repository</name>
                <url>http://xxxx:8081/repository/cetccd_hosted/</url>
            </repository>
            <snapshotRepository>
                <id>snapshots</id>
                <name>Nexus Snapshot Repository</name>
                <url>http://xxxx:8081/repository/cetccd_snapshots/</url>
            </snapshotRepository>
            </distributionManagement>
        

    settings.xml文件添加如下内容

    <server>
            <id>snapshots</id>
            <username>admin</username>
            <password>xxxx</password>
        </server>
        <server>   
            <id>releases</id>   
            <username>admin</username>   
            <password>xxxx</password>   
        </server> 

    clean deploy -Dmaven.test.skip=true

  • 相关阅读:
    【转】千万别理程序员
    qemu-ifup and qemu-ifdown
    Fedora-23 installation in VM image
    Set up bridge to connect to internet
    fedora25 上设置br0
    助教工作总结
    树1
    线性结构
    链表基本操作
    自定义函数
  • 原文地址:https://www.cnblogs.com/yuluoxingkong/p/9835709.html
Copyright © 2020-2023  润新知