我正在使用Wagon-FTP通过FTP部署Maven网站。工作正常,但输出充满了FTP连接/身份验证详细信息,有效地向所有人公开登录名和密码(特别是如果项目是开源的,其CI协议可公开访问):
[...]
[INFO]
[INFO] --- maven-site-plugin:3.0-beta-3:deploy (default-deploy) @ rempl ---
Reply received: 220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------
220-You are user number 1 of 50 allowed.
220-Local time is now 09:08. Server port: 21.
220 You will be disconnected after 15 minutes of inactivity.
Command sent: USER ****
Reply received: 331 User **** OK. Password required
Command sent: PASS ********
Reply received: 230-User **** has group access to: ***
230 OK. Current restricted directory is /
[...]
是否可以禁止此日志记录?或者配置它......这是我的pom.xml
的一部分,其中使用了Wagon-FTP:
[...]
<build>
<extensions>
<extension>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-ftp</artifactId>
<version>1.0-beta-7</version>
</extension>
</extensions>
[...]
</build>
[...]
答案 0 :(得分:2)
不可能,而且基本上它与maven网站插件有关,而不是与旅行车ftp(这只是apache-commons-net ftp客户端的简单适配器)有关。请参阅第310行的source of AbstractDeployPlugin。
Debug debug = new Debug();
wagon.addSessionListener( debug );
wagon.addTransferListener( debug );
Debug正在使用标准输出。
恕我直言,如果Wagon源中不需要,可以使用更复杂的SessionListener或标志来避免addSessionListener(debug)。