portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tay...@apache.org
Subject cvs commit: jakarta-jetspeed-2/portal/src/webapp/WEB-INF/db/hsql Registry.script
Date Tue, 07 Oct 2003 04:44:52 GMT
taylor      2003/10/06 21:44:52

  Modified:    .        maven.xml
               cps/src/test/org/apache/jetspeed/cps/rewriter
                        TestRewriterRules.java
               cps/test/rewriter test-001-output.html
               portal/src/webapp/WEB-INF/conf jetspeed.properties
               portal/src/webapp/WEB-INF/db/hsql Registry.script
  Log:
  Good to be back ;) although Pluto has changed again
  
  - CPS test was failing when called from allBuild root task, but not from the CPS directory.
    I was under the impression the the maven reactor's basedir tag would chdir, but it does
not.
    This breaks the unit test for CPS, which depend on a certain relative directory structure.
    I couldn't figure out how to get the reactor to chdir. Nor could I find an ant task to
chdir.
    This lack of sleep must be making me dense, because surely there must be a chdir in ant?
    Anway we'll figure it out tomorrow, but for now the unit test runs from allBuild.
  
  - Changed over to the new Pluto jar for catalina:shared target
  
  - disabled Preferences Validator until a can review the Pluto code and see whats changed
with the last code drop
    (and i do mean last!)
  
  - Deployed Jetspeed to Tomcat 5.
    Some of the demo portlets are running, others are crashing.
    This is caused by the latest changes to Pluto. Will have a look at it first thing in morning
  
  Revision  Changes    Path
  1.4       +2 -2      jakarta-jetspeed-2/maven.xml
  
  Index: maven.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/maven.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- maven.xml	16 Aug 2003 02:26:14 -0000	1.3
  +++ maven.xml	7 Oct 2003 04:44:52 -0000	1.4
  @@ -105,8 +105,8 @@
   
     <goal name="catalina:base-shared"
           description="Copy all base jars necessary for common container">
  -<echo>Copying from ${maven.repo.local} to ${catalina.shared.lib}...</echo>
  -    <copy file="${maven.repo.local}/pluto-container/jars/pluto-0.46.jar" todir="${catalina.shared.lib}"/>
  +    <echo>Copying from ${maven.repo.local} to ${catalina.shared.lib}...</echo>
  +    <copy file="${maven.repo.local}/pluto-container/jars/pluto-0.1-dev-unreleased.jar"
todir="${catalina.shared.lib}"/>
       <copy file="${maven.repo.local}/commons-lang/jars/commons-lang-1.0.1.jar" todir="${catalina.shared.lib}"/>
       <copy file="${maven.repo.local}/commons-logging/jars/commons-logging-1.0.2.jar"
todir="${catalina.shared.lib}"/>
       <copy file="${maven.repo.local}/commons-configuration/jars/commons-configuration-1.0-dev.jar"
