You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by jv...@apache.org on 2005/09/19 17:02:36 UTC

svn commit: r290180 [2/2] - in /maven/components/trunk/sandbox/acm: ./ config/ src/ src/main/ src/main/java/ src/main/java/org/ src/main/java/org/apache/ src/main/java/org/apache/maven/ src/main/java/org/apache/maven/acm/ src/main/java/org/apache/maven...

Added: maven/components/trunk/sandbox/acm/src/main/java/org/apache/maven/acm/convert/PropertiesMunger.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/sandbox/acm/src/main/java/org/apache/maven/acm/convert/PropertiesMunger.java?rev=290180&view=auto
==============================================================================
--- maven/components/trunk/sandbox/acm/src/main/java/org/apache/maven/acm/convert/PropertiesMunger.java (added)
+++ maven/components/trunk/sandbox/acm/src/main/java/org/apache/maven/acm/convert/PropertiesMunger.java Mon Sep 19 08:02:15 2005
@@ -0,0 +1,197 @@
+/*
+ * Copyright (c) 2005 Your Corporation. All Rights Reserved.
+ */
+package org.apache.maven.acm.convert;
+
+import org.apache.maven.acm.util.InterpolationFilterWriter;
+import org.apache.maven.acm.util.MapInterpolationHandler;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.FileReader;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.Reader;
+import java.io.Writer;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Properties;
+import java.util.Iterator;
+
+/**
+ * This tool works in the case where you have a set of properties files that
+ * control your application configuration and a set of environmental properties files
+ * that are merged against your properties files used for your application
+ * configuration.
+ * <p/>
+ * So you might have:
+ * <p/>
+ * brioreport.properties
+ * config.properties
+ * portal.properties
+ * <p/>
+ * These control your properties files for your application configurations.
+ * Then you might have the following:
+ * <p/>
+ * dev.properties
+ * test.properties
+ * qa.properties
+ * prod.properties
+ * <p/>
+ * These are properties for the environment the application is
+ * running in.
+ * <p/>
+ * Our goal here is to unify these into a coherent ACM so that
+ * we can manage these.
+ * <p/>
+ * In this particular case the environmental properties are used for
+ * swizzling the application properties above in addition to being
+ * used to swizzle other resources like weblogic config.xml files.
+ * <p/>
+ * So first we will take all the application configuration properties
+ * and concatenate them together
+ *
+ * @author <a href="mailto:jason@maven.org">Jason van Zyl</a>
+ * @version $Id:$
+ */
+public class PropertiesMunger
+{
+    private static String APP = "application.props";
+
+    public void munge( File applicationSourceDirectory,
+                       File environmentSourceDirectory,
+                       File outputDirectory )
+        throws Exception
+    {
+        if ( !outputDirectory.exists() )
+        {
+            outputDirectory.mkdirs();
+        }
+
+        FileScanner scanner = new FileScanner();
+
+        File[] appProperties = scanner.scan( applicationSourceDirectory, "properties" );
+
+        File[] envProperties = scanner.scan( environmentSourceDirectory, "properties" );
+
+        // ----------------------------------------------------------------------
+        // Combine all the application properties into a single file
+        // ----------------------------------------------------------------------
+
+        Properties app = new Properties();
+
+        Map m = new HashMap();
+
+        for ( int i = 0; i < appProperties.length; i++ )
+        {
+            Properties p = new Properties();
+
+            p.load( new FileInputStream( appProperties[i] ) );
+
+            app.putAll( p );
+        }
+
+
+        File aggregate = new File( outputDirectory, APP );
+
+        FileOutputStream os = new FileOutputStream( aggregate );
+
+        app.store( os, APP );
+
+        os.close();
+
+        // ----------------------------------------------------------------------
+        // Now write out the template for the application configurations
+        // ----------------------------------------------------------------------
+
+        for ( int i = 0; i < envProperties.length; i++ )
+        {
+            String envName = envProperties[i].getName();
+
+            envName = envName.substring( 0, envName.indexOf( "." ) );
+
+            Properties p = new Properties();
+
+            p.load( new FileInputStream( envProperties[i] ) );
+
+            // ------------------------------------------------------------------------
+            // Now use these properties and merge them with the application.properties
+            // to produce a properties file targeted at a particular environment.
+            // ------------------------------------------------------------------------
+
+            Reader reader = new FileReader( aggregate );
+
+            File output = new File( outputDirectory, envName + ".properties" );
+
+            MapInterpolationHandler handler = new MapInterpolationHandler( p );
+
+            InterpolationFilterWriter writer = new InterpolationFilterWriter( new FileWriter( output ), handler );
+
+            copy( reader, writer );
+
+            reader.close();
+
+            writer.close();
+
+            // ------------------------------------------------------------------------
+            // Now look at the difference in keys between the application configuration
+            // and the environment configuration and push the difference into
+            // application configuration so we have a self contained set of
+            // properties for an environment. We are basically making one
+            // configuration for an environment.
+            // ------------------------------------------------------------------------
+
+            Properties appProps = new Properties();
+
+            FileInputStream is = new FileInputStream( output );
+
+            appProps.load( is );
+
+            is.close();
+
+            for ( Iterator j = p.keySet().iterator(); j.hasNext(); )
+            {
+                String key = (String) j.next();
+
+                if ( ! appProps.containsKey( key ) )
+                {
+                    appProps.setProperty( key, p.getProperty( key ) );
+                }
+            }
+
+            os = new FileOutputStream( output );
+
+            appProps.store( os, "props for " + envName );
+
+            os.close();
+        }
+    }
+
+    public static void copy( Reader input, Writer output )
+        throws IOException
+    {
+        char[] buffer = new char[1024 * 4];
+
+        int n = 0;
+
+        while ( -1 != ( n = input.read( buffer ) ) )
+        {
+            output.write( buffer, 0, n );
+        }
+    }
+
+    public static void main( String[] args )
+        throws Exception
+    {
+        File appSource = new File( args[0] );
+
+        File envSource = new File( args[1] );
+
+        File output = new File( args[2] );
+
+        PropertiesMunger munger = new PropertiesMunger();
+
+        munger.munge( appSource, envSource, output );
+    }
+}

Added: maven/components/trunk/sandbox/acm/src/main/java/org/apache/maven/acm/model/Environment.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/sandbox/acm/src/main/java/org/apache/maven/acm/model/Environment.java?rev=290180&view=auto
==============================================================================
--- maven/components/trunk/sandbox/acm/src/main/java/org/apache/maven/acm/model/Environment.java (added)
+++ maven/components/trunk/sandbox/acm/src/main/java/org/apache/maven/acm/model/Environment.java Mon Sep 19 08:02:15 2005
@@ -0,0 +1,59 @@
+/*
+ * Copyright (c) 2005 Your Corporation. All Rights Reserved.
+ */
+package org.apache.maven.acm.model;
+
+import java.util.Properties;
+
+/**
+ * @author <a href="mailto:jason@maven.org">Jason van Zyl</a>
+ * @version $Id:$
+ */
+public class Environment
+{
+    private String id;
+
+    private String description;
+
+    private Properties properties = new Properties();
+
+    public String getId()
+    {
+        return id;
+    }
+
+    public void setId( String id )
+    {
+        this.id = id;
+    }
+
+    public String getDescription()
+    {
+        return description;
+    }
+
+    public void setDescription( String description )
+    {
+        this.description = description;
+    }
+
+    public void addProperty( String key, String value )
+    {
+        properties.setProperty( key, value );
+    }
+
+    public String getProperty( String key )
+    {
+        return properties.getProperty( key );
+    }
+
+    public Properties getProperties()
+    {
+        return properties;
+    }
+
+    public void setProperties( Properties properties )
+    {
+        this.properties = properties;
+    }
+}

Added: maven/components/trunk/sandbox/acm/src/main/java/org/apache/maven/acm/model/Model.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/sandbox/acm/src/main/java/org/apache/maven/acm/model/Model.java?rev=290180&view=auto
==============================================================================
--- maven/components/trunk/sandbox/acm/src/main/java/org/apache/maven/acm/model/Model.java (added)
+++ maven/components/trunk/sandbox/acm/src/main/java/org/apache/maven/acm/model/Model.java Mon Sep 19 08:02:15 2005
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 2005 Your Corporation. All Rights Reserved.
+ */
+package org.apache.maven.acm.model;
+
+import java.util.Map;
+import java.util.HashMap;
+import java.util.Set;
+import java.util.HashSet;
+
+/**
+ * @author <a href="mailto:jason@maven.org">Jason van Zyl</a>
+ * @version $Id:$
+ */
+public class Model
+{
+    private Map environments = new HashMap();
+
+    private Set propertyKeySet  = new HashSet();
+
+    public void addEnvironment( Environment environment )
+    {
+        environments.put( environment.getId(), environment );
+    }
+
+    public Map getEnvironments()
+    {
+        return environments;
+    }
+
+    public Environment getEnvironment( String id )
+    {
+        return (Environment) environments.get( id );
+    }
+
+    public void addPropertyKey( String propertyKey )
+    {
+        propertyKeySet.add( propertyKey );
+    }
+
+    public Set getPropertyKeySet()
+    {
+        return propertyKeySet;
+    }
+
+    // ----------------------------------------------------------------------
+    // for each proprety key I want to know what the values are in each
+    // of the environments are.
+    // ----------------------------------------------------------------------
+}

