krysalis-viprom/src/java/ant/org/krysalis/viprom/ant ViPrOMPropertyHelper.java,1.1,1.2 ViPrOMTask.java,1.1,1.2

[email protected]
Newsgroups gmane.comp.krysalis.metamorphosis.cvs
Message-ID <[email protected]>
Update of /cvsroot/metamorphosis/krysalis-viprom/src/java/ant/org/krysalis/viprom/ant
In directory sc8-pr-cvs1:/tmp/cvs-serv8109/src/java/ant/org/krysalis/viprom/ant

Modified Files:
	ViPrOMPropertyHelper.java ViPrOMTask.java 
Log Message:
More tinkering...

Index: ViPrOMPropertyHelper.java
===================================================================
RCS file: /cvsroot/metamorphosis/krysalis-viprom/src/java/ant/org/krysalis/viprom/ant/ViPrOMPropertyHelper.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** ViPrOMPropertyHelper.java	27 Oct 2003 20:23:19 -0000	1.1
--- ViPrOMPropertyHelper.java	27 Oct 2003 22:39:48 -0000	1.2
***************
*** 142,146 ****
  
  		Logger.getLogger().verbose(
! 			"PropertyHelper - VIPROM: Trying to resolve and deliver property '"
  				+ name
  				+ "'");
--- 142,146 ----
  
  		Logger.getLogger().verbose(
! 			"ViPrOM: Trying to resolve and deliver property '"
  				+ name
  				+ "'");
***************
*** 157,162 ****
  
  		if (null == result) {
! 			Logger.getLogger().verbose(
! 				"PropertyHelper: Passing the ball to the next hook");
  			return super.getPropertyHook(ns, name, user);
  		}
--- 157,162 ----
  
  		if (null == result) {
! 			Logger.getLogger().debug(
! 				"ViPrOM: Passing the ball to the next hook");
  			return super.getPropertyHook(ns, name, user);
  		}

Index: ViPrOMTask.java
===================================================================
RCS file: /cvsroot/metamorphosis/krysalis-viprom/src/java/ant/org/krysalis/viprom/ant/ViPrOMTask.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** ViPrOMTask.java	27 Oct 2003 20:23:19 -0000	1.1
--- ViPrOMTask.java	27 Oct 2003 22:39:48 -0000	1.2
***************
*** 6,12 ****
--- 6,14 ----
  import java.io.File;
  import java.io.FileInputStream;
+ import java.util.Iterator;
  import java.util.Map;
  
  import org.apache.tools.ant.BuildException;
+ import org.apache.tools.ant.Project;
  import org.apache.tools.ant.Task;
  import org.krysalis.version.ant.util.AntLogListener;
***************
*** 14,17 ****
--- 16,20 ----
  import org.krysalis.version.util.dom.DOMUtils;
  import org.krysalis.viprom.Aliases;
+ import org.krysalis.viprom.Properties;
  import org.w3c.dom.Document;
  
***************
*** 22,27 ****
  
  	private File m_metadata = null;
! 	private String m_type = null;
  	private boolean m_usePrefix = false;
  
  	/* (non-Javadoc)
--- 25,31 ----
  
  	private File m_metadata = null;
! 	private String m_type = Aliases.GUMP;
  	private boolean m_usePrefix = false;
+ 	private boolean m_log = false;
  
  	/* (non-Javadoc)
***************
*** 36,39 ****
--- 40,44 ----
  
  		try {
+ 			Logger.getLogger().info("Load [" + m_type + "] metadata from [" + m_metadata.getAbsolutePath() + "]");
  			//
  			// Read the XML into memory
***************
*** 45,49 ****
  			// Get type map
  			//
! 			Map aliases = Aliases.get(m_type);
  
  			// Register the property helper...
--- 50,54 ----
  			// Get type map
  			//
! 			Map aliases = Aliases.getAliasesFor(m_type);
  
  			// Register the property helper...
***************
*** 53,60 ****
  				aliases,
  				m_usePrefix);
  		}
  		catch (Exception e) {
  			if (e instanceof BuildException)
! 				throw (BuildException)e;
  			else
  				throw new BuildException(e);
--- 58,81 ----
  				aliases,
  				m_usePrefix);
+ 
+ 			if (m_log) {
+ 				for (Iterator i = Properties.getPropertyNames().iterator();
+ 					i.hasNext();
+ 					) {
+ 					String property = (String) i.next();
+ 
+ 					String value = getProject().getProperty(property);
+ 
+ 					log(
+ 						property + " -> " + ((null == value)
+ 							? ("${" + property + "}")
+ 							: value),
+ 						Project.MSG_INFO);
+ 				}
+ 			}
  		}
  		catch (Exception e) {
  			if (e instanceof BuildException)
! 				throw (BuildException) e;
  			else
  				throw new BuildException(e);
***************
*** 104,107 ****
--- 125,142 ----
  	public void setUsePrefix(boolean b) {
  		m_usePrefix = b;
+ 	}
+ 
+ 	/**
+ 	 * @return
+ 	 */
+ 	public boolean isLog() {
+ 		return m_log;
+ 	}
+ 
+ 	/**
+ 	 * @param b
+ 	 */
+ 	public void setLog(boolean b) {
+ 		m_log = b;
  	}
  




-------------------------------------------------------
This SF.net email is sponsored by: The SF.net Donation Program.
Do you like what SourceForge.net is doing for the Open
Source Community?  Make a contribution, and help us add new
features and functionality. Click here: http://sourceforge.net/donate/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.