summaryrefslogtreecommitdiff
path: root/src/main/java/org/apache/maven/plugin/nar/NarCompileMojo.java
diff options
context:
space:
mode:
authorMark Donszelmann <Mark.Donszelmann@gmail.com>2009-12-01 12:08:03 +0100
committerMark Donszelmann <Mark.Donszelmann@gmail.com>2009-12-01 12:08:03 +0100
commita18df54301d3c988c167506b832323fec973a936 (patch)
treee5ab728b2441ae5f2ac9bd0d3cead8f364c0f7cf /src/main/java/org/apache/maven/plugin/nar/NarCompileMojo.java
parentb833ebdbbe47d3a4190612e95fd5e7fc250445bd (diff)
downloadmaven-nar-plugin-a18df54301d3c988c167506b832323fec973a936.tar.gz
maven-nar-plugin-a18df54301d3c988c167506b832323fec973a936.tar.bz2
maven-nar-plugin-a18df54301d3c988c167506b832323fec973a936.tar.xz
maven-nar-plugin-a18df54301d3c988c167506b832323fec973a936.zip
Fixed NAR-55 and NAR-113
Diffstat (limited to 'src/main/java/org/apache/maven/plugin/nar/NarCompileMojo.java')
-rw-r--r--src/main/java/org/apache/maven/plugin/nar/NarCompileMojo.java11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/main/java/org/apache/maven/plugin/nar/NarCompileMojo.java b/src/main/java/org/apache/maven/plugin/nar/NarCompileMojo.java
index ddf1407..fcdd322 100644
--- a/src/main/java/org/apache/maven/plugin/nar/NarCompileMojo.java
+++ b/src/main/java/org/apache/maven/plugin/nar/NarCompileMojo.java
@@ -63,6 +63,8 @@ public class NarCompileMojo
return;
}
+ validate();
+
// make sure destination is there
getTargetDirectory().mkdirs();
@@ -96,7 +98,7 @@ public class NarCompileMojo
}
private List getSourcesFor( Compiler compiler )
- throws MojoFailureException
+ throws MojoFailureException, MojoExecutionException
{
try
{
@@ -185,14 +187,11 @@ public class NarCompileMojo
runtimeType.setValue( getRuntime( getAOL() ) );
task.setRuntime( runtimeType );
- int noOfCompilers = 0;
-
// add C++ compiler
CompilerDef cpp = getCpp().getCompiler( type, getOutput( getAOL() ) );
if ( cpp != null )
{
task.addConfiguredCompiler( cpp );
- noOfCompilers++;
}
// add C compiler
@@ -200,7 +199,6 @@ public class NarCompileMojo
if ( c != null )
{
task.addConfiguredCompiler( c );
- noOfCompilers++;
}
// add Fortran compiler
@@ -208,9 +206,8 @@ public class NarCompileMojo
if ( fortran != null )
{
task.addConfiguredCompiler( fortran );
- noOfCompilers++;
}
-
+
// add javah include path
File jniDirectory = getJavah().getJniDirectory();
if ( jniDirectory.exists() )