Added: maven/components/trunk/sandbox/acm/src/main/java/org/apache/maven/acm/text/AcmTextDescriptorReader.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/sandbox/acm/src/main/java/org/apache/maven/acm/text/AcmTextDescriptorReader.java?rev=290180&view=auto
==============================================================================
--- maven/components/trunk/sandbox/acm/src/main/java/org/apache/maven/acm/text/AcmTextDescriptorReader.java (added)
+++ maven/components/trunk/sandbox/acm/src/main/java/org/apache/maven/acm/text/AcmTextDescriptorReader.java Mon Sep 19 08:02:15 2005
@@ -0,0 +1,115 @@
+package org.apache.maven.acm.text;
+
+import org.apache.maven.acm.model.Environment;
+import org.apache.maven.acm.model.Model;
+import org.apache.maven.acm.StringInputStream;
+
+import java.io.BufferedReader;
+import java.io.Reader;
+import java.util.Iterator;
+import java.util.Properties;
+
+/**
+ * @author <a href="mailto:jason@maven.org">Jason van Zyl</a>
+ * @version $Id: SinkDescriptorReader.java,v 1.1 2004/09/22 00:01:42 jvanzyl Exp $
+ */
+public class AcmTextDescriptorReader
+{
+    public Model read( Reader reader )
+        throws Exception
+    {
+        Model model = new Model();
+
+        BufferedReader br = new BufferedReader( reader );
+
+        String line;
+
+        String propertyKey = null;
+
+        StringBuffer propertiesText = new StringBuffer();
+
+        while ( ( line = br.readLine() ) != null )
+        {
+            if ( line.startsWith( "//" ) || line.startsWith( "{" ) || line.trim().length() == 0 )
+            {
+                continue;
+            }
+            else if ( line.startsWith( "+" ) )
+            {
+                // Process an environment definition
+
+                Environment e = new Environment();
+
+                String environment = line.substring( 1 ).trim();
+
+                int i = environment.indexOf( "=" );
+
+                String id = environment.substring( 0, i - 1 ).trim();
+
+                String description = environment.substring( i + 1 ).trim();
+
+                e.setId( id );
+
+                e.setDescription( description );
+
+                model.addEnvironment( e );
+            }
+            else if ( line.startsWith( "*" ) )
+            {
+                propertyKey = line.substring( 1 ).trim();
+
+                model.addPropertyKey( propertyKey );
+
+                if ( propertyKey.endsWith( "{" ) )
+                {
+                    propertyKey = propertyKey.substring( 0, propertyKey.length() - 1 ).trim();
+                }
+            }
+            else if ( line.endsWith( "}" ) )
+            {
+                // This is what we're parsing:
+                //
+                // dev = devValue
+                // test = testValue
+                // qa = qaValue
+                //
+
+                Properties p = new Properties();
+
+                p.load( new StringInputStream( propertiesText.toString() ) );
+
+                processProperties( model, propertyKey, p );
+
+                propertiesText = new StringBuffer();
+            }
+            else
+            {
+                propertiesText.append( line ).append( "\n" );
+            }
+        }
+
+        return model;
+    }
+
+    private void processProperties( Model model, String propertyKey, Properties properties )
+    {
+        // Iterate though the properties and assign the value for the property key
+        // for each environment specified.
+        //
+        // dev = devValue
+        // test = testValue
+        // qa = qaValue
+        //
+        // So for a given propertyKey we need to assign values for the dev, test, and qa
+        // environments.
+
+        for ( Iterator i = properties.keySet().iterator(); i.hasNext(); )
+        {
+            String environmentKey = (String) i.next();
+
+            Environment environment = model.getEnvironment( environmentKey );
+
+            environment.addProperty( propertyKey, properties.getProperty( environmentKey ) );
+        }
+    }
+}

Added: maven/components/trunk/sandbox/acm/src/main/java/org/apache/maven/acm/text/AcmTextDescriptorWriter.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/sandbox/acm/src/main/java/org/apache/maven/acm/text/AcmTextDescriptorWriter.java?rev=290180&view=auto
==============================================================================
--- maven/components/trunk/sandbox/acm/src/main/java/org/apache/maven/acm/text/AcmTextDescriptorWriter.java (added)
+++ maven/components/trunk/sandbox/acm/src/main/java/org/apache/maven/acm/text/AcmTextDescriptorWriter.java Mon Sep 19 08:02:15 2005
@@ -0,0 +1,94 @@
+package org.apache.maven.acm.text;
+
+import org.apache.maven.acm.model.Environment;
+import org.apache.maven.acm.model.Model;
+
+import java.io.PrintWriter;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+
+/**
+ * Write out an application configuration management model in the
+ * simple text format.
+ *
+ * @author <a href="mailto:jason@maven.org">Jason van Zyl</a>
+ * @version $Id:$
+ * @todo groups of properties
+ * @todo sorting
+ * @todo order of environments inside a propertyKey setting
+ */
+public class AcmTextDescriptorWriter
+{
+    public void write( PrintWriter writer, Model model)
+        throws Exception
+    {
+        writeEnvironments( writer, model );
+
+        writeProperties( writer, model );
+
+        writer.flush();
+
+        writer.close();
+    }
+
+    protected void writeEnvironments( PrintWriter writer, Model model )
+        throws Exception
+    {
+        for ( Iterator i = model.getEnvironments().values().iterator(); i.hasNext(); )
+        {
+            Environment e = (Environment) i.next();
+
+            writer.print( "+" );
+
+            writer.print( e.getId() );
+
+            writer.print( " = " );
+
+            writer.println( e.getDescription() );
+        }
+
+        writer.println();
+    }
+
+    protected void writeProperties( PrintWriter writer, Model model )
+        throws Exception
+    {
+        List sortedPropertyKeys = new ArrayList( model.getPropertyKeySet() );
+
+        Collections.sort( sortedPropertyKeys );
+
+        for ( Iterator i = sortedPropertyKeys.iterator(); i.hasNext(); )
+        {
+            String propertyKey = (String) i.next();
+
+            writer.print( "*" );
+
+            writer.println( propertyKey );
+
+            writer.println( "{" );
+
+            // ----------------------------------------------------------------------
+            // For each environment state the value for this property key
+            // ----------------------------------------------------------------------
+
+            for ( Iterator j = model.getEnvironments().values().iterator(); j.hasNext(); )
+            {
+                Environment e = (Environment) j.next();
+
+                writer.print( "  " );
+
+                writer.print( e.getId() );
+
+                writer.print( " = " );
+
+                writer.println( e.getProperty( propertyKey ) );
+            }
+
+            writer.println( "}" );
+
+            writer.println();
+        }
+    }
+}

Added: maven/components/trunk/sandbox/acm/src/main/java/org/apache/maven/acm/util/InterpolationFilterWriter.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/sandbox/acm/src/main/java/org/apache/maven/acm/util/InterpolationFilterWriter.java?rev=290180&view=auto
==============================================================================
--- maven/components/trunk/sandbox/acm/src/main/java/org/apache/maven/acm/util/InterpolationFilterWriter.java (added)
+++ maven/components/trunk/sandbox/acm/src/main/java/org/apache/maven/acm/util/InterpolationFilterWriter.java Mon Sep 19 08:02:15 2005
@@ -0,0 +1,135 @@
+package org.apache.maven.acm.util;
+
+import java.io.FilterWriter;
+import java.io.IOException;
+import java.io.Writer;
+
+public class InterpolationFilterWriter
+    extends FilterWriter
+{
+    private int index = 0;
+
+    private String beginToken;
+
+    private int beginTokenLength;
+
+    private StringBuffer queuedData = new StringBuffer();
+
+    private int beginTokenIndex;
+
+    private int endTokenIndex;
+
+    private String endToken;
+
+    private int endTokenLength;
+
+    private static String DEFAULT_BEGIN_TOKEN = "@";
+
+    private static String DEFAULT_END_TOKEN = "@";
+
+    private InterpolationHandler interpolationHandler;
+
+    public InterpolationFilterWriter( Writer out, InterpolationHandler interpolationHandler )
+    {
+        this( out, interpolationHandler, DEFAULT_BEGIN_TOKEN, DEFAULT_END_TOKEN );
+    }
+
+    public InterpolationFilterWriter( Writer out, InterpolationHandler interpolationHandler, String beginToken, String endToken )
+    {
+        super( out );
+
+        this.interpolationHandler = interpolationHandler;
+
+        this.beginToken = beginToken;
+
+        beginTokenLength = beginToken.length();
+
+        this.endToken = endToken;
+
+        endTokenLength = endToken.length();
+    }
+
+
+    public void write( String s )
+        throws IOException
+    {
+        int length = s.length();
+
+        for ( int i = 0; i < length; i++ )
+        {
+            write( s.charAt( i ) );
+        }
+    }
+
+    public void write( char[] buf, int offset, int len )
+        throws IOException
+    {
+        for ( int i = offset; i < len; i++ )
+        {
+            write( (char) buf[i] );
+        }
+    }
+
+    public void write( int c )
+        throws IOException
+    {
+        if ( index == 0 && c == beginToken.toCharArray()[beginTokenIndex] )
+        {
+            if ( beginTokenIndex == ( beginTokenLength - 1 ) )
+            {
+                beginTokenIndex = 0;
+            }
+            else
+            {
+                beginTokenIndex++;
+            }
+
+            queuedData.append( (char) c );
+
+            index++;
+        }
+        else if ( index > 0 && c == endToken.toCharArray()[endTokenIndex] )
+        {
+            if ( endTokenIndex == ( endTokenLength - 1 ) )
+            {
+                queuedData.append( (char) c );
+
+                beginTokenIndex = 0;
+
+                endTokenIndex = 0;
+
+                index = 0;
+
+                interpolate( queuedData.toString() );
+
+                queuedData = new StringBuffer();
+            }
+            else
+            {
+                queuedData.append( (char) c );
+
+                endTokenIndex++;
+
+                index++;
+            }
+        }
+        else if ( index > 0 )
+        {
+            queuedData.append( (char) c );
+
+            index++;
+        }
+        else
+        {
+            out.write( c );
+        }
+    }
+
+    private void interpolate( String s )
+        throws IOException
+    {
+        String key = s.substring( beginTokenLength, s.length() - endTokenLength );
+
+        interpolationHandler.interpolate( key, out );
+    }
+}

