gpt4 book ai didi

java - 无法使用 wagon maven FTPS 传输中型大文件

转载 作者:太空宇宙 更新时间:2023-11-04 09:13:32 25 4
gpt4 key购买 nike

我正在使用 wagon 插件通过 FTPS/990 将构建版本发送到远程服务器,所有文件均已成功发送除了 meduim 大文件(例如:75 MB),连接似乎已关闭,我收到以下错误:

    org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:wagon-maven-plugin:2.0.0:upload (default-cli) on project XXXX: Error handling resource
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoExecutionException: Error handling resource
at org.codehaus.mojo.wagon.AbstractSingleWagonMojo.execute(AbstractSingleWagonMojo.java:67)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
... 20 more
Caused by: org.apache.maven.wagon.TransferFailedException: PUT request to: XXXX.war in ftp.server.id failed
at org.apache.maven.wagon.AbstractWagon.putTransfer(AbstractWagon.java:448)
at org.apache.maven.wagon.AbstractWagon.transfer(AbstractWagon.java:416)
at org.apache.maven.wagon.AbstractWagon.putTransfer(AbstractWagon.java:390)
at org.apache.maven.wagon.StreamWagon.put(StreamWagon.java:163)
at org.codehaus.mojo.wagon.shared.DefaultWagonUpload.upload(DefaultWagonUpload.java:76)
at org.codehaus.mojo.wagon.shared.DefaultWagonUpload.upload(DefaultWagonUpload.java:87)
at org.codehaus.mojo.wagon.UploadMojo.execute(UploadMojo.java:112)
at org.codehaus.mojo.wagon.AbstractSingleWagonMojo.execute(AbstractSingleWagonMojo.java:63)
... 22 more
Caused by: java.net.SocketException: Connection reset by peer: socket write error
at java.net.SocketOutputStream.socketWrite0(Native Method)
at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:111)
at java.net.SocketOutputStream.write(SocketOutputStream.java:155)
at org.apache.commons.net.io.SocketOutputStream.write(SocketOutputStream.java:71)
at org.apache.maven.wagon.AbstractWagon.transfer(AbstractWagon.java:540)
at org.apache.maven.wagon.AbstractWagon.putTransfer(AbstractWagon.java:435)

编辑:

下面是pom.xml中使用的配置:

    <plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>wagon-maven-plugin</artifactId>
<version>2.0.0</version>
<configuration>
<serverId>ftp.server.id</serverId>
<url>ftps://IP_ADDRESS:990</url>
<fromDir>${project.build.directory}</fromDir>
<toDir>.</toDir>
</configuration>
<executions>
<execution>
<id>upload</id>
<phase>deploy</phase>
<goals>
<goal>upload</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
<extensions>
<extension>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-ftp</artifactId>
<version>3.0.0</version>
</extension>
</extensions>

以及settings.xml中serverId的配置:

   <server>
<id>ftp.server.id</id>
<username>username</username>
<password>password</password>
<configuration>
<endpointChecking>false</endpointChecking>
<securityProtocol>TLSv1.2</securityProtocol>
<implicit>true</implicit>
<passiveMode>true</passiveMode>
</configuration>
</server>

感谢您的帮助!

致以诚挚的问候

最佳答案

检查您的 FTP 服务器配置的 MAXSTOREFILESIZE 并针对大文件再次运行。作为引用,以下链接可能会有所帮助 http://proftpd.org/docs/directives/configuration_full.html#MAXSTOREFILESIZE

关于java - 无法使用 wagon maven FTPS 传输中型大文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59391258/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com