2016-07-16 52 views
0

我有Nexus 构建存储库。如何将我的版本分组到名为snapshot-x.x的文件夹中?Nexus group by SNAPSHOT

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

我的settings.xml工作只释放回购;-(

<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> 
+0

我怀疑你可以更改存储库的内部格式。此外,按版本分组不同的罐子似乎很奇怪,因为版本应该是独立的(可以改变而其他人保持不变)。你能向我们解释你的想法吗(为什么你想重组仓库)? –

回答

0

我不知道你问什么?一个仓库有固定的格式,包括的groupId:artifactId的:版本

enter image description here

在那里,你看到的COM/soebes /例子/ J2EE是的groupId:com.soebes.examples.j2eee比的artifactId:app加版本1.1.2-SNAPSHOT与单个SNAPSHOT的底层版本

+0

现在我有以下层次结构:'com-> soebes-> examples - > [app,service,ui和其他] - > version'。 但我想:'com-> soebes-> examples-> SNAPSHOTSx.x - > [app,service,ui,other] - > versions'。 – kvendingoldo