Hi, I just started trying to get Graffito up and running on my machine and ran into some problem deploying Graffito into Jetspeed 2.  Basically, the current version of maven.xml in graffito/jetspeed2-deploy does a direct copy of src/assembly/jetspeed-spring.xml into the deployed Jetspeed directory (webapps/jetspeed/WEB-INF/assembly).  However, the jetspeed-spring.xml in Graffito seems out of date compared to the latest one from Jetspeed, causing some conflicts at runtime. 

 

I was able to fix this problem by modifying graffito/jetspeed2-deploy/maven.xml so that it dynamically inserts the two Graffito entries (i.e., ContentServer and ContentModel) into the deployed jetspeed-spring.xml.  The modified maven.xml also has some rudimentary protection against re-insertion for re-deployment by checking if the word “graffito” is already present in the jetspeed-spring.xml file.  Not a perfect solution, but should alleviate some of the issues associated with static file copying.  The modified maven.xml is attached.

 

I’m finally able to get the Graffito content browser portlet running inside of Jetspeed 2, although the buttons to add either folders or documents don’t work yet (I’ll continue digging into that problem).  Anyway, I thought I might share my two cents.  With limited exposure to Graffito, I hope this fix makes sense.  Or if there’s better way to handle this, please let me know.

 

I don’t know if this is the right venue to communicate this type of issues.  Or should I use Jira?

 

Thanks,

DerShung Yang

[EMAIL PROTECTED]

Bridge53, Inc.

 

 

<!-- 
 Copyright 2002-2004 The Apache Software Foundation

 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
 You may obtain a copy of the License at

     http://www.apache.org/licenses/LICENSE-2.0
 
  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
 -->
<project default="java:jar"
         xmlns:j="jelly:core"
         xmlns:define="jelly:define"
         xmlns:util="jelly:util"
         xmlns:reactor="reactor">


  <!-- ================================================================ -->
  <!-- Hot Deploy for mundane everyday development under Catalina       -->
  <!-- ================================================================ -->
  
  <goal name="deploy">	
    <copy todir="${org.apache.jetspeed.deploy.war.dir}/jetspeed/WEB-INF" overwrite="true">
      <fileset dir="${maven.src.dir}">
        <exclude name="assembly/jetspeed-spring.xml"/>
      </fileset>
    </copy>
    
    <!-- Insert Graffito's ContentServer and ContentModel into runtime  -->
    <!-- jetspeed-spring.xml under Catalina.                            -->
    <util:loadText file="${org.apache.jetspeed.deploy.war.dir}/jetspeed/WEB-INF/assembly/jetspeed-spring.xml"
                   var="jetspeedSpringXml"/>
    <j:if test="${jetspeedSpringXml.indexOf('graffito') lt 0}">
      <replaceregexp file="${org.apache.jetspeed.deploy.war.dir}/jetspeed/WEB-INF/assembly/jetspeed-spring.xml">
        <regexp pattern="(.+PortletRegistryComponent.+)" />
        <substitution expression="&lt;entry key=\&quot;ContentServer\&quot;&gt;&lt;ref bean=\&quot;org.apache.portals.graffito.ContentServerService\&quot;/&gt;&lt;/entry&gt;&lt;entry key=\&quot;ContentModel\&quot;&gt;&lt;ref bean=\&quot;org.apache.portals.graffito.ContentModelService\&quot;/&gt;&lt;/entry&gt;\1" />
      </replaceregexp>
    </j:if>
    
  </goal>
</project>

Reply via email to