私服错误解决(仓库的版本号不一致)

2019-02-13  本文已影响0人  f22448cd5541

私服错误解决(仓库的版本号不一致)

错误信息:

Deployment failed: repository element was not specified in the POM inside distributionManagement element or in -DaltDeploymentRepository=id::layout::url parameter 

配置上传信息:

<distributionManagement>
    <snapshotRepository>
        <id>snapshots</id>
        <url>http://117.48.194.66:8081/nexus/content/repositories/snapshots</url>
    </snapshotRepository>
</distributionManagement>

再来看看模块的版本号:

<oss.module.version>1.0</oss.module.version>

在上传的过程中一直报上面的错。这是因为我们的版本使用的是正式仓库的版本号,所以无论怎么上传都是要求你来配置地址(要求配置发行版本地址)。

改正:

<oss.module.version>1.0-SNAPSHOT</oss.module.version>

完整的上传私服的配置

<build>
    <plugins>

        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <configuration>
                <source>1.8</source>
                <target>1.8</target>
                <encoding>utf-8</encoding>
            </configuration>
        </plugin>

        <plugin>
            <artifactId>maven-source-plugin</artifactId>
            <version>2.1</version>
            <configuration>
                <attach>true</attach>
            </configuration>
            <executions>
                <execution>
                    <phase>compile</phase>
                    <goals>
                        <goal>jar</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>

    </plugins>
</build>

<distributionManagement>
    <snapshotRepository>
        <id>snapshots</id>
        <url>http://117.48.194.66:8081/nexus/content/repositories/snapshots</url>
    </snapshotRepository>
</distributionManagement>
上一篇 下一篇

猜你喜欢

热点阅读