Added: maven/components/trunk/sandbox/acm/src/main/java/org/apache/maven/acm/util/InterpolationHandler.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/sandbox/acm/src/main/java/org/apache/maven/acm/util/InterpolationHandler.java?rev=290180&view=auto
==============================================================================
--- maven/components/trunk/sandbox/acm/src/main/java/org/apache/maven/acm/util/InterpolationHandler.java (added)
+++ maven/components/trunk/sandbox/acm/src/main/java/org/apache/maven/acm/util/InterpolationHandler.java Mon Sep 19 08:02:15 2005
@@ -0,0 +1,17 @@
+/*
+ * Copyright (c) 2005 Your Corporation. All Rights Reserved.
+ */
+package org.apache.maven.acm.util;
+
+import java.io.Writer;
+import java.io.IOException;
+
+/**
+ * @author <a href="mailto:jason@maven.org">Jason van Zyl</a>
+ * @version $Id:$
+ */
+public interface InterpolationHandler
+{
+    public void interpolate( String key, Writer writer )
+        throws IOException;
+}

Added: maven/components/trunk/sandbox/acm/src/main/java/org/apache/maven/acm/util/MapInterpolationHandler.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/sandbox/acm/src/main/java/org/apache/maven/acm/util/MapInterpolationHandler.java?rev=290180&view=auto
==============================================================================
--- maven/components/trunk/sandbox/acm/src/main/java/org/apache/maven/acm/util/MapInterpolationHandler.java (added)
+++ maven/components/trunk/sandbox/acm/src/main/java/org/apache/maven/acm/util/MapInterpolationHandler.java Mon Sep 19 08:02:15 2005
@@ -0,0 +1,35 @@
+package org.apache.maven.acm.util;
+
+import java.util.Map;
+import java.io.IOException;
+import java.io.Writer;
+
+/**
+ * @author <a href="mailto:jason@maven.org">Jason van Zyl</a>
+ * @version $Id:$
+ */
+public class MapInterpolationHandler
+    implements InterpolationHandler
+{
+    private Map map;
+
+    public MapInterpolationHandler( Map map )
+    {
+        this.map = map;
+    }
+
+    public void interpolate( String key, Writer out )
+        throws IOException
+    {
+        Object o = map.get( key );
+
+        if ( o == null )
+        {
+            out.write( key );
+        }
+        else
+        {
+            out.write( o.toString() );
+        }
+    }
+}

Added: maven/components/trunk/sandbox/acm/src/test/java/org/apache/maven/acm/AcmTest.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/sandbox/acm/src/test/java/org/apache/maven/acm/AcmTest.java?rev=290180&view=auto
==============================================================================
--- maven/components/trunk/sandbox/acm/src/test/java/org/apache/maven/acm/AcmTest.java (added)
+++ maven/components/trunk/sandbox/acm/src/test/java/org/apache/maven/acm/AcmTest.java Mon Sep 19 08:02:15 2005
@@ -0,0 +1,26 @@
+package org.apache.maven.acm;
+
+import junit.framework.TestCase;
+
+/**
+ * Unit test for simple App.
+ *
+ * @author <a href="mailto:jason@zenplex.com">Jason van Zyl</a>
+ */
+public class AcmTest
+    extends TestCase
+{
+    public void testAcmSettingTheDefaultSystemId()
+        throws Exception
+    {
+        Acm acm = new Acm( "dev", new PropertiesProvider() );
+
+        assertEquals( "dev", acm.getParameter( "system" ) );
+
+        assertEquals( "test", acm.getParameter( "test", "system" ) );
+
+        assertEquals( "qa", acm.getParameter( "qa", "system" ) );
+
+        assertEquals( "production", acm.getParameter( "production", "system" ) );
+    }
+}

Added: maven/components/trunk/sandbox/acm/src/test/java/org/apache/maven/acm/AcmTextDescriptorReaderTest.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/sandbox/acm/src/test/java/org/apache/maven/acm/AcmTextDescriptorReaderTest.java?rev=290180&view=auto
==============================================================================
--- maven/components/trunk/sandbox/acm/src/test/java/org/apache/maven/acm/AcmTextDescriptorReaderTest.java (added)
+++ maven/components/trunk/sandbox/acm/src/test/java/org/apache/maven/acm/AcmTextDescriptorReaderTest.java Mon Sep 19 08:02:15 2005
@@ -0,0 +1,95 @@
+/*
+ * Copyright (c) 2005 Your Corporation. All Rights Reserved.
+ */
+package org.apache.maven.acm;
+
+import junit.framework.TestCase;
+
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.FileWriter;
+import java.io.Writer;
+import java.io.PrintWriter;
+import java.io.File;
+
+import org.apache.maven.acm.model.Model;
+import org.apache.maven.acm.model.Environment;
+import org.apache.maven.acm.text.AcmTextDescriptorReader;
+import org.apache.maven.acm.text.AcmTextDescriptorWriter;
+import org.apache.maven.acm.convert.PropertiesConverter;
+import org.apache.maven.acm.convert.PropertiesGenerator;
+
+/**
+ * Unit test for simple App.
+ *
+ * @author <a href="mailto:jason@zenplex.com">Jason van Zyl</a>
+ */
+public class AcmTextDescriptorReaderTest
+    extends TestCase
+{
+    private String basedir;
+
+    protected void setUp()
+        throws Exception
+    {
+        basedir = System.getProperty( "basedir" );
+    }
+
+    public void testTextDescriptorReaderTest()
+        throws Exception
+    {
+        Model model = getModel();
+
+        testModel( model );
+
+        writeModel( model, "foo.txt" );
+    }
+
+    protected void writeModel( Model model, String file )
+        throws Exception
+    {
+        PrintWriter writer = new PrintWriter( new FileWriter( file ) );
+
+        AcmTextDescriptorWriter w = new AcmTextDescriptorWriter();
+
+        w.write( writer, model );
+    }
+
+    protected void testModel( Model model )
+        throws Exception
+    {
+        assertEquals( 4, model.getEnvironments().size() );
+
+        Environment dev = model.getEnvironment( "dev" );
+
+        assertNotNull( dev );
+
+        assertEquals( "devValue", dev.getProperty( "tas.editor.stamp" ) );
+    }
+
+    protected Model getModel()
+        throws Exception
+    {
+        AcmTextDescriptorReader reader = new AcmTextDescriptorReader();
+
+        InputStream is = Thread.currentThread().getContextClassLoader().getResourceAsStream( "config.txt" );
+
+        Model model = reader.read( new InputStreamReader( is ) );
+
+        return model;
+    }
+
+    public void testPropertiesConverter()
+        throws Exception
+    {
+        PropertiesConverter converter = new PropertiesConverter();
+
+        Model model = converter.convert( new File( basedir, "config").getPath() );
+
+        writeModel( model, "toyota.config" );
+
+        PropertiesGenerator pg = new PropertiesGenerator();
+
+        pg.generate( model, new File( basedir, "target" ).getPath(), "t3_" );
+    }
+}

