Java 在maven生成期间执行shellscript时出错
我试图在maven构建期间在远程linux服务器中执行shell脚本 以下是我在pom.xml中用于此目的的代码Java 在maven生成期间执行shellscript时出错,java,shell,maven,ant,maven-plugin,Java,Shell,Maven,Ant,Maven Plugin,我试图在maven构建期间在远程linux服务器中执行shell脚本 以下是我在pom.xml中用于此目的的代码 <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-antrun-plugin</artifactId> <executions> <execution>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>server-copy</id>
<goals>
<goal>run</goal>
</goals>
<phase>process-sources</phase>
<configuration>
<tasks>
<sshexec host="hostserver" username="user" trust="true"
password="password" failonerror="true" timeout="1200"
command="sh /pathofshellscript/test.sh"/>
</tasks>
</configuration>
</execution>
<executions>
当我执行maven构建时,它会在控制台中请求Kerberos用户名和密码。我不知道为什么它要求用户名和密码,因为我已经在pom.xml中提供了。有什么我遗漏的吗?使用-X开关重新运行Maven,以启用完整调试日志。希望各个用户都有删除shell脚本的可执行权限。
[INFO] Building test1 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-antrun-plugin:1.3:run (server-copy) @ test1 ---
[INFO] Executing tasks
[sshexec] Connecting to hostserver:22
**Kerberos username [user109]:** user
**Kerberos password for user109:** password
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 02:02 min
[INFO] Finished at: 2017-06-19T14:06:27+05:30
[INFO] Final Memory: 9M/156M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.3:run (server-copy) on project test1: An Ant BuildException has occured: com.jcraft.jsch.JSchException: Auth fail -> [Help 1]