部署到我的本地artifactory的部署JAR /关系与Maven工作正常进行样品春天启动的应用(上start.spring.io生成):无法从春天启动的应用程序的Nexus/Artifactory的
mvn clean package deploy
然而只要我添加一个依赖从org.springframweork.cloud到我的POM:
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-zipkin</artifactId>
</dependency>
则部署失败,并在客户端“连接复位”。 artifactory.log显示
2017-02-07 12:57:59,788 [http-nio-8081-exec-10] [INFO ] (o.a.e.UploadServiceImpl:516) - Deploy to 'snapshot-local:com/test/artifactory-demo/0.0.1-SNAPSHOT/artifactory-demo-0.0.1-20170207.125744-10.jar' Content-Length: 21658959
2017-02-07 12:58:03,256 [http-nio-8081-exec-10] [WARN ] (o.a.w.s.RepoFilter :222) - Sending HTTP error code 404: Failed to read stream: Unexpected EOF read on the socket
2017-02-07 12:58:59,540 [http-nio-8081-exec-2] [WARN ] (o.a.w.s.RepoFilter :222) - Sending HTTP error code 404: Failed to read stream: null
我注意到与Nexus类似的行为。如果我尝试使用Artifactory UI上传jar,我也会得到相同的错误。
jar xf demo.jar
,然后压缩它再次改变flague更改为“CF”,那么这个新包装的罐子可以成功上传到artifactory的的flague:不够的,如果我使用提取的jar文件滑稽。在构建步骤中,Maven似乎正在用jar做一些有趣的事情。难道索尼有任何想法我可能做错了什么?在部署之前不得不提取和重新包装jar非常不理想,特别是我想用Jenkins自动完成一些项目。
下面是整个没有工作的pom.xml:
<?xml version="1.0" encoding="UTF-8"?>
<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>artifactory-demo</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>artifactory-demo</name>
<description>Demo project for Spring Boot</description>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.1.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-zipkin</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jfrog.artifactory.client</groupId>
<artifactId>artifactory-java-client-services</artifactId>
<version>LATEST</version>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>Dalston.M1</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>spring-milestones</id>
<name>Spring Milestones</name>
<url>https://repo.spring.io/milestone</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<distributionManagement>
<snapshotRepository>
<id>snapshots</id>
<name>snapshots</name>
<url>http://artifactory.server.ip:8079/artifactory/snapshot-local</url>
</snapshotRepository>
</distributionManagement>
</project>
可能由全局JAR文件大小引起。您无法上传的JAR的大小(以MB为单位)? – Tome
这是31MB,但正如我所说:如果我解压缩jar并再次压缩它,大小保持不变,但上传成功完成。我也尝试将大型随机文本文件添加到jar并上传这些文件。这工作也很好,所以我不认为大小是问题。 – user3681304