summaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
authorMark Donszelmann <Mark.Donszelmann@gmail.com>2009-10-19 13:16:21 +0200
committerMark Donszelmann <Mark.Donszelmann@gmail.com>2009-10-19 13:16:21 +0200
commit022eb158aa10fa06e3eba7a1d49ab58a6d06163d (patch)
tree0cc4c01170834eb5c05eca6bd166eef25e7949e1 /src/main/java
parent2849270700f5990b2c6110c85c8abb7a12b122a6 (diff)
downloadmaven-nar-plugin-022eb158aa10fa06e3eba7a1d49ab58a6d06163d.tar.gz
maven-nar-plugin-022eb158aa10fa06e3eba7a1d49ab58a6d06163d.tar.bz2
maven-nar-plugin-022eb158aa10fa06e3eba7a1d49ab58a6d06163d.tar.xz
maven-nar-plugin-022eb158aa10fa06e3eba7a1d49ab58a6d06163d.zip
Debigging NAR-25 on Windows
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/org/apache/maven/plugin/nar/Javah.java16
-rw-r--r--src/main/java/org/apache/maven/plugin/nar/NarUtil.java1
2 files changed, 14 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 da104e6..2856972 100644
--- a/src/main/java/org/apache/maven/plugin/nar/Javah.java
+++ b/src/main/java/org/apache/maven/plugin/nar/Javah.java
@@ -31,14 +31,17 @@ import org.apache.bcel.classfile.ClassFormatException;
import org.apache.bcel.classfile.JavaClass;
import org.apache.bcel.classfile.Method;
import org.apache.maven.artifact.DependencyResolutionRequiredException;
+import org.apache.maven.execution.MavenSession;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;
import org.apache.maven.toolchain.Toolchain;
+import org.apache.maven.toolchain.ToolchainManager;
import org.codehaus.plexus.compiler.util.scan.InclusionScanException;
import org.codehaus.plexus.compiler.util.scan.SourceInclusionScanner;
import org.codehaus.plexus.compiler.util.scan.StaleSourceScanner;
import org.codehaus.plexus.compiler.util.scan.mapping.SingleTargetSourceMapping;
import org.codehaus.plexus.compiler.util.scan.mapping.SuffixMapping;
+import org.codehaus.plexus.component.repository.exception.ComponentLookupException;
import org.codehaus.plexus.util.FileUtils;
import org.codehaus.plexus.util.StringUtils;
@@ -122,6 +125,15 @@ public class Javah
* @parameter
*/
private File timestampFile;
+
+ /**
+ * The current build session instance.
+ *
+ * @parameter expression="${session}"
+ * @required
+ * @readonly
+ */
+ private MavenSession session;
private AbstractCompileMojo mojo;
@@ -236,8 +248,8 @@ public class Javah
getTimestampDirectory().mkdirs();
File javahFile = new File( mojo.getJavaHome( mojo.getAOL() ), "bin" );
- String javah = new File(javahFile, name).getAbsolutePath();
-
+ 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 )
diff --git a/src/main/java/org/apache/maven/plugin/nar/NarUtil.java b/src/main/java/org/apache/maven/plugin/nar/NarUtil.java
index 7e45013..2470e4e 100644
--- a/src/main/java/org/apache/maven/plugin/nar/NarUtil.java
+++ b/src/main/java/org/apache/maven/plugin/nar/NarUtil.java
@@ -416,7 +416,6 @@ public class NarUtil
try
{
- cmd = CommandLineUtils.quote( cmd );
log.debug( "RunCommand: " + cmd );
cmdLine.setExecutable( cmd );
if ( args != null )