diff options
author | Mark Donszelmann <Mark.Donszelmann@gmail.com> | 2009-10-17 22:53:49 +0200 |
---|---|---|
committer | Mark Donszelmann <Mark.Donszelmann@gmail.com> | 2009-10-17 22:53:49 +0200 |
commit | a1d36351fdbb686f7277d90dd7f58b6cab1e453a (patch) | |
tree | a11e22ff227d4f0479a07abd1a5bbb1418492168 /src/main/java/org/apache | |
parent | d74c7b64ec61f138bd8ec85ddfcefec735355ff1 (diff) | |
download | maven-nar-plugin-a1d36351fdbb686f7277d90dd7f58b6cab1e453a.tar.gz maven-nar-plugin-a1d36351fdbb686f7277d90dd7f58b6cab1e453a.tar.bz2 maven-nar-plugin-a1d36351fdbb686f7277d90dd7f58b6cab1e453a.tar.xz maven-nar-plugin-a1d36351fdbb686f7277d90dd7f58b6cab1e453a.zip |
Fixed NAR-25
Diffstat (limited to 'src/main/java/org/apache')
-rw-r--r-- | src/main/java/org/apache/maven/plugin/nar/Javah.java | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/main/java/org/apache/maven/plugin/nar/Javah.java b/src/main/java/org/apache/maven/plugin/nar/Javah.java index 33e6b1c..f297416 100644 --- a/src/main/java/org/apache/maven/plugin/nar/Javah.java +++ b/src/main/java/org/apache/maven/plugin/nar/Javah.java @@ -234,11 +234,14 @@ public class Javah getJniDirectory().mkdirs(); getTimestampDirectory().mkdirs(); - mojo.getLog().info( "Running " + name + " compiler on " + files.size() + " classes..." ); - int result = NarUtil.runCommand( name, generateArgs( files ), null, null, mojo.getLog() ); + File javahFile = new File( mojo.getJavaHome( mojo.getAOL() ), "bin" ); + String javah = new File(javahFile, name).getAbsolutePath(); + + mojo.getLog().info( "Running " + javah + " compiler on " + files.size() + " classes..." ); + int result = NarUtil.runCommand( javah, generateArgs( files ), null, null, mojo.getLog() ); if ( result != 0 ) { - throw new MojoFailureException( name + " failed with exit code " + result + " 0x" + throw new MojoFailureException( javah + " failed with exit code " + result + " 0x" + Integer.toHexString( result ) ); } FileUtils.fileWrite( getTimestampDirectory() + "/" + getTimestampFile(), "" ); |