summaryrefslogtreecommitdiff
path: root/src/main/java/org/apache/maven/plugin/nar/AbstractNarMojo.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org/apache/maven/plugin/nar/AbstractNarMojo.java')
-rw-r--r--src/main/java/org/apache/maven/plugin/nar/AbstractNarMojo.java31
1 files changed, 30 insertions, 1 deletions
diff --git a/src/main/java/org/apache/maven/plugin/nar/AbstractNarMojo.java b/src/main/java/org/apache/maven/plugin/nar/AbstractNarMojo.java
index eb71a9f..f2e7da4 100644
--- a/src/main/java/org/apache/maven/plugin/nar/AbstractNarMojo.java
+++ b/src/main/java/org/apache/maven/plugin/nar/AbstractNarMojo.java
@@ -95,13 +95,19 @@ public abstract class AbstractNarMojo
/**
* Target directory for Nar file construction. Defaults to "${project.build.directory}/nar" for "nar-compile" goal
- * Defaults to "${project.build.directory}/test-nar" for "nar-testCompile" goal
*
* @parameter expression=""
*/
private File targetDirectory;
/**
+ * Target directory for Nar test construction. Defaults to "${project.build.directory}/test-nar" for "nar-testCompile" goal
+ *
+ * @parameter expression=""
+ */
+ private File testTargetDirectory;
+
+ /**
* Target directory for Nar file unpacking. Defaults to "${targetDirectory}"
*
* @parameter expression=""
@@ -109,6 +115,13 @@ public abstract class AbstractNarMojo
private File unpackDirectory;
/**
+ * Target directory for Nar test unpacking. Defaults to "${testTargetDirectory}"
+ *
+ * @parameter expression=""
+ */
+ private File testUnpackDirectory;
+
+ /**
* Layout to be used for building and unpacking artifacts
*
* @parameter expression="${nar.layout}" default-value="org.apache.maven.plugin.nar.NarLayout21"
@@ -149,11 +162,19 @@ public abstract class AbstractNarMojo
{
targetDirectory = new File( mavenProject.getBuild().getDirectory(), "nar" );
}
+ if ( testTargetDirectory == null )
+ {
+ testTargetDirectory = new File( mavenProject.getBuild().getDirectory(), "test-nar" );
+ }
if ( unpackDirectory == null )
{
unpackDirectory = targetDirectory;
}
+ if ( testUnpackDirectory == null )
+ {
+ testUnpackDirectory = testTargetDirectory;
+ }
}
protected final String getArchitecture()
@@ -191,11 +212,19 @@ public abstract class AbstractNarMojo
{
return targetDirectory;
}
+ protected final File getTestTargetDirectory()
+ {
+ return testTargetDirectory;
+ }
protected final File getUnpackDirectory()
{
return unpackDirectory;
}
+ protected final File getTestUnpackDirectory()
+ {
+ return testUnpackDirectory;
+ }
protected final NarLayout getLayout()
throws MojoExecutionException