From 655e69d2caa527ccb1287cf8a43d1105df250099 Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Sat, 1 May 2010 02:33:16 +0800 Subject: Fixing GNU autogen call in maven-nar-plugin. Current implementation causes "[ERROR] ./: ./: is a directory" when there is an autogen script present. --- .../java/org/apache/maven/plugin/nar/NarGnuConfigureMojo.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/main/java/org/apache/maven/plugin/nar/NarGnuConfigureMojo.java b/src/main/java/org/apache/maven/plugin/nar/NarGnuConfigureMojo.java index 1389a4d..d847812 100644 --- a/src/main/java/org/apache/maven/plugin/nar/NarGnuConfigureMojo.java +++ b/src/main/java/org/apache/maven/plugin/nar/NarGnuConfigureMojo.java @@ -168,18 +168,17 @@ public class NarGnuConfigureMojo String arguments[] = null; if (args != null) { - arguments = new String[2 + args.length]; + arguments = new String[1 + args.length]; for (int i = 0; i < args.length; ++i) { - arguments[i+2] = args[i]; + arguments[i+1] = args[i]; } } else { - arguments = new String[2]; + arguments = new String[1]; } - arguments[0] = "./"; - arguments[1] = autogen.getName(); + arguments[0] = "./" + autogen.getName(); getLog().info( "args: " + Arrays.toString(arguments) ); -- cgit v1.2.3