我的maven構建開始隨機失敗,並且出現以下我無法理解的錯誤,並且使用它搜索不到任何有用的東西:在maven/ant構建過程中出現錯誤:「[java]時間戳響應無效」
[echo] Creating a full package...
[java] Timestamp response not valid
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed to execute: Executing Ant script: /airtest.build.xml [package-admin-air]: Failed to execute.
Java returned: 10
[exec] [DEBUG] Trace
[exec] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute: Executing Ant script: /airtest.build.xml [package-admin-air]: Failed to execute.
[exec] at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:719)
[exec] at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
[exec] at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)
[exec] at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
[exec] at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
[exec] at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
[exec] at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
[exec] at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
[exec] at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
[exec] at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
[exec] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[exec] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[exec] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[exec] at java.lang.reflect.Method.invoke(Method.java:597)
[exec] at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
[exec] at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
[exec] at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
[exec] at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
[exec] Caused by: org.apache.maven.plugin.MojoExecutionException: Failed to execute: Executing Ant script: /airtest.build.xml [package-admin-air]: Failed to execute.
[exec] at org.apache.maven.script.ant.AntMojoWrapper.execute(AntMojoWrapper.java:56)
[exec] at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
[exec] at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
[exec] ... 17 more
[exec] Caused by: org.codehaus.plexus.component.factory.ant.AntComponentExecutionException: Executing Ant script: /airtest.build.xml [package-admin-air]: Failed to execute.
[exec] at org.codehaus.plexus.component.factory.ant.AntScriptInvoker.invoke(AntScriptInvoker.java:227)
[exec] at org.apache.maven.script.ant.AntMojoWrapper.execute(AntMojoWrapper.java:52)
[exec] ... 19 more
[exec] Caused by: C:\Users\dev\plexus-ant-component4263631821803364095.build.xml:445: Java returned: 10
[exec] at org.apache.tools.ant.taskdefs.Java.execute(Java.java:87)
[exec] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
[exec] at org.apache.tools.ant.Task.perform(Task.java:364)
[exec] at org.apache.tools.ant.Target.execute(Target.java:341)
[exec] at org.apache.tools.ant.Target.performTasks(Target.java:369)
[exec] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
[exec] at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
[exec] at org.codehaus.plexus.component.factory.ant.AntScriptInvoker.invoke(AntScriptInvoker.java:222)
這是在生成過程中各個點彈出一個隨機誤差,有時構建會成功,然後下一個會再次失敗。這真的很奇怪,有沒有人看過這個?我使用maven 2.2.1
BTW,在Windows中的錯誤返回代碼10的意思是「環境是無效的。
您正在使用Maven ...來調用一個非常可能出錯的Ant腳本(我很確定這個消息來自Ant腳本)。請相應更新您的問題,也許會添加您的Ant腳本的相關部分)。 – 2010-04-20 19:44:52
我檢查了腳本,但它似乎沒有錯誤。事實上,它一直沒有改變,而且構建依然閃亮成功。 – fei 2010-04-20 20:15:03
我的觀點是,你的問題標題的錯誤信息是AFAIK不是Maven的一部分,它似乎是有點習慣(我相信它來自你的Ant構建腳本)。 – 2010-04-20 20:49:24