summaryrefslogtreecommitdiff
path: root/src/main/java/org/apache/maven
diff options
context:
space:
mode:
authorVolker Schumacher <volker@antenna500.local>2010-01-26 21:55:46 +0800
committerMark Donszelmann <Mark.Donszelmann@gmail.com>2010-01-28 16:20:35 +0800
commitea90603864a8d1295924e0e1301c98b8b50d2be3 (patch)
tree93d8753a51157786384e13dfd4a1b9eac017a359 /src/main/java/org/apache/maven
parent73c685dd9cbd15cf59a125d73113034a3d456df9 (diff)
downloadmaven-nar-plugin-ea90603864a8d1295924e0e1301c98b8b50d2be3.tar.gz
maven-nar-plugin-ea90603864a8d1295924e0e1301c98b8b50d2be3.tar.bz2
maven-nar-plugin-ea90603864a8d1295924e0e1301c98b8b50d2be3.tar.xz
maven-nar-plugin-ea90603864a8d1295924e0e1301c98b8b50d2be3.zip
set maven properties nar.arch, nar.os, nar.linker, nar.aol (arch-os-linker), nar.aol.key (arch.os.linker).
Diffstat (limited to 'src/main/java/org/apache/maven')
-rw-r--r--src/main/java/org/apache/maven/plugin/nar/AbstractNarMojo.java11
1 files changed, 11 insertions, 0 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 ac2479f..a3ab310 100644
--- a/src/main/java/org/apache/maven/plugin/nar/AbstractNarMojo.java
+++ b/src/main/java/org/apache/maven/plugin/nar/AbstractNarMojo.java
@@ -20,7 +20,9 @@ package org.apache.maven.plugin.nar;
*/
import java.io.File;
+import java.util.Properties;
+import org.apache.maven.model.Model;
import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;
@@ -133,6 +135,15 @@ public abstract class AbstractNarMojo
architecture = NarUtil.getArchitecture( architecture );
os = NarUtil.getOS( os );
aolId = NarUtil.getAOL( architecture, os, linker, aol );
+
+ Model model = mavenProject.getModel();
+ Properties properties = model.getProperties();
+ properties.setProperty("nar.arch", getArchitecture());
+ properties.setProperty("nar.os", getOS());
+ properties.setProperty("nar.linker", getLinker().getName());
+ properties.setProperty("nar.aol", aolId.toString());
+ properties.setProperty("nar.aol.group", aolId.getKey());
+ model.setProperties(properties);
if ( targetDirectory == null )
{