todir="${catalina.shared.lib}"/>
  
  
  
  1.4       +68 -7     jakarta-jetspeed-2/cps/src/test/org/apache/jetspeed/cps/rewriter/TestRewriterRules.java
  
  Index: TestRewriterRules.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/cps/src/test/org/apache/jetspeed/cps/rewriter/TestRewriterRules.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- TestRewriterRules.java	3 Oct 2003 00:06:21 -0000	1.3
  +++ TestRewriterRules.java	7 Oct 2003 04:44:52 -0000	1.4
  @@ -55,6 +55,7 @@
   
   import java.io.FileReader;
   import java.io.FileWriter;
  +import java.io.IOException;
   import java.util.Iterator;
   
   
  @@ -114,7 +115,7 @@
           assertNotNull("rewriter service is null", service);
           Rewriter basic = service.createRewriter();
           assertNotNull("basic rewriter is null", basic);
  -        FileReader reader = new FileReader("./test/rewriter/test-rewriter-rules.xml");
 
  +        FileReader reader = getTestReader("test-rewriter-rules.xml");  
           Ruleset ruleset = service.loadRuleset(reader);
           assertNotNull("ruleset is null", ruleset);
           RulesetRewriter rewriter = service.createRewriter(ruleset);
  @@ -122,12 +123,14 @@
           assertNotNull("ruleset is null", rewriter.getRuleset());                      
 
       }
           
  +
  +            
       public void testRules()
                 throws Exception
       { 
           RewriterService service = (RewriterService)CommonPortletServices.getPortalService(RewriterService.SERVICE_NAME);
           assertNotNull("rewriter service is null", service);
  -        FileReader reader = new FileReader("./test/rewriter/test-rewriter-rules.xml");
 
  +        FileReader reader = getTestReader("test-rewriter-rules.xml");  
           Ruleset ruleset = service.loadRuleset(reader);
           assertNotNull("ruleset is null", ruleset);
           assertEquals("ruleset id", "test-set-101", ruleset.getId());
  @@ -227,16 +230,18 @@
           RewriterService service = (RewriterService)CommonPortletServices.getPortalService(RewriterService.SERVICE_NAME);
           assertNotNull("rewriter service is null", service);
           
  -        FileReader reader = new FileReader("./test/rewriter/test-remove-rules.xml");  
  +        FileReader reader = getTestReader("test-remove-rules.xml");  
  +          
           Ruleset ruleset = service.loadRuleset(reader);
           reader.close();
           assertNotNull("ruleset is null", ruleset);
           RulesetRewriter rewriter = service.createRewriter(ruleset);
           assertNotNull("ruleset rewriter is null", rewriter);
           assertNotNull("ruleset is null", rewriter.getRuleset());
  +
           
  -        FileReader htmlReader = new FileReader("./test/rewriter/test-001.html");
  -        FileWriter htmlWriter = new FileWriter("./test/rewriter/test-001-output.html");
  +        FileReader htmlReader = getTestReader("test-001.html");
  +        FileWriter htmlWriter = getTestWriter("test-001-output.html");
           
           ParserAdaptor adaptor = service.createParserAdaptor("text/html");
           rewriter.setBaseUrl("http://www.rewriter.com");
  @@ -245,7 +250,7 @@
           htmlReader.close();    
   
           // validate result        
  -        FileReader testReader = new FileReader("./test/rewriter/test-001-output.html");
 
  +        FileReader testReader = getTestReader("test-001-output.html");  
           UnitTestRewriter testRewriter = new UnitTestRewriter();
           testRewriter.parse(service.createParserAdaptor("text/html"), testReader);
           assertTrue("1st rewritten anchor: " + testRewriter.getAnchorValue("1"), 
  @@ -262,6 +267,62 @@
                           testRewriter.getAnchorValue("6").equals("#INTERNAL"));
                           
           assertTrue("Paragraph text: " + testRewriter.getParagraph(), testRewriter.getParagraph().equals("This
is a test"));
  +    }
  +
  +    /**
  +     * Gets a reader for a given filename in the test directory. 
  +     * This unit test tries to work from within a Maven reactor or from
  +     * within a normal Maven unit test task. This is a hack but I can't find a way to
  +     * get Maven to change directories. I thought the basedir attribute would do so, but
its 
  +     * failing making me think its a bug in maven, or just my misunderstanding of reactors.
  +     * TODO: deprecate this when I someone figures out the basedir attribute
  +     * 
  +     * @return A file reader to the test rules file
  +     * @throws IOException
  +     */
  +    private FileReader getTestReader(String filename)
  +        throws IOException
  +    {
  +        String cwd = System.getProperty("user.dir");
  +        String path;
  +        
  +        if (cwd.endsWith("jakarta-jetspeed-2"))
  +        {
  +            path = "./cps/test/rewriter/" + filename;             
  +        }
  +        else
  +        {
  +            path = "./test/rewriter/" + filename;             
  +        }
  +        return new FileReader(path);
  +    }
  +
  +    /**
  +     * Gets a writer for a given filename in the test directory. 
  +     * This unit test tries to work from within a Maven reactor or from
  +     * within a normal Maven unit test task. This is a hack but I can't find a way to
  +     * get Maven to change directories. I thought the basedir attribute would do so, but
its 
  +     * failing making me think its a bug in maven, or just my misunderstanding of reactors.
  +     * TODO: deprecate this when I someone figures out the basedir attribute
  +     * 
  +     * @return A file reader to the test rules file
  +     * @throws IOException
  +     */
  +    private FileWriter getTestWriter(String filename)
  +        throws IOException
  +    {
  +        String cwd = System.getProperty("user.dir");
  +        String path;
  +        
  +        if (cwd.endsWith("jakarta-jetspeed-2"))
  +        {
  +            path = "./cps/test/rewriter/" + filename;             
  +        }
  +        else
  +        {
  +            path = "./test/rewriter/" + filename;             
  +        }
  +        return new FileWriter(path);
       }
           
   }
  
  
  
  1.4       +3 -3      jakarta-jetspeed-2/cps/test/rewriter/test-001-output.html
  
  Index: test-001-output.html
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/cps/test/rewriter/test-001-output.html,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- test-001-output.html	3 Oct 2003 00:06:21 -0000	1.3
  +++ test-001-output.html	7 Oct 2003 04:44:52 -0000	1.4
  @@ -1,8 +1,8 @@
   <p>
   This is a test</p>
  -<a name="1" target="_BLANK" href="http://www.bluesunrise.com/suffix">keep this</a>
  - <a name="2" target="_BLANK" href="http://www.rewriter.com/stuff/junk/stuffedjunk.html/suffix">junk</a>
  - <a name="3" target="_BLANK" href="http://www.rewriter.com/stuff/junk/stuffedjunk.html/suffix">junk2</a>
  +<a name="1" href="http://www.bluesunrise.com/suffix" target="_BLANK">keep this</a>
  + <a name="2" href="http://www.rewriter.com/stuff/junk/stuffedjunk.html/suffix" target="_BLANK">junk</a>
  + <a name="3" href="http://www.rewriter.com/stuff/junk/stuffedjunk.html/suffix" target="_BLANK">junk2</a>
    <a name="4" href="javascript:whatever()">script</a>
    <a name="5" href="mailto:david@bluesunrise.com">script</a>
    <a name="6" href="#INTERNAL">internal</a>
  
  
  
  1.5       +2 -2      jakarta-jetspeed-2/portal/src/webapp/WEB-INF/conf/jetspeed.properties
  
  Index: jetspeed.properties
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/portal/src/webapp/WEB-INF/conf/jetspeed.properties,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- jetspeed.properties	13 Aug 2003 21:32:04 -0000	1.4
  +++ jetspeed.properties	7 Oct 2003 04:44:52 -0000	1.5
  @@ -81,7 +81,7 @@
   plutofactory.javax.portlet.ActionResponse = org.apache.pluto.factory.impl.ActionResponseFactoryImpl
   plutofactory.javax.portlet.PortletURL = org.apache.pluto.factory.impl.PortletURLFactoryImpl
   plutofactory.javax.portlet.PortletPreferences = org.apache.pluto.factory.impl.PortletPreferencesFactoryImpl
  -plutofactory.javax.portlet.PreferencesValidator = org.apache.pluto.factory.impl.PreferencesValidatorFactoryImpl
  +# PROBLEM plutofactory.javax.portlet.PreferencesValidator = org.apache.pluto.factory.impl.PreferencesValidatorFactoryImpl
   
   plutofactory.org.apache.pluto.invoker.PortletInvoker = org.apache.jetspeed.container.invoker.PortletInvokerFactoryImpl
   
  
  
  
  1.5       +2 -2      jakarta-jetspeed-2/portal/src/webapp/WEB-INF/db/hsql/Registry.script
  
  Index: Registry.script
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/portal/src/webapp/WEB-INF/db/hsql/Registry.script,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- Registry.script	7 Oct 2003 00:17:33 -0000	1.4
  +++ Registry.script	7 Oct 2003 04:44:52 -0000	1.5
  @@ -9,11 +9,11 @@
   CREATE TABLE OJB_DMAP_ENTRIES(ID INTEGER NOT NULL PRIMARY KEY,DMAP_ID INTEGER,KEY_OID LONGVARBINARY,VALUE_OID
LONGVARBINARY)
   CREATE TABLE PORTLET_APPLICATION(APPLICATION_ID INTEGER NOT NULL PRIMARY KEY,APP_NAME VARCHAR(80)
NOT NULL,APP_IDENTIFIER VARCHAR(80),VERSION VARCHAR(80),DESCRIPTION VARCHAR(80),WEB_APP_ID
INTEGER NOT NULL,CONSTRAINT UK_APPLICATION UNIQUE(APP_NAME))
   CREATE TABLE WEB_APPLICATION(ID INTEGER NOT NULL PRIMARY KEY,CONTEXT_ROOT VARCHAR(255)
NOT NULL)
  -CREATE TABLE PORTLET_DEFINITION(ID INTEGER NOT NULL PRIMARY KEY,NAME VARCHAR(80),CLASS_NAME
VARCHAR(100),APPLICATION_ID INTEGER NOT NULL,PORTLET_IDENTIFIER VARCHAR(80),EXPIRATION_CACHE
VARCHAR(30),CONSTRAINT SYS_CT_2 UNIQUE(APPLICATION_ID,NAME))
  +CREATE TABLE PORTLET_DEFINITION(ID INTEGER NOT NULL PRIMARY KEY,NAME VARCHAR(80),CLASS_NAME
VARCHAR(100),APPLICATION_ID INTEGER NOT NULL,PORTLET_IDENTIFIER VARCHAR(80),EXPIRATION_CACHE
VARCHAR(30),PREFERENCE_VALIDATOR VARCHAR(255),CONSTRAINT SYS_CT_2 UNIQUE(APPLICATION_ID,NAME))
   CREATE TABLE LANGUAGE(ID INTEGER NOT NULL PRIMARY KEY,PORTLET_ID INTEGER NOT NULL,TITLE
VARCHAR(100),SHORT_TITLE VARCHAR(50),LOCALE_STRING VARCHAR(50) NOT NULL,KEYWORDS LONGVARCHAR)
   CREATE TABLE PORTLET_CONTENT_TYPE(CONTENT_TYPE_ID INTEGER NOT NULL PRIMARY KEY,PORTLET_ID
INTEGER NOT NULL,CONTENT_TYPE VARCHAR(30) NOT NULL,MODES LONGVARCHAR)
   CREATE TABLE PARAMETER(PARAMETER_ID INTEGER NOT NULL PRIMARY KEY,PARENT_ID INTEGER NOT
NULL,CLASS_NAME VARCHAR(30) NOT NULL,NAME VARCHAR(80) NOT NULL,VALUE LONGVARCHAR NOT NULL)
  -CREATE TABLE PORTLET_PREFERENCE(ID INTEGER NOT NULL PRIMARY KEY,PARENT_ID INTEGER NOT NULL,NAME
VARCHAR(80) NOT NULL,TYPE VARCHAR(30) NOT NULL)
  +CREATE TABLE PORTLET_PREFERENCE(ID INTEGER NOT NULL PRIMARY KEY,PARENT_ID INTEGER NOT NULL,NAME
VARCHAR(80) NOT NULL,TYPE VARCHAR(30) NOT NULL,READ_ONLY CHAR(1) DEFAULT '1')
   CREATE TABLE PREFERENCE_VALUE(PREFERENCE_ID INTEGER NOT NULL,ID INTEGER NOT NULL,VALUE
LONGVARCHAR,CONSTRAINT PK PRIMARY KEY(PREFERENCE_ID,ID))
   CREATE TABLE PORTLET_ENTITY(ID INTEGER NOT NULL PRIMARY KEY,PORTLET_DEFINITION_ID INTEGER
NOT NULL,GUID VARCHAR(50) NOT NULL)
   CREATE TABLE USER_PORTLET_PREFERENCE(ID INTEGER NOT NULL PRIMARY KEY,PORTLET_ENTITY_ID
INTEGER NOT NULL,USER_NAME VARCHAR(50),NAME VARCHAR(80) NOT NULL)
  
  
  

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


Mime
View raw message