Okay.
To say it's just mine whould be wrong.
I'll have to share it, J 20/ 80 T, with Thomas F. Nicholaisen.
Warning ! This script is made for Magnolia 2.x.
<project name="magnolia-module" basedir="." default="default">
<description>
magnolia-module building
</description>
<!-- set global properties for this build -->
<!-- put the module in your webapps dir, then rename the value of
magnolia-dir to magnoliaPublic or magnoliaAuthor (or magnolia if you are
deving) -->
<!--for deving-->
<!--
<property name="magnolia-dir" value="magnolia/src/main/webapp"/>
-->
<!--for magnoliaPublic
<property name="magnolia-dir" value="magnoliaPublic" />
-->
<property name="module-name" value = "primetime" />
<property name="magnolia-dir" value="mm" />
<property name="docroot-source"
location="src/main/webapp/docroot/${module-name}" />
<property name="docroot-target"
location="../${magnolia-dir}/docroot/${module-name}" />
<property name="templates-source"
location="src/main/webapp/templates/jsp/${module-name}" />
<property name="templates-target"
location="../${magnolia-dir}/templates/jsp/${module-name}" />
<property name="magnolia-project-pom-target"
location="../magnolia-project/pom.xml" />
<property name="magnolia-project-pom-source"
location="poms/magnolia-project-pom.xml" />
<property name="magnolia-pom-target" location="../magnolia/pom.xml" />
<property name="magnolia-pom-source" location="poms/magnolia-pom.xml" />
<!--Copy from module to magnolia webapp-->
<target name="copy-templates" description="Copy the jsp templates into
the webapp module">
<copy todir="${templates-target}">
<fileset dir="${templates-source}"/>
</copy>
</target>
<target name="copy-docroot" description="Copy the docroot resources
into the webapp module">
<copy todir="${docroot-target}">
<fileset dir="${docroot-source}" />
</copy>
</target>
<target name="copy-magnolia-project-pom" description="Replace the
magnolia-project descriptor to include the webshop module">
<copy file="${magnolia-project-pom-source}"
tofile="${magnolia-project-pom-target}" />
</target>
<target name="copy-magnolia-pom" description="Replace the magnolia
descriptor to include deps for the webshop module">
<copy file="${magnolia-pom-source}"
tofile="${magnolia-pom-target}" />
</target>
<!--Copy from magnolia webapp back to module-->
<target name="reverse-copy-templates" description="Copy the jsp
templates from the webapp module">
<copy todir="${templates-source}">
<fileset dir="${templates-target}"/>
</copy>
</target>
<target name="reverse-copy-templates-samples-overwrite"
description="Copy the jsp templates into the webapp module">
<copy tofile="${templates-source-samples-overwrite1}"
file="${templates-target-samples-overwrite1}" />
<copy tofile="${templates-source-samples-overwrite2}"
file="${templates-target-samples-overwrite2}" />
</target>
<target name="reverse-copy-docroot" description="Copy the docroot
resources from the webapp module">
<copy todir="${docroot-source}">
<fileset dir="${docroot-target}" />
</copy>
</target>
<target name="reverse-copy-magnolia-project-pom" description="Replace
the magnolia-project descriptor to include the webshop module">
<copy file="${magnolia-project-pom-target}"
tofile="${magnolia-project-pom-source}" />
</target>
<target name="reverse-copy-magnolia-pom" description="Replace the
magnolia descriptor to include deps for the webshop module">
<copy file="${magnolia-pom-target}"
tofile="${magnolia-pom-source}" />
</target>
<!--Executables (run these)-->
<target name="default" depends="to-magnolia-for-dev"/>
<target name="to-magnolia-for-dev" depends="copy-templates,
copy-docroot, copy-magnolia-pom,
copy-magnolia-project-pom,copy-templates-samples-overwrite"/>
<target name="to-module-for-cvs" depends="reverse-copy-templates,
reverse-copy-templates-samples-overwrite, reverse-copy-docroot,
reverse-copy-magnolia-pom, reverse-copy-magnolia-project-pom"/>
<target name="clean" description="clean up">
<delete dir="${docroot-target}/" />
<delete dir="${templates-target}" />
</target>
<!-- Overwrite some paragraphs -->
<property name="paragraph-source"
location="src/main/webapp/templates/jsp/samples/paragraphs/" />
<property name="paragraph-target"
location="../${magnolia-dir}/templates/jsp/samples/paragraphs/" />
<target name="copy-templates-samples-overwrite" description="Copy the
jsp templates into the webapp module">
<copy todir="${paragraph-target}">
<fileset dir="${paragraph-source}" />
</copy>
</target>
</project>
phil campaigne wrote:
Jon Georg Beretsen wrote:
Could not agree more!
- Use Eclipse and Ant for development.
(Post your email and I'll send u my small, custom ant script for
template dev.)
Jon,
I'd like your "little ant script".
thanks,
Phil
----------------------------------------------------------------
for list details see
http://www.magnolia.info/en/magnolia/developer.html
----------------------------------------------------------------
----------------------------------------------------------------
for list details see
http://www.magnolia.info/en/magnolia/developer.html
----------------------------------------------------------------