shuber      2005/01/25 15:35:13 CET

  Modified files:
    core                 maven.xml project.properties 
  Log:
  deploy:tomcat and undeploy:tomcat goals should now also install shared 
libraries and context descriptors files on both Tomcat 4 and 5, but a new 
setting called catalina.version.major=5 must be set.
  
  Revision  Changes    Path
  1.25      +28 -37    jahia/core/maven.xml
http://jahia.mine.nu:8080/cgi-bin/cvsweb.cgi/jahia/core/maven.xml.diff?r1=1.24&r2=1.25&f=h
  1.16      +4 -0      jahia/core/project.properties
http://jahia.mine.nu:8080/cgi-bin/cvsweb.cgi/jahia/core/project.properties.diff?r1=1.15&r2=1.16&f=h
  
  
  
  Index: maven.xml
  ===================================================================
  RCS file: /home/cvs/repository/jahia/core/maven.xml,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- maven.xml 11 Jan 2005 11:24:34 -0000      1.24
  +++ maven.xml 25 Jan 2005 14:35:12 -0000      1.25
  @@ -4,14 +4,10 @@
            xmlns:ant="jelly:ant">
   
     <!-- ================================================================ -->
  -  <!-- Deploy to Catalina and Expand                                    -->
  +  <!-- Hot-Deploy to Catalina                                           -->
     <!-- ================================================================ -->
   
  -  <preGoal name="hotdeploy:tomcat">
  -     <attainGoal name="war:webapp"/>
  -  </preGoal>
  -
  -  <goal name="hotdeploy:tomcat">
  +  <goal name="hotdeploy:tomcat" prereqs="war:webapp">
        <echo message="Hot deploying ${pom.id}, ${pom.name}"/>
         <copy todir="${deploy.war.dir}/${webapp.name}">
           <fileset dir="./target/jahia"/>
  @@ -23,39 +19,34 @@
     <!-- Deploy to Catalina and Expand                                    -->
     <!-- ================================================================ -->
   
  -  <preGoal name="deploy:tomcat">
  -     <echo message="Executing deploy:tomcat pregoal"/>
  -     <attainGoal name="war:war"/>
  -  </preGoal>
  -
  -  <goal name="deploy:tomcat">
  -     <echo message="Deploying ${pom.id}, ${pom.name}"/>
  -      <delete dir="${deploy.war.dir}/${webapp.name}"/>
  -      <!--copy  file="./target/${webapp.name}.war" 
tofile="${deploy.war.dir}/${webapp.name}.war"/-->
  -      <unwar src="./target/${webapp.name}.war" 
dest="${deploy.war.dir}/${webapp.name}"/>
  -      <copy  file="./src/conf/metadata/jahia.xml" 
tofile="${deploy.contextdescriptor.dir}/jahia.xml"/>
  -      <attainGoal name="catalina:deploy-shared" />
  +  <goal name="deploy:tomcat" 
prereqs="jahia:deploy-tomcat,jahia:deploy-shared-libs">
  +      <j:set var="catalina_version_major" value="${catalina.version.major}"/>
  +      <j:choose>
  +        <j:when test="${catalina_version_major == '5'}" >
  +          <j:set var="context_dir" 
value="${catalina.home.dir}/conf/Catalina/localhost"/>
  +          <j:set var="use_contextclassloader" 
value='useContextClassLoader="false"'/>
  +        </j:when>
  +        <j:otherwise>
  +          <j:set var="context_dir" value="${deploy.war.dir}"/>
  +          <j:set var="use_contextclassloader" value=""/>
  +        </j:otherwise>
  +      </j:choose>
  +     <copy file="./src/conf/metadata/jahia.xml" 
tofile="${context_dir}/jahia.xml"/>
     </goal>
   
  -  <!-- ================================================================ -->
  -  <!-- Files to deploy to shared library                                -->
  -  <!-- ================================================================ -->
  -  <goal name="catalina:deploy-shared"
  -        description="Installed required libs into Catalina shared lib 