Added: maven/components/trunk/sandbox/acm/src/test/java/org/apache/maven/acm/PropertiesComparatorTest.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/sandbox/acm/src/test/java/org/apache/maven/acm/PropertiesComparatorTest.java?rev=290180&view=auto
==============================================================================
--- maven/components/trunk/sandbox/acm/src/test/java/org/apache/maven/acm/PropertiesComparatorTest.java (added)
+++ maven/components/trunk/sandbox/acm/src/test/java/org/apache/maven/acm/PropertiesComparatorTest.java Mon Sep 19 08:02:15 2005
@@ -0,0 +1,36 @@
+package org.apache.maven.acm;
+
+import junit.framework.TestCase;
+
+import java.util.Properties;
+import java.util.List;
+
+/**
+ * @author <a href="mailto:jason@maven.org">Jason van Zyl</a>
+ * @version $Id:$
+ */
+public class PropertiesComparatorTest
+    extends TestCase
+{
+    public void testPropertiesComparator()
+        throws Exception
+    {
+        Properties source = new Properties();
+
+        Properties target = new Properties();
+
+        source.setProperty( "property0", "value0" );
+
+        source.setProperty( "property1", "value1" );
+
+        target.setProperty( "property3", "value3" );
+
+        PropertiesComparator pc = new PropertiesComparator();
+
+        List diff = pc.compare( source, target );
+
+        assertTrue( diff.contains( "property0" ) );
+
+        assertTrue( diff.contains( "property1" ) );                
+    }
+}

Added: maven/components/trunk/sandbox/acm/src/test/java/org/apache/maven/acm/PropertiesMungerTest.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/sandbox/acm/src/test/java/org/apache/maven/acm/PropertiesMungerTest.java?rev=290180&view=auto
==============================================================================
--- maven/components/trunk/sandbox/acm/src/test/java/org/apache/maven/acm/PropertiesMungerTest.java (added)
+++ maven/components/trunk/sandbox/acm/src/test/java/org/apache/maven/acm/PropertiesMungerTest.java Mon Sep 19 08:02:15 2005
@@ -0,0 +1,35 @@
+/*
+ * Copyright (c) 2005 Your Corporation. All Rights Reserved.
+ */
+package org.apache.maven.acm;
+
+import junit.framework.TestCase;
+import org.apache.maven.acm.convert.PropertiesMunger;
+
+import java.io.File;
+
+/**
+ * @author <a href="mailto:jason@maven.org">Jason van Zyl</a>
+ * @version $Id:$
+ */
+public class PropertiesMungerTest
+    extends TestCase
+{
+
+
+    public void testPropertiesMunger()
+        throws Exception
+    {
+        String basedir = System.getProperty( "basedir" );
+
+        PropertiesMunger munger = new PropertiesMunger();
+
+        File appSource = new File( basedir, "t3/app" );
+
+        File envSource = new File( basedir, "t3/env" );
+
+        File output = new File( basedir, "target/config" );
+
+        munger.munge( appSource, envSource, output );
+    }
+}

Added: maven/components/trunk/sandbox/acm/src/test/resources/config.txt
URL: http://svn.apache.org/viewcvs/maven/components/trunk/sandbox/acm/src/test/resources/config.txt?rev=290180&view=auto
==============================================================================
--- maven/components/trunk/sandbox/acm/src/test/resources/config.txt (added)
+++ maven/components/trunk/sandbox/acm/src/test/resources/config.txt Mon Sep 19 08:02:15 2005
@@ -0,0 +1,13 @@
++dev = Dev environment
++qa = QA environment
++test = Test environment
++prod = Production Environment
+
+*tas.editor.stamp
+{
+  dev = devValue
+  qa = qaValue
+  test = testValue
+  prod = prodValue
+}
+

Added: maven/components/trunk/sandbox/acm/src/test/resources/dev.properties
URL: http://svn.apache.org/viewcvs/maven/components/trunk/sandbox/acm/src/test/resources/dev.properties?rev=290180&view=auto
==============================================================================
--- maven/components/trunk/sandbox/acm/src/test/resources/dev.properties (added)
+++ maven/components/trunk/sandbox/acm/src/test/resources/dev.properties Mon Sep 19 08:02:15 2005
@@ -0,0 +1 @@
+system=dev
\ No newline at end of file

Added: maven/components/trunk/sandbox/acm/src/test/resources/production.properties
URL: http://svn.apache.org/viewcvs/maven/components/trunk/sandbox/acm/src/test/resources/production.properties?rev=290180&view=auto
==============================================================================
--- maven/components/trunk/sandbox/acm/src/test/resources/production.properties (added)
+++ maven/components/trunk/sandbox/acm/src/test/resources/production.properties Mon Sep 19 08:02:15 2005
@@ -0,0 +1 @@
+system=production

Added: maven/components/trunk/sandbox/acm/src/test/resources/qa.properties
URL: http://svn.apache.org/viewcvs/maven/components/trunk/sandbox/acm/src/test/resources/qa.properties?rev=290180&view=auto
==============================================================================
--- maven/components/trunk/sandbox/acm/src/test/resources/qa.properties (added)
+++ maven/components/trunk/sandbox/acm/src/test/resources/qa.properties Mon Sep 19 08:02:15 2005
@@ -0,0 +1 @@
+system=qa
\ No newline at end of file

Added: maven/components/trunk/sandbox/acm/src/test/resources/test.properties
URL: http://svn.apache.org/viewcvs/maven/components/trunk/sandbox/acm/src/test/resources/test.properties?rev=290180&view=auto
==============================================================================
--- maven/components/trunk/sandbox/acm/src/test/resources/test.properties (added)
+++ maven/components/trunk/sandbox/acm/src/test/resources/test.properties Mon Sep 19 08:02:15 2005
@@ -0,0 +1 @@
+system=test
\ No newline at end of file

Added: maven/components/trunk/sandbox/acm/t3/app/brioreport.properties
URL: http://svn.apache.org/viewcvs/maven/components/trunk/sandbox/acm/t3/app/brioreport.properties?rev=290180&view=auto
==============================================================================
--- maven/components/trunk/sandbox/acm/t3/app/brioreport.properties (added)
+++ maven/components/trunk/sandbox/acm/t3/app/brioreport.properties Mon Sep 19 08:02:15 2005
@@ -0,0 +1,14 @@
+report.key.reportHost=smbrip11
+report.key.reportPort=1820
+report.mutex.time=10
+report.key.reportBase=/t3reporting
+# local dev
+#report.key.proxy=http://smbrit02
+# deployment
+report.key.proxy=
+report.key.reportURI=/T3/
+report.tas.report.url=/t3reporting/browse/get/T3/BQYs/Search%20TAS%20Cases
+
+
+# test configuration
+app.junit.test=TRUE
\ No newline at end of file

Added: maven/components/trunk/sandbox/acm/t3/app/config.properties
URL: http://svn.apache.org/viewcvs/maven/components/trunk/sandbox/acm/t3/app/config.properties?rev=290180&view=auto
==============================================================================
--- maven/components/trunk/sandbox/acm/t3/app/config.properties (added)
+++ maven/components/trunk/sandbox/acm/t3/app/config.properties Mon Sep 19 08:02:15 2005
@@ -0,0 +1,36 @@
+# This can be configured to WEBSERVICE or CONTROL
+env.portal.control.config=CONTROL
+
+# ldap environment -- use ldaps instead of ldap for SSL protocol
+env.portal.ldap.protocol=ldap
+env.portal.ldap.host=tau.tms.toyota.com
+env.portal.ldap.port=389
+env.portal.ldap.initial_context_factory=com.sun.jndi.ldap.LdapCtxFactory
+env.portal.ldap.security_authentication=simple
+env.portal.ldap.security_principal.prefix=cn=
+env.portal.ldap.security_principal.suffix=,ou=people,ou=tms,ou=intranet,o=teds
+
+# database environment
+env.portal.datasource.name=jdbc/globalDataSource
+
+# environment web service http
+env.portal.webservice.host=smpqsd01
+env.portal.webservice.port=7041
+
+# environment web service http for timers
+env.portal.id.webservice.host=localhost
+env.portal.id.webservice.port=7021
+
+# enviroment web service timer url
+env.timer.webservice.host=localhost
+env.timer.webservice.port=7021
+
+# search properties
+env.search.beginUri=http://t3privdev.tms.toyota.com/t3Portal/internal
+env.search.queryTables=APPL_SERV_CAT_PREPRESS_VW SCA, APPL_VEH_PREPRESS_VW VA
+
+# application url
+env.application.url=http://t3privdev.tms.toyota.com
+
+# test configuration
+app.junit.test=TRUE

