【maven】Deployment failed: repository element was not specified in the POM inside distributionManagem

需要把本地代码进行使用maven的上传命令时遇到的报错
原因:是deploy插件的版本是2.7,需要在项目的pom.xml文件中配置上传的仓库信息,升级到2.8后会使用setting.xml中的配置。
【maven】Deployment failed: repository element was not specified in the POM inside distributionManagem_第1张图片

    <build>
        
        <plugins>
            <plugin>
                <groupId>org.apache.maven.pluginsgroupId>
                <artifactId>maven-deploy-pluginartifactId>
                <version>2.8.2version>
            plugin>
        plugins>
    build>

    
    <distributionManagement>
        <repository>
            <id>centralid>
            <name>artifactory-releasesname>
            <url>https://you-url-release-maven-localurl>
        repository>
        <snapshotRepository>
            <id>snapshotsid>
            <name>artifactory-snapshotsname>
            <url>>https://you-url-snapshot-maven-localurl>
        snapshotRepository>
    distributionManagement>

你可能感兴趣的:(通用表单,java,maven)