directory">
  -    <echo>Copying from ${maven.repo.local} to 
${catalina.shared.lib}...</echo>
  -    <copy file="${maven.repo.local}/pluto/jars/pluto-1.0.1-SNAPSHOT.jar" 
todir="${catalina.shared.lib}"/>
  -    <copy file="${maven.repo.local}/commons-lang/jars/commons-lang-2.0.jar" 
todir="${catalina.shared.lib}"/>
  -    <copy 
file="${maven.repo.local}/commons-logging/jars/commons-logging-1.0.3.jar" 
todir="${catalina.shared.lib}"/>
  -    <copy 
file="${maven.repo.local}/commons-configuration/jars/commons-configuration-1.0-dev.jar"
 todir="${catalina.shared.lib}"/>
  -    <copy file="${maven.repo.local}/log4j/jars/log4j-1.2.8.jar" 
todir="${catalina.shared.lib}"/>
  -    <!--
  -    <copy 
file="${maven.repo.local}/struts-portlet/jars/struts-portlet-spi-0.1.jar" 
todir="${catalina.shared.lib}"/>
  -    -->
  -    <!--
  -    <copy file="./lib/jetspeed2/jetspeed-commons-2.0-a1-dev.jar" 
todir="${catalina.shared.lib}"/>
  -    <copy file="${maven.repo.local}/portlet-api/jars/portlet-api-1.0.jar" 
todir="${catalina.shared.lib}"/>
  -    <copy file="./lib/jetspeed2/jetspeed-api-2.0-a1-dev.jar" 
todir="${catalina.shared.lib}"/>
  -    -->
  +  <goal name="undeploy:tomcat" 
prereqs="jahia:undeploy-tomcat,jahia:undeploy-shared-libs">
  +      <j:set var="catalina_version_major" value="${catalina.version.major}"/>
  +      <j:choose>
  +        <j:when test="${catalina_version_major == '5'}" >
  +          <j:set var="context_dir" 
value="${catalina.home.dir}/conf/Catalina/localhost"/>
  +          <j:set var="use_contextclassloader" 
value='useContextClassLoader="false"'/>
  +        </j:when>
  +        <j:otherwise>
  +          <j:set var="context_dir" value="${deploy.war.dir}"/>
  +          <j:set var="use_contextclassloader" value=""/>
  +        </j:otherwise>
  +      </j:choose>
  +     <delete file="${context_dir}/jahia.xml"/>
     </goal>
   
     <goal name="update:jetspeed2"
  
  
  
  Index: project.properties
  ===================================================================
  RCS file: /home/cvs/repository/jahia/core/project.properties,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- project.properties        11 Jan 2005 11:24:34 -0000      1.15
  +++ project.properties        25 Jan 2005 14:35:12 -0000      1.16
  @@ -16,6 +16,8 @@
   maven.war.jarclasses.name=${pom.artifactId}-${pom.currentVersion}.jar
   # set to true if you only want the *.class files in the JAR, false will 
include the whole contents of WEB-INF/classes
   maven.war.jarclasses.justclasses=true
  +# Set to true if you want to exclude some libraries from packaging, which 
will usually be then inserted as shared libraries.
  +maven.jahiawar.usesharedlibs=true
   
   maven.repo.remote = http://maven.jahia.org, 
http://www.bluesunrise.com/maven/, http://www.ibiblio.org/maven/, 
http://www.day.com/maven/
   
  @@ -46,6 +48,8 @@
   # Tomcat deployment locations
   tomcat.home=${catalina.home.dir}
   catalina.shared.lib=${catalina.home.dir}/shared/lib/
  +# Set this to Tomcat's major version to change deployment of jahia.xml 
location.
  +#catalina.version.major=4
   webapp.name=jahia
   deploy.war.dir=${catalina.home.dir}/webapps/
   deploy.contextdescriptor.dir=${deploy.war.dir}
  

Reply via email to