Added: maven/components/trunk/sandbox/acm/t3/app/portal.properties
URL: http://svn.apache.org/viewcvs/maven/components/trunk/sandbox/acm/t3/app/portal.properties?rev=290180&view=auto
==============================================================================
--- maven/components/trunk/sandbox/acm/t3/app/portal.properties (added)
+++ maven/components/trunk/sandbox/acm/t3/app/portal.properties Mon Sep 19 08:02:15 2005
@@ -0,0 +1,80 @@
+tas.editor.stamp=\n--------------- {0} at {1} ---------------\n\n
+
+# Days before a document is expired only used when it is in the initiated state
+tas.editor.expire.initiated=14
+
+# Years before any other document is expired
+tas.editor.expire.non-initiated=5
+
+# Portal Properties for Reassignment Failure
+tas.editor.reassigment=TA Case has been reassigned to {0} [{1}].
+tas.editor.escalated=TA Case has been escalated to {0} [{1}].
+
+### REMOVE the lines below after the 7th Iteration
+tas.editor.temp.firstname=Mike
+tas.editor.temp.lastname=Robinson
+tas.editor.temp.commonname=robinsm1234@toyota.com
+tas.editor.temp.principal=robinsm1234@toyota.com
+
+# Tas Dealer/Technician
+tas.dealer.technicianname=Unlisted Techninican
+tas.dealer.technicianid=unlisted_id
+
+# TA Email Properties
+tas.email.from.name=T3_TAS_NOTIFIER
+tas.email.from.email=Russell_Suzuki@toyota.com
+tas.email.cc.email=I_DO_NOT_EXIST_TEST_EMAIL@toyota.com
+tas.email.smtp=tiemann.tms.toyota.com
+tas.email.escalate.subject=TAS Case {0}
+tas.email.escalate.body=TAS Case {0} is being forwarded to you for further assistance.  Please login into the T3 system ({1}) to resolve the case.
+tas.email.reassign.subject=TAS Case {0}
+tas.email.reassign.body=TAS Case {0} is being forwarded to you for further assistance.  Please login into the T3 system ({1}) to resolve the case.
+tas.email.url=http://t3privdev.tms.toyota.com/t3Portal
+tas.email.ready=true
+
+# TA CC Composer Properties
+tas.message.composer.subject=TAS Notification: TA Case {0}
+tas.message.composer.body=TAS Case {0} has been forwarded to you for information and reference purposes.  For further details please log into the T3 system.\n\n
+
+
+# TA Viewer Configurations
+tas.viewer.ta.select=select tas.T3_ID as "tasID", tas.STATUS_CODE as "statusCode", tas.CREATION_TIMESTAMP as "creationTime", tas.LAST_MODIFIED_TIMESTAMP as "lastModTime",  tas.CREATOR_USERID as "creatorUserId", tas.CREATOR_NAME as "creatorName", tas.OWNER_USERID as "ownerUserId",  tas.OWNER_NAME as "ownerName", tas.DEALER_TECH_USERID as "dealerTechUserId",  tas.DEALER_TECH_NAME as "dealerTechName", tas.DEALER_TECH_INITIATED as "dealerTechInitiated",  tas.DEALER_CODE as "dealerCode", tas.DEALER_NAME as "dealerName",  tas.DEALER_REGION_CODE as "dealerRegionCode", tas.QA_DEPARTMENT_NAME as "qaDepartmentName", tas.SERVICE_CATEGORY_CODE as "serviceCategoryCode",  tas.SERVICE_CATEGORY_DESC as "serviceCategoryDescription", tas.SECTION_CODE as "sectionCode",  tas.SECTION_DESC as "sectionDescription", tas.SUB_COMPONENT_CODE as "subcomponentCode",  tas.SUB_COMPONENT_DESC as "subcomponentDescription", tas.CONDITION_CODE as "conditionCode",  tas.CONDITION_DESC as "conditionDescription", tas.CAUSE_COMPONENT_CODE as "causeComponentCode",  tas.CAUSE_COMPONENT_DESC as "causeComponentDescription", tas.CAUSE_SUB_COMP_CODE as "causeSubcomponentCode",  tas.CAUSE_SUB_COMP_DESC as "causeSubcomponentDescription", tas.CAUSE_CONDITION_CODE as "causeConditionCode",  tas.CAUSE_CONDITION_DESC as "causeConditionDescription" from dctm_tas_general_info tas, dctm_tas_dtc_codes dtc
+tas.viewer.ta.order=order by STATUS_CODE, T3_ID
+tas.viewer.ta.window.title=TA+Viewer::
+
+# TC Viewer SQL Strings
+tas.viewer.tc.select=select distinct T3_ID as "T3_ID", obj.i_chronicle_id as "I_CHRONICLE_ID", obj.object_type as "OBJECT_TYPE", obj.publication_number as "PUBLICATION_NUMBER", obj.object_title as "OBJECT_TITLE", sc.service_category_code as "serviceCategory", sc.section_code as "section", sc.sub_component_code as "subComponent",  veh.division_code as "division", veh.model_name as "model", veh.model_year as "year", veh.vds as "vds" from applicability_object obj, applicability_veh veh, applicability_serv_cat sc where {0} veh.i_chronicle_id = sc.i_chronicle_id and veh.i_chronicle_id=obj.i_chronicle_id
+tas.viewer.tc.where.all=0
+tas.viewer.tc.object.state=internal
+tas.viewer.tc.items.per.page=15
+tas.viewer.tc.access.TCTMS=ProductEngineer,TASSupervisor,TASEditor,TASReviewer,TASAdmin,SystemAdmin
+tas.viewer.tc.access.TCRegion=FieldEngineer
+tas.viewer.tc.access.TCAll=Observer
+
+# TA Helper Configuration
+tas.editor.helper.element.service.category=TMSMeta-service_category
+tas.editor.helper.element.section=TMSMeta-section
+tas.editor.helper.element.subcomponent=TMSMeta-subcomponent
+tas.editor.helper.element.condition=TMSMeta-symptom
+tas.editor.helper.element.cause.comp=TQNET-cause_comp_area
+tas.editor.helper.element.cause.subcomp=TQNET-cause_sub_comp
+tas.editor.helper.element.cause.condition=TQNET-cause_condition
+tas.editor.helper.namespace=http://common.t3.tms.com/xmlbeans/ta
+tas.editor.helper.attribute.code=code
+
+# TAS Data Query Time in Seconds
+tas.reference.default.querytime=10
+
+# UUP completion
+app.uup.completed=TRUE
+
+# TAS Attachment
+tas.editor.attachment.path=C:/dev/attachment/
+tas.editor.attachment.activate=true
+tas.editor.attachment.maxattachmentinsertion=128
+
+# test configuration
+app.junit.test=TRUE
+
+# home page forward
+t3.forward.uri=/appmanager/t3/int
\ No newline at end of file

Added: maven/components/trunk/sandbox/acm/t3/env/dev.properties
URL: http://svn.apache.org/viewcvs/maven/components/trunk/sandbox/acm/t3/env/dev.properties?rev=290180&view=auto
==============================================================================
--- maven/components/trunk/sandbox/acm/t3/env/dev.properties (added)
+++ maven/components/trunk/sandbox/acm/t3/env/dev.properties Mon Sep 19 08:02:15 2005
@@ -0,0 +1,82 @@
+unix.bea.dir=/t3/apps/wl/8.1.3
+win.bea.dir=/bea
+jdk.ver=jdk142_04
+weblogic.ver=weblogic81
+
+unix.cvsroot.dir=/t3/build/cruisecontrol/checkout
+win.cvsroot.dir=/dev
+
+win.deploy.dir=/dev/t3/library/deploy
+unix.deploy.dir=/t3/envs/wlpdev1
+
+weblogic.domain.name=iPortal
+
+weblogic.database.user=t3wlpint
+weblogic.database.password=t3wlpint
+weblogic.database.server=hppqsd01
+weblogic.database.port=1521
+weblogic.database.SID=T3DD
+
+# Used by i/ePortal
+refinery.database.user=t3datglobl
+refinery.database.password=t3datglobl
+refinery.database.server=hppqsd01
+refinery.database.port=1521
+refinery.database.SID=T3DD
+
+refineryext.database.user=t3datglobl
+refineryext.database.password=t3datglobl
+refineryext.database.server=hppqsd01
+refineryext.database.port=1521
+refineryext.database.SID=T3DD
+
+weblogic.admin.host=smpqsd01
+weblogic.admin.port=7021
+weblogic.admin.sslport=7022
+weblogic.debug.port=8023
+
+weblogic.system.user=system
+weblogic.system.password=password
+weblogic.NovellAuthenticator.host=smtbgd01
+weblogic.NovellAuthenticator.principal=cn=T3intPortalBroker,ou=svcaccounts,ou=spec,o=teds
+weblogic.NovellAuthenticator.password=intportalbrokert3
+weblogic.IAExtension.SiteMinderAdmin=siteminder
+weblogic.IAExtension.SiteMinderAdminPassword={3DES}3x8+x75ipmk=
+weblogic.additional.security=Security:Name=myrealmIAExtension
+weblogic.ExecuteQueue=15
+
+# web.xml configuration
+webxml.auth-method=CLIENT-CERT
+
+# weblogic.xml configuration
+weblogicxml.publisher.local-path=/t3/data/pub
+weblogicxml.staticcontent.local-path=/t3/data
+weblogicxml.jsp.debug=true
+weblogicxml.jsp.pageCheckSeconds=1
+weblogicxml.jsp.precompile=false
+weblogicxml.jsp.precompileContinue=false
+
+# log4j.properties configuration
+log4j.configuration.file=file:/t3/envs/wlpdev1/iPortal/log4j.properties
+log4j.log.dir=/t3/envs/wlpdev1/iPortal/logs
+
+# application.properties configuration
+app.portal.enviroment=internal
+
+# config.properties configuration
+env.portal.webservice.host=smpqsd01
+env.portal.webservice.port=7041
+env.search.beginUri=http://t3privdev.tms.toyota.com/t3Portal/internal
+env.timer.webservice.host=smpqsd01
+env.timer.webservice.port=7021
+env.portal.id.webservice.host=smpqsd01
+env.portal.id.webservice.port=7021
+
+# portal.properties configuration
+tas.email.url=http://t3privdev.tms.toyota.com/t3Portal
+tas.editor.attachment.path=/t3/envs/wlpdev1/iPortal/attachment/
+
+# brioreport.properties configuration
+report.key.reportHost=smbrit03.tms.toyota.com
+report.key.reportPort=1810
+report.tas.report.url=/t3reporting/dataaccess/Browse?REQUEST_TYPE=GET_DOCUMENT&DOC_UUID=00000100f6bb076d-0000-eafc-0a311104&DocVersion=1&JScript=enable
\ No newline at end of file

Added: maven/components/trunk/sandbox/acm/t3/env/prod.properties
URL: http://svn.apache.org/viewcvs/maven/components/trunk/sandbox/acm/t3/env/prod.properties?rev=290180&view=auto
==============================================================================
--- maven/components/trunk/sandbox/acm/t3/env/prod.properties (added)
+++ maven/components/trunk/sandbox/acm/t3/env/prod.properties Mon Sep 19 08:02:15 2005
@@ -0,0 +1,84 @@
+unix.bea.dir=/t3/apps/wl/8.1.3
+win.bea.dir=/bea
+jdk.ver=jdk142_04
+weblogic.ver=weblogic81
+
+unix.cvsroot.dir=/t3/build/cruisecontrol/checkout
+win.cvsroot.dir=/dev
+
+win.deploy.dir=/dev/t3/library/deploy
+unix.deploy.dir=/t3/envs/wlppp1
+
+weblogic.domain.name=iPortal
+
+weblogic.database.user=t3wlpint
+weblogic.database.password=t3wlpintprod
+weblogic.database.server=hppqsp11
+weblogic.database.port=1521
+weblogic.database.SID=T3IP
+
+# Used by i/ePortal
+refinery.database.user=t3datglobl
+refinery.database.password=t3dgprod
+refinery.database.server=hppqsp11
+refinery.database.port=1521
+refinery.database.SID=T3IP
+
+refineryext.database.user=t3datglobl
+refineryext.database.password=t3dgprod
+refineryext.database.server=hppqsp11
+refineryext.database.port=1521
+refineryext.database.SID=T3IP
+
+weblogic.admin.host=smpqsp01
+weblogic.admin.port=7021
+weblogic.admin.sslport=7022
+weblogic.debug.port=8023
+
+weblogic.system.user=system
+weblogic.system.password=password
+weblogic.NovellAuthenticator.host=smtbgp05.tms.toyota.com
+weblogic.NovellAuthenticator.principal=cn=T3intPortalBroker,ou=svcaccounts,ou=spec,o=teds
+weblogic.NovellAuthenticator.password=intPortalBrokert3
+weblogic.IAExtension.SiteMinderAdmin=t3admin
+weblogic.IAExtension.SiteMinderAdminPassword={3DES}FZxvhDswJrc=
+weblogic.additional.security=Security:Name=myrealmIAExtension
+weblogic.ExecuteQueue=100
+
+# web.xml configuration
+webxml.auth-method=CLIENT-CERT
+
+# weblogic.xml configuration
+weblogicxml.publisher.local-path=/t3/data/pub
+weblogicxml.staticcontent.local-path=/t3/data
+weblogicxml.jsp.debug=false
+weblogicxml.jsp.pageCheckSeconds=-1
+weblogicxml.jsp.precompile=true
+weblogicxml.jsp.precompileContinue=true
+
+# log4j.properties configuration
+log4j.configuration.file=file:/t3/envs/wlppp1/iPortal/log4j.properties
+log4j.log.dir=/t3/envs/wlppp1/iPortal/logs
+
+# application.properties configuration
+app.portal.enviroment=internal
+
+# config.properties configuration
+env.portal.webservice.host=smpqsp01
+env.portal.webservice.port=7041
+env.search.beginUri=http://t3.tms.toyota.com/t3Portal/internal
+env.timer.webservice.host=smpqsp01
+env.timer.webservice.port=7021
+env.portal.id.webservice.host=smpqsp01
+env.portal.id.webservice.port=7021
+
+# portal.properties configuration
+tas.email.url=http://t3.tms.toyota.com/t3Portal
+tas.editor.attachment.path=/t3/envs/wlppp1/iPortal/attachment/
+
+# brioreport.properties configuration
+report.key.reportHost=smbrip10.tms.toyota.com
+report.key.reportPort=1800
+report.tas.report.url=/t3reporting/dataaccess/Browse?REQUEST_TYPE=GET_DOCUMENT&DOC_UUID=00000100966a65c0-0000-81b5-0a3f070a&DOC_VERSION=1&JScript=enable
+
+

Added: maven/components/trunk/sandbox/acm/t3/env/qa.properties
URL: http://svn.apache.org/viewcvs/maven/components/trunk/sandbox/acm/t3/env/qa.properties?rev=290180&view=auto
==============================================================================
--- maven/components/trunk/sandbox/acm/t3/env/qa.properties (added)
+++ maven/components/trunk/sandbox/acm/t3/env/qa.properties Mon Sep 19 08:02:15 2005
@@ -0,0 +1,83 @@
+unix.bea.dir=/t3/apps/wl/8.1.3
+win.bea.dir=/bea
+jdk.ver=jdk142_04
+weblogic.ver=weblogic81
+
+unix.cvsroot.dir=/t3/build/cruisecontrol/checkout
+win.cvsroot.dir=/dev
+
+win.deploy.dir=/dev/t3/library/deploy
+unix.deploy.dir=/t3/envs/wlpqa1
+
+weblogic.domain.name=iPortal
+
+weblogic.database.user=t3wlpint
+weblogic.database.password=t3wlpint
+weblogic.database.server=hppqsq11
+weblogic.database.port=1521
+weblogic.database.SID=T3IA
+
+# Used by i/ePortal
+refinery.database.user=t3datglobl
+refinery.database.password=t3datglobl
+refinery.database.server=hppqsq11
+refinery.database.port=1521
+refinery.database.SID=T3IA
+
+refineryext.database.user=t3datglobl
+refineryext.database.password=t3datglobl
+refineryext.database.server=hppqsq11
+refineryext.database.port=1521
+refineryext.database.SID=T3IA
+
+weblogic.admin.host=smpqsq01
+weblogic.admin.port=7021
+weblogic.admin.sslport=7022
+weblogic.debug.port=8023
+
+weblogic.system.user=system
+weblogic.system.password=password
+weblogic.NovellAuthenticator.host=smtbgq15.tms.toyota.com
+weblogic.NovellAuthenticator.principal=cn=T3intPortalBroker,ou=svcaccounts,ou=spec,o=teds
+weblogic.NovellAuthenticator.password=intPortalBrokert3
+weblogic.IAExtension.SiteMinderAdmin=t3admin
+weblogic.IAExtension.SiteMinderAdminPassword=42T3amm
+weblogic.additional.security=Security:Name=myrealmIAExtension
+weblogic.ExecuteQueue=100
+
+# web.xml configuration
+webxml.auth-method=CLIENT-CERT
+
+# weblogic.xml configuration
+weblogicxml.publisher.local-path=/t3/data/pub
+weblogicxml.staticcontent.local-path=/t3/data
+weblogicxml.jsp.debug=false
+weblogicxml.jsp.pageCheckSeconds=-1
+weblogicxml.jsp.precompile=true
+weblogicxml.jsp.precompileContinue=true
+
+# log4j.properties configuration
+log4j.configuration.file=file:/t3/envs/wlpqa1/iPortal/log4j.properties
+log4j.log.dir=/t3/envs/wlpqa1/iPortal/logs
+
+# application.properties configuration
+app.portal.enviroment=internal
+
+# config.properties configuration
+env.portal.webservice.host=smpqsq01
+env.portal.webservice.port=7041
+env.search.beginUri=http://t3qa.tms.toyota.com/t3Portal/internal
+env.timer.webservice.host=smpqsq01
+env.timer.webservice.port=7021
+env.portal.id.webservice.host=smpqsq01
+env.portal.id.webservice.port=7021
+
+# portal.properties configuration
+tas.email.url=http://t3qa.tms.toyota.com/t3Portal
+tas.editor.attachment.path=/t3/envs/wlpqa1/iPortal/attachment/
+
+# brioreport.properties configuration
+report.key.reportHost=smbrip11.tms.toyota.com
+report.key.reportPort=1820
+report.tas.report.url=/t3reporting/dataaccess/Browse?REQUEST_TYPE=GET_DOCUMENT&DOC_UUID=000001005330d663-0000-ea23-0a3f070b&DOC_VERSION=1&JScript=enable
+

