NIHVIVO-2811 Make the webapp directory more closely resemble the product base directory - move tlds, filegraph, ontologies, dwr.xml and web.xml into web/WEB-INF. Adjust the build script accordingly.

This commit is contained in:
j2blake 2011-09-08 17:17:16 +00:00
parent d7f361c418
commit def608dcda

View file

@ -117,7 +117,7 @@ deploy - Deploy the application directly into the Tomcat webapps directory.
</not> </not>
</condition> </condition>
</fail> </fail>
<property name="solr.home" location="${vitro.home.directory}/solr" /> <property name="solr.home" location="${vitro.home.directory}/solr" />
</target> </target>
@ -138,7 +138,7 @@ deploy - Deploy the application directly into the Tomcat webapps directory.
<mkdir dir="${war-resources.dir}" /> <mkdir dir="${war-resources.dir}" />
<mkdir dir="${test-classes.dir}" /> <mkdir dir="${test-classes.dir}" />
<!-- copy the themes into the war directory. --> <!-- copy all sorts of web stuff (with or without themes) into the war directory. -->
<copy todir="${war.dir}"> <copy todir="${war.dir}">
<fileset dir="${webapp.dir}/web"> <fileset dir="${webapp.dir}/web">
<!-- <!--
@ -149,18 +149,14 @@ deploy - Deploy the application directly into the Tomcat webapps directory.
</fileset> </fileset>
</copy> </copy>
<!-- copy the config files into the war directory. -->
<copy todir="${war-webinf.dir}"> <copy todir="${war-webinf.dir}">
<fileset file="${webapp.dir}/config/web.xml" /> <fileset dir="${webapp.dir}">
<fileset file="${webapp.dir}/config/dwr.xml" /> <!-- copy the JARs into the war directory -->
</copy> <include name="lib/*" />
<!-- these are already in Tomcat: we mustn't conflict. -->
<!-- copy the ontologies and the filegraphs into the war directory. --> <exclude name="lib/jsp-api.jar" />
<copy todir="${war-webinf.dir}"> <exclude name="lib/servlet-api.jar" />
<fileset dir="${webapp.dir}" includes="ontologies" /> </fileset>
<fileset dir="${webapp.dir}" includes="ontologies/**/*" />
<fileset dir="${webapp.dir}" includes="filegraph" />
<fileset dir="${webapp.dir}" includes="filegraph/**/*" />
</copy> </copy>
<!-- use the production Log4J properties, unless a debug version exists. --> <!-- use the production Log4J properties, unless a debug version exists. -->
@ -176,30 +172,14 @@ deploy - Deploy the application directly into the Tomcat webapps directory.
</filterchain> </filterchain>
</copy> </copy>
<!-- copy the deploy.properties into the war directory -->
<copy todir="${war-classes.dir}"> <copy todir="${war-classes.dir}">
<!-- copy the deploy.properties into the war directory -->
<fileset file="${deploy.properties.file}" /> <fileset file="${deploy.properties.file}" />
</copy>
<!-- copy the custom tag libraries into the war directory --> <!-- copy any xml files from source tree to the war directory -->
<copy todir="${war-webinf.dir}/tlds">
<fileset dir="${webapp.dir}/config/tlds" includes="**/*" excludes="*.LCK" />
</copy>
<!-- copy any xml files from source tree to the war directory -->
<copy todir="${build.dir}/war/WEB-INF/classes">
<fileset dir="${webapp.dir}/src" includes="**/*.xml" /> <fileset dir="${webapp.dir}/src" includes="**/*.xml" />
</copy> </copy>
<!-- copy the JARs into the war directory -->
<copy todir="${war-lib.dir}">
<fileset dir="${webapp.dir}/lib">
<!-- these are already in Tomcat: we mustn't conflict. -->
<exclude name="jsp-api.jar" />
<exclude name="servlet-api.jar" />
</fileset>
</copy>
<!-- copy the servlet JARs into their own directory, to compile against. --> <!-- copy the servlet JARs into their own directory, to compile against. -->
<copy todir="${servletjars.dir}"> <copy todir="${servletjars.dir}">
<fileset dir="${webapp.dir}/lib"> <fileset dir="${webapp.dir}/lib">
@ -328,7 +308,7 @@ deploy - Deploy the application directly into the Tomcat webapps directory.
<!-- if no mask is define, go with an unsecured installation. --> <!-- if no mask is define, go with an unsecured installation. -->
<property name="vitro.local.solr.ipaddress.mask" value=".*" /> <property name="vitro.local.solr.ipaddress.mask" value=".*" />
<!-- Create the context configuration XML with expanded properties. --> <!-- Create the context configuration XML with expanded properties. -->
<copy tofile="${solr.context.config}" filtering="true"> <copy tofile="${solr.context.config}" filtering="true">
<fileset file="${solr.context.config.example}" /> <fileset file="${solr.context.config.example}" />
@ -343,7 +323,7 @@ deploy - Deploy the application directly into the Tomcat webapps directory.
- - - - - - - - - - - - - - - - - --> - - - - - - - - - - - - - - - - - -->
<target name="deploySolr" depends="prepareSolr" unless="noSolrDeploy"> <target name="deploySolr" depends="prepareSolr" unless="noSolrDeploy">
<unwar src="${solr.docbase}" dest="${tomcat.home}/webapps/${solr.context.name}" /> <unwar src="${solr.docbase}" dest="${tomcat.home}/webapps/${solr.context.name}" />
<copy todir="${tomcat.home}/conf/Catalina/localhost" overwrite="true" > <copy todir="${tomcat.home}/conf/Catalina/localhost" overwrite="true">
<fileset file="${solr.context.config}" /> <fileset file="${solr.context.config}" />
</copy> </copy>
</target> </target>