From ed40597a6de869bd1634ab6b27baf2c4478c89fa Mon Sep 17 00:00:00 2001 From: Mark Donszelmann Date: Tue, 8 Dec 2009 15:56:59 +0100 Subject: Fixed NAR-117 --- src/main/java/org/apache/maven/plugin/nar/Linker.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/main/java/org/apache/maven') diff --git a/src/main/java/org/apache/maven/plugin/nar/Linker.java b/src/main/java/org/apache/maven/plugin/nar/Linker.java index 9b9edcb..dfdea08 100644 --- a/src/main/java/org/apache/maven/plugin/nar/Linker.java +++ b/src/main/java/org/apache/maven/plugin/nar/Linker.java @@ -233,6 +233,20 @@ public class Linker throw new MojoFailureException( "Cannot deduce version number from: " + out ); } } + else if ( name.equals( "icl" ) ) + { + NarUtil.runCommand( "icl", new String[] { "/QV" }, null, null, out, err, dbg ); + Pattern p = Pattern.compile( "\\d+\\.\\d+" ); + Matcher m = p.matcher( err.toString() ); + if ( m.find() ) + { + version = m.group( 0 ); + } + else + { + throw new MojoFailureException( "Cannot deduce version number from: " + out.toString() ); + } + } else { throw new MojoFailureException( "Cannot find version number for linker '" + name + "'" ); -- cgit v1.2.3