Maven развертывает снимкость вместо выпуска

Я пытаюсь выпустить проект, используя Maven, но вместо того, чтобы выпустить к репутатору, который он ставит Это в наших снимках репо.

Мой POM выглядит как:

<project xmlns="http://maven.apache.org/POM/4.0.0" 
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
                             http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.example.my.profiler</groupId>
<artifactId>profilerlib</artifactId>
<name>Profiler Lib</name>
<version>1.0.2-SNAPSHOT</version>
<description>Profiler Library</description>
<scm>
    <connection>scm:svn:https://svn.example.com/my-project/profilerlib/trunk
    </connection>
    <developerConnection>scm:svn:https://svn.example.com/my-project/profilerlib/trunk
    </developerConnection>
</scm>
<distributionManagement>
    <!-- Publish the versioned releases here -->
    <repository>
        <id>nexus</id>
        <name>nexus</name>
        <url>http://repo.example.com:8081/nexus/content/repositories/releases
        </url>
    </repository>
    <!-- Publish the versioned releases here -->
    <snapshotRepository>
        <id>nexus</id>
        <name>nexus</name>
        <url>http://repo.example.com:8081/nexus/content/repositories/snapshots
        </url>
    </snapshotRepository>
</distributionManagement>
<!-- download artifacts from this repo -->
<repositories>
    <repository>
        <id>nexus</id>
        <name>EXAMPLE Public Repository</name>
        <url>http://repo.example.com:8081/nexus/content/groups/public</url>
        <releases>
            <enabled>true</enabled>
        </releases>
        <snapshots>
            <enabled>true</enabled>
        </snapshots>
    </repository>
</repositories>
<dependencies>
    ...
</dependencies>
<build>
    <finalName>${project.artifactId}</finalName>
    <plugins>
        <plugin>
            <artifactId>maven-release-plugin</artifactId>
            <configuration>
                <tagBase>https://svn.example.com/my-project/profilerlib/tags
                </tagBase>
            </configuration>
        </plugin>
        <plugin>
            <artifactId>maven-compiler-plugin</artifactId>
            <configuration>
                <source>1.6</source>
                <target>1.6</target>
            </configuration>
        </plugin>
    </plugins>
</build>
<properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <powermock.version>1.4.6</powermock.version>
</properties>
</project>
21
задан Betlista 11 June 2013 в 16:12
поделиться

1 ответ

<repository>
    <id>nexus</id><!--etc-->
</repository>
<snapshotRepository>
    <id>nexus</id><!--etc-->
</snapshotRepository>
<!-- etc -->
<repositories>
    <repository>
        <id>nexus</id>
        <!-- etc -->
    </repository>
</repositories>

Это проблема, вы используете один и тот же идентификатор для трех разных репозиториев. Maven управляет этими хранилищами по идентификатору, поэтому каждый идентификатор должен быть уникальным! Например. используйте "nexus-release", "nexus-snapshots" и "nexus".

15
ответ дан 29 November 2019 в 06:50
поделиться
Другие вопросы по тегам:

Похожие вопросы: