Nexus group by SNAPSHOT

时间:2016-07-16 12:34:44

标签: maven nexus

我有Nexus的版本存储库。如何在名为snapshot-x.x的文件夹中对我的版本进行分组?

存储库具有snapshot类型。用户部署具有所有权限。 我将maven作为mvn versions:set -DnewVersion=$VERSIONmvn clean deploy -B -Pbuild -Dbuild.version=$VERSION

运行

我的settings.xml只能释放repo; - (

    <settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
                              http://maven.apache.org/xsd/settings-1.0.0.xsd">

  <servers>
    <server>
    </server>
  </servers>

  <profiles>
    <profile>
      <id>build</id>
      <repositories>
        <repository>
          <id>nexus-repo</id>
          <name>Nexus repo</name>
          <url>http://<MY-HOST>:8081:8081/nexus/content/groups/public</url>
          <releases>
            <enabled>true</enabled>
          </releases>
          <snapshots>
            <enabled>true</enabled>
          </snapshots>
        </repository>
      </repositories>
    <pluginRepositories>
      <pluginRepository>
        <id>nexus-repo</id>
        <name>Nexus repo </name>
        <url>http://<MY-HOST>:8081/nexus/content/groups/public</url>
        <releases>
          <enabled>true</enabled>
        </releases>
        <snapshots>
          <enabled>true</enabled>
        </snapshots>
      </pluginRepository>
    </pluginRepositories>
      <properties>
        <altDeploymentRepository>
          -DaltDeploymentRepository=builds::default::http://deployment:<MY_PASS>@<MY-HOST>:8081/content/repositories/builds
        </altDeploymentRepository>
      </properties>
    </profile>

  </profiles>

</settings>

<activeProfiles>
  <activeProfile>build</activeProfile>
</activeProfiles>

1 个答案:

答案 0 :(得分:0)

我不确定你要求的是什么?存储库具有固定格式,包含groupId:artifactId:version?

enter image description here

在那里你看到com / soebes / examples / j2ee是groupId:com.soebes.examples.j2eee而不是artifactId:app加上版本1.1.2-SNAPSHOT以及单个SNAPSHOT的基础版本