这是我试图解决的问题:从GitHub使用詹金斯发布的tar.gz的Nexus
- 结账代码到本地目录d
- 运行configure命令里面的目录d
- 创建为tar.gz的目录
- 上传taz.gz文件的Nexus
我停留在步骤3: - 我可以指定在v在Maven pom.xml文件中使用ersion,但是有没有办法在每次运行Jenkins时自动创建构建版本? - 如果我在pom.xml文件中指定了tar.gz,我会得到:未知的包装:gz @ line 6,column 13
如果我在包装内指定jar,没有错误,并且文件上传到Nexus成功。
任何意见将有所帮助,谢谢!
==
后续建议,我使用Assembly插件,但仍然有问题的目录RE
这里创建的tar.gz是我的pom.xml:
<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.o$
<modelVersion>4.0.0</modelVersion>
<groupId>Auc</groupId>
<artifactId>RE</artifactId>
<version>1.0.0.112</version>
<!-- <packaging>tgz</packaging> -->
<name>RE Repository</name>
<url>http://nexus1.ccorp.com/nexus</url>
<build>
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.6</version>
<executions>
<execution>
<configuration>
<descriptors>
<descriptor>format.xml</descriptor>
</descriptors>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
这是我的format.xml文件,RE目录是我检出代码并想为其创建tar.gz的地方
<assembly
xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
<id>bundle</id>
<formats>
<format>tar.gz</format>
</formats>
<moduleSets>
<moduleSet>
<sources>
<fileSets>
<fileSet>
<directory>/var/lib/jenkins/jobs/nightly_build/workspace/RE</directory>
</fileSet>
</fileSets>
</sources>
</moduleSet>
</moduleSets>
<includeBaseDirectory>false</includeBaseDirectory>
使用Maven组装 –
可能的复制[可以连结或Artifactory存储简单的tar.gz文物?](https://stackoverflow.com/questions/13054950/can-nexus-or-artifactory-store-simple-tar-gz-artifacts) – rogerdpack