com.pyx4me.maven.j2me.AntPropertyHelper Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of j2me-maven-plugin Show documentation
Show all versions of j2me-maven-plugin Show documentation
Maven 2 Plugin to make j2me project
/**
* Pyx4me framework
* Copyright (C) 2006-2007 pyx4.com.
*
* @author vlads
* @version $Id: AntPropertyHelper.java 103 2007-04-21 01:33:52Z vlads $
*/
package com.pyx4me.maven.j2me;
import java.util.Iterator;
import java.util.Map;
import org.apache.maven.plugin.logging.Log;
import org.apache.maven.project.MavenProject;
import org.apache.tools.ant.PropertyHelper;
public class AntPropertyHelper extends PropertyHelper {
private Log log;
private MavenProject mavenProject;
AntPropertyHelper(MavenProject mavenProject, Log log) {
this.mavenProject = mavenProject;
this.log = log;
if (log.isDebugEnabled()) {
for (Iterator i = this.mavenProject.getProperties().entrySet()
.iterator(); i.hasNext();) {
Map.Entry entry = (Map.Entry) i.next();
this.log.debug("MavenProject property " + entry.getKey() + "="
+ entry.getValue());
}
}
}
public Object getPropertyHook(String ns, String name, boolean user) {
Object val = this.mavenProject.getProperties().getProperty(name);
if (val != null) {
return val;
}
return super.getPropertyHook(ns, name, user);
}
}