Added: maven/components/trunk/sandbox/acm/t3/env/test.properties
URL: http://svn.apache.org/viewcvs/maven/components/trunk/sandbox/acm/t3/env/test.properties?rev=290180&view=auto
==============================================================================
--- maven/components/trunk/sandbox/acm/t3/env/test.properties (added)
+++ maven/components/trunk/sandbox/acm/t3/env/test.properties Mon Sep 19 08:02:15 2005
@@ -0,0 +1,81 @@
+unix.bea.dir=/t3/apps/wl/8.1.3
+win.bea.dir=/bea
+jdk.ver=jdk142_04
+weblogic.ver=weblogic81
+
+unix.cvsroot.dir=/t3/build/cruisecontrol/checkout
+win.cvsroot.dir=/dev
+
+win.deploy.dir=/dev/t3/library/deploy
+unix.deploy.dir=/t3/envs/wlptest1
+
+weblogic.domain.name=iPortal
+
+weblogic.database.user=t3wlpint
+weblogic.database.password=t3wlpint
+weblogic.database.server=hppqsd01
+weblogic.database.port=1521
+weblogic.database.SID=T3DT
+
+# Used by i/ePortal
+refinery.database.user=t3datglobl
+refinery.database.password=t3datglobl
+refinery.database.server=hppqsd01
+refinery.database.port=1521
+refinery.database.SID=T3DT
+
+refineryext.database.user=t3datglobl
+refineryext.database.password=t3datglobl
+refineryext.database.server=hppqsd01
+refineryext.database.port=1521
+refineryext.database.SID=T3DT
+
+weblogic.admin.host=smpqst01
+weblogic.admin.port=7021
+weblogic.admin.sslport=7022
+weblogic.debug.port=8023
+
+weblogic.system.user=system
+weblogic.system.password=password
+weblogic.NovellAuthenticator.host=tau.tms.toyota.com
+weblogic.NovellAuthenticator.principal=cn=T3intPortalBroker,ou=svcaccounts,ou=spec,o=teds
+weblogic.NovellAuthenticator.password=intPortalBrokert3
+weblogic.IAExtension.SiteMinderAdmin=siteminder
+weblogic.IAExtension.SiteMinderAdminPassword={3DES}PeLrMhffwaQ=
+weblogic.additional.security=Security:Name=myrealmIAExtension
+weblogic.ExecuteQueue=15
+# web.xml configuration
+webxml.auth-method=CLIENT-CERT
+
+# weblogic.xml configuration
+weblogicxml.publisher.local-path=/t3/data/pub
+weblogicxml.staticcontent.local-path=/t3/data
+weblogicxml.jsp.debug=true
+weblogicxml.jsp.pageCheckSeconds=1
+weblogicxml.jsp.precompile=false
+weblogicxml.jsp.precompileContinue=false
+
+# log4j.properties configuration
+log4j.configuration.file=file:/t3/envs/wlptest1/iPortal/log4j.properties
+log4j.log.dir=/t3/envs/wlptest1/iPortal/logs
+
+# application.properties configuration
+app.portal.enviroment=internal
+
+# config.properties configuration
+env.portal.webservice.host=smpqst01
+env.portal.webservice.port=7041
+env.search.beginUri=http://t3test.tms.toyota.com/t3Portal/internal
+env.timer.webservice.host=smpqst01
+env.timer.webservice.port=7021
+env.portal.id.webservice.host=smpqst01
+env.portal.id.webservice.port=7021
+
+# portal.properties configuration
+tas.email.url=http://t3test.tms.toyota.com/t3Portal
+tas.editor.attachment.path=/t3/envs/wlptest1/iPortal/attachment/
+
+# brioreport.properties configuration
+report.key.reportHost=smbrit03.tms.toyota.com
+report.key.reportPort=1810
+report.tas.report.url=/t3reporting/dataaccess/Browse?REQUEST_TYPE=GET_DOCUMENT&DOC_UUID=00000100f6bb076d-0000-eafc-0a311104&DocVersion=1&JScript=enable
\ No newline at end of file

Added: maven/components/trunk/sandbox/acm/t3/make-config.sh
URL: http://svn.apache.org/viewcvs/maven/components/trunk/sandbox/acm/t3/make-config.sh?rev=290180&view=auto
==============================================================================
--- maven/components/trunk/sandbox/acm/t3/make-config.sh (added)
+++ maven/components/trunk/sandbox/acm/t3/make-config.sh Mon Sep 19 08:02:15 2005
@@ -0,0 +1,30 @@
+#!/bin/sh
+
+# -------------------------------------------------------------
+# This process creates the application configuration properties
+# ------------------------------------------------------------
+
+envProperties=/t3/build/cruisecontrol/checkout/t3/library/config
+templateProperties=/t3/build/cruisecontrol/checkout/t3/library/src/application/t3PortalApp/portal_properties/internal
+
+envs="wlpdev1 wlptest1 wlpqa1 wlppp1"
+
+for i in $envs
+do
+  cp $envProperties/env.properties.iportal.${i} ${i}.properties  
+done
+
+mv wlpdev1.properties dev.properties
+mv wlptest1.properties test.properties
+mv wlpqa1.properties qa.properties
+mv wlppp1.properties prod.properties
+
+mkdir env
+
+mv *.properties env
+
+mkdir app
+
+cp $templateProperties/portal.properties app
+cp $templateProperties/config.properties app
+cp $templateProperties/brioreport.properties app

Propchange: maven/components/trunk/sandbox/acm/t3/make-config.sh
------------------------------------------------------------------------------
    svn:executable = *

