From ea90603864a8d1295924e0e1301c98b8b50d2be3 Mon Sep 17 00:00:00 2001 From: Volker Schumacher Date: Tue, 26 Jan 2010 21:55:46 +0800 Subject: set maven properties nar.arch, nar.os, nar.linker, nar.aol (arch-os-linker), nar.aol.key (arch.os.linker). --- .../java/org/apache/maven/plugin/nar/AbstractNarMojo.java | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src') 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 ) { -- cgit v1.2.3