My maven build started failing randomly, and it got the following error which I cannot make sense of, and googling it doesn't give me anything useful:
[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)
This is a random error that pops up in various point during the build process, and sometimes the build will succeed and then the next one will fail again. This is really weird, does anyone seen this before? I'm using maven 2.2.1
BTW, the error return code 10 in windows mean "Environment is invalid.