Added: maven/components/trunk/sandbox/acm/toyota.config
URL: http://svn.apache.org/viewcvs/maven/components/trunk/sandbox/acm/toyota.config?rev=290180&view=auto
==============================================================================
--- maven/components/trunk/sandbox/acm/toyota.config (added)
+++ maven/components/trunk/sandbox/acm/toyota.config Mon Sep 19 08:02:15 2005
@@ -0,0 +1,477 @@
++qa = Environment for qa
++prod = Environment for prod
++dev = Environment for dev
++test = Environment for test
+
+*app.portal.enviroment
+{
+  qa = internal
+  prod = internal
+  dev = internal
+  test = internal
+}
+
+*env.portal.id.webservice.host
+{
+  qa = smpqsq01
+  prod = smpqsp01
+  dev = smpqsd01
+  test = smpqst01
+}
+
+*env.portal.id.webservice.port
+{
+  qa = 7021
+  prod = 7021
+  dev = 7021
+  test = 7021
+}
+
+*env.portal.webservice.host
+{
+  qa = smpqsq01
+  prod = smpqsp01
+  dev = smpqsd01
+  test = smpqst01
+}
+
+*env.portal.webservice.port
+{
+  qa = 7041
+  prod = 7041
+  dev = 7041
+  test = 7041
+}
+
+*env.search.beginUri
+{
+  qa = http://t3qa.tms.toyota.com/t3Portal/internal
+  prod = http://t3.tms.toyota.com/t3Portal/internal
+  dev = http://t3privdev.tms.toyota.com/t3Portal/internal
+  test = http://t3test.tms.toyota.com/t3Portal/internal
+}
+
+*env.timer.webservice.host
+{
+  qa = smpqsq01
+  prod = smpqsp01
+  dev = smpqsd01
+  test = smpqst01
+}
+
+*env.timer.webservice.port
+{
+  qa = 7021
+  prod = 7021
+  dev = 7021
+  test = 7021
+}
+
+*jdk.ver
+{
+  qa = jdk142_04
+  prod = jdk142_04
+  dev = jdk142_04
+  test = jdk142_04
+}
+
+*log4j.configuration.file
+{
+  qa = file:/t3/envs/wlpqa1/iPortal/log4j.properties
+  prod = file:/t3/envs/wlppp1/iPortal/log4j.properties
+  dev = file:/t3/envs/wlpdev1/iPortal/log4j.properties
+  test = file:/t3/envs/wlptest1/iPortal/log4j.properties
+}
+
+*log4j.log.dir
+{
+  qa = /t3/envs/wlpqa1/iPortal/logs
+  prod = /t3/envs/wlppp1/iPortal/logs
+  dev = /t3/envs/wlpdev1/iPortal/logs
+  test = /t3/envs/wlptest1/iPortal/logs
+}
+
+*refinery.database.SID
+{
+  qa = T3IA
+  prod = T3IP
+  dev = T3DD
+  test = T3DT
+}
+
+*refinery.database.password
+{
+  qa = t3datglobl
+  prod = t3dgprod
+  dev = t3datglobl
+  test = t3datglobl
+}
+
+*refinery.database.port
+{
+  qa = 1521
+  prod = 1521
+  dev = 1521
+  test = 1521
+}
+
+*refinery.database.server
+{
+  qa = hppqsq11
+  prod = hppqsp11
+  dev = hppqsd01
+  test = hppqsd01
+}
+
+*refinery.database.user
+{
+  qa = t3datglobl
+  prod = t3datglobl
+  dev = t3datglobl
+  test = t3datglobl
+}
+
+*refineryext.database.SID
+{
+  qa = T3IA
+  prod = T3IP
+  dev = T3DD
+  test = T3DT
+}
+
+*refineryext.database.password
+{
+  qa = t3datglobl
+  prod = t3dgprod
+  dev = t3datglobl
+  test = t3datglobl
+}
+
+*refineryext.database.port
+{
+  qa = 1521
+  prod = 1521
+  dev = 1521
+  test = 1521
+}
+
+*refineryext.database.server
+{
+  qa = hppqsq11
+  prod = hppqsp11
+  dev = hppqsd01
+  test = hppqsd01
+}
+
+*refineryext.database.user
+{
+  qa = t3datglobl
+  prod = t3datglobl
+  dev = t3datglobl
+  test = t3datglobl
+}
+
+*report.key.reportHost
+{
+  qa = smbrip11.tms.toyota.com
+  prod = smbrip10.tms.toyota.com
+  dev = smbrit03.tms.toyota.com
+  test = smbrit03.tms.toyota.com
+}
+
+*report.key.reportPort
+{
+  qa = 1820
+  prod = 1800
+  dev = 1810
+  test = 1810
+}
+
+*report.tas.report.url
+{
+  qa = /t3reporting/dataaccess/Browse?REQUEST_TYPE=GET_DOCUMENT&DOC_UUID=000001005330d663-0000-ea23-0a3f070b&DOC_VERSION=1&JScript=enable
+  prod = /t3reporting/dataaccess/Browse?REQUEST_TYPE=GET_DOCUMENT&DOC_UUID=00000100966a65c0-0000-81b5-0a3f070a&DOC_VERSION=1&JScript=enable
+  dev = /t3reporting/dataaccess/Browse?REQUEST_TYPE=GET_DOCUMENT&DOC_UUID=00000100f6bb076d-0000-eafc-0a311104&DocVersion=1&JScript=enable
+  test = /t3reporting/dataaccess/Browse?REQUEST_TYPE=GET_DOCUMENT&DOC_UUID=00000100f6bb076d-0000-eafc-0a311104&DocVersion=1&JScript=enable
+}
+
+*tas.editor.attachment.path
+{
+  qa = /t3/envs/wlpqa1/iPortal/attachment/
+  prod = /t3/envs/wlppp1/iPortal/attachment/
+  dev = /t3/envs/wlpdev1/iPortal/attachment/
+  test = /t3/envs/wlptest1/iPortal/attachment/
+}
+
+*tas.email.url
+{
+  qa = http://t3qa.tms.toyota.com/t3Portal
+  prod = http://t3.tms.toyota.com/t3Portal
+  dev = http://t3privdev.tms.toyota.com/t3Portal
+  test = http://t3test.tms.toyota.com/t3Portal
+}
+
+*unix.bea.dir
+{
+  qa = /t3/apps/wl/8.1.3
+  prod = /t3/apps/wl/8.1.3
+  dev = /t3/apps/wl/8.1.3
+  test = /t3/apps/wl/8.1.3
+}
+
+*unix.cvsroot.dir
+{
+  qa = /t3/build/cruisecontrol/checkout
+  prod = /t3/build/cruisecontrol/checkout
+  dev = /t3/build/cruisecontrol/checkout
+  test = /t3/build/cruisecontrol/checkout
+}
+
+*unix.deploy.dir
+{
+  qa = /t3/envs/wlpqa1
+  prod = /t3/envs/wlppp1
+  dev = /t3/envs/wlpdev1
+  test = /t3/envs/wlptest1
+}
+
+*weblogic.ExecuteQueue
+{
+  qa = 100
+  prod = 100
+  dev = 15
+  test = 15
+}
+
+*weblogic.IAExtension.SiteMinderAdmin
+{
+  qa = t3admin
+  prod = t3admin
+  dev = siteminder
+  test = siteminder
+}
+
+*weblogic.IAExtension.SiteMinderAdminPassword
+{
+  qa = 42T3amm
+  prod = {3DES}FZxvhDswJrc=
+  dev = {3DES}3x8+x75ipmk=
+  test = {3DES}PeLrMhffwaQ=
+}
+
+*weblogic.NovellAuthenticator.host
+{
+  qa = smtbgq15.tms.toyota.com
+  prod = smtbgp05.tms.toyota.com
+  dev = smtbgd01
+  test = tau.tms.toyota.com
+}
+
+*weblogic.NovellAuthenticator.password
+{
+  qa = intPortalBrokert3
+  prod = intPortalBrokert3
+  dev = intportalbrokert3
+  test = intPortalBrokert3
+}
+
+*weblogic.NovellAuthenticator.principal
+{
+  qa = cn=T3intPortalBroker,ou=svcaccounts,ou=spec,o=teds
+  prod = cn=T3intPortalBroker,ou=svcaccounts,ou=spec,o=teds
+  dev = cn=T3intPortalBroker,ou=svcaccounts,ou=spec,o=teds
+  test = cn=T3intPortalBroker,ou=svcaccounts,ou=spec,o=teds
+}
+
+*weblogic.additional.security
+{
+  qa = Security:Name=myrealmIAExtension
+  prod = Security:Name=myrealmIAExtension
+  dev = Security:Name=myrealmIAExtension
+  test = Security:Name=myrealmIAExtension
+}
+
+*weblogic.admin.host
+{
+  qa = smpqsq01
+  prod = smpqsp01
+  dev = smpqsd01
+  test = smpqst01
+}
+
+*weblogic.admin.port
+{
+  qa = 7021
+  prod = 7021
+  dev = 7021
+  test = 7021
+}
+
+*weblogic.admin.sslport
+{
+  qa = 7022
+  prod = 7022
+  dev = 7022
+  test = 7022
+}
+
+*weblogic.database.SID
+{
+  qa = T3IA
+  prod = T3IP
+  dev = T3DD
+  test = T3DT
+}
+
+*weblogic.database.password
+{
+  qa = t3wlpint
+  prod = t3wlpintprod
+  dev = t3wlpint
+  test = t3wlpint
+}
+
+*weblogic.database.port
+{
+  qa = 1521
+  prod = 1521
+  dev = 1521
+  test = 1521
+}
+
+*weblogic.database.server
+{
+  qa = hppqsq11
+  prod = hppqsp11
+  dev = hppqsd01
+  test = hppqsd01
+}
+
+*weblogic.database.user
+{
+  qa = t3wlpint
+  prod = t3wlpint
+  dev = t3wlpint
+  test = t3wlpint
+}
+
+*weblogic.debug.port
+{
+  qa = 8023
+  prod = 8023
+  dev = 8023
+  test = 8023
+}
+
+*weblogic.domain.name
+{
+  qa = iPortal
+  prod = iPortal
+  dev = iPortal
+  test = iPortal
+}
+
+*weblogic.system.password
+{
+  qa = password
+  prod = password
+  dev = password
+  test = password
+}
+
+*weblogic.system.user
+{
+  qa = system
+  prod = system
+  dev = system
+  test = system
+}
+
+*weblogic.ver
+{
+  qa = weblogic81
+  prod = weblogic81
+  dev = weblogic81
+  test = weblogic81
+}
+
+*weblogicxml.jsp.debug
+{
+  qa = false
+  prod = false
+  dev = true
+  test = true
+}
+
+*weblogicxml.jsp.pageCheckSeconds
+{
+  qa = -1
+  prod = -1
+  dev = 1
+  test = 1
+}
+
+*weblogicxml.jsp.precompile
+{
+  qa = true
+  prod = true
+  dev = false
+  test = false
+}
+
+*weblogicxml.jsp.precompileContinue
+{
+  qa = true
+  prod = true
+  dev = false
+  test = false
+}
+
+*weblogicxml.publisher.local-path
+{
+  qa = /t3/data/pub
+  prod = /t3/data/pub
+  dev = /t3/data/pub
+  test = /t3/data/pub
+}
+
+*weblogicxml.staticcontent.local-path
+{
+  qa = /t3/data
+  prod = /t3/data
+  dev = /t3/data
+  test = /t3/data
+}
+
+*webxml.auth-method
+{
+  qa = CLIENT-CERT
+  prod = CLIENT-CERT
+  dev = CLIENT-CERT
+  test = CLIENT-CERT
+}
+
+*win.bea.dir
+{
+  qa = /bea
+  prod = /bea
+  dev = /bea
+  test = /bea
+}
+
+*win.cvsroot.dir
+{
+  qa = /dev
+  prod = /dev
+  dev = /dev
+  test = /dev
+}
+
+*win.deploy.dir
+{
+  qa = /dev/t3/library/deploy
+  prod = /dev/t3/library/deploy
+  dev = /dev/t3/library/deploy
+  test = /dev/t3/library/deploy
+}
+



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org