|
From: Marcelo V. <va...@us...> - 2005-11-21 03:02:47
|
Update of /cvsroot/jedit/plugins/ProjectViewer In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23402/ProjectViewer Modified Files: build.xml Log Message: - use the new common plugin build file for ProjectViewer. Index: build.xml =================================================================== RCS file: /cvsroot/jedit/plugins/ProjectViewer/build.xml,v retrieving revision 1.31 retrieving revision 1.32 diff -u -d -r1.31 -r1.32 --- build.xml 21 Nov 2005 02:13:38 -0000 1.31 +++ build.xml 21 Nov 2005 03:02:38 -0000 1.32 @@ -1,263 +1,86 @@ <!-- ================================================== --> <!-- Build file for the Project Viewer plugin --> -<!-- :tabSize=2:indentSize=4:noTabs=false: --> +<!-- :tabSize=4:indentSize=4:noTabs=false: --> <!-- :folding=explicit:collapseFolds=1: --> <!-- ================================================== --> -<project name="Project Viewer" default="build" basedir="."> - -<!-- Instructions for the ProjectViewer build file: - - - the "docbookx.dtd" property points to the location of the DocBook DTD - on your system, used when building the documentation. - - the "docboox.xsl" property should point to the location of the DocBook - style sheet on your system, or the documentation will not be built. - - "JarMaker.jar" and "InfoViewer.jar" should be in the directory pointed - by the "install.dir" property for compilation. - - set the "docs-proc.target" to "xalan" to use Xalan instead of xsltproc - to generate the documentation. - - if bulding a release version using the "build" taget, remember to create - the documentation first by calling the "docs" target. ---> +<project name="ProjectViewer" default="build" basedir="."> - <!-- ================================================ --> - <!-- Property definitions --> - <!-- ================================================ --> - <property file="build.properties"/> - <property file="../build.properties"/> - <property file="${user.home}/.build.properties"/> - <property file="${user.home}/build.properties"/> + <property name="javadoc.packagenames" value="projectviewer.*" /> + <property name="plugin.dependencies" value="ErrorList,InfoViewer" /> + <property name="dist.target" value="dist.complete" /> + <property name="user-doc.xsl" value="docs/users-guide.xsl" /> - <property name="jedit.install.dir" value="/usr/share/jedit/recent"/> - <property name="install.dir" value="${jedit.install.dir}/jars" /> - <property name="jedit.user.home" value="${user.home}/.jedit" /> - <property name="pvversion" value="2.1.2.0"/> + <import file="../build-support/plugin-build.xml" /> - <property name="jar.name" value="${ant.project.name}.jar"/> - <property name="docs-proc.target" value="xsltproc"/> + <!-- By default don't compile the debug plugin. --> + <selector id="compileFiles"> + <and> + <filename name="**/*.java" /> + <not> + <filename name="pvdebug/**" /> + </not> + </and> + </selector> - <property name="src" value="."/> - <property name="build" value="build"/> - <property name="build.classes" value="${build}/classes"/> - <property name="build.docs" value="${build}/docs"/> - <property name="build.javadoc" value="${build.docs}/javadoc"/> - <property name="build.doxydoc" value="${build.docs}/doxydoc"/> - <property name="build.images" value="${build}/images"/> + <!-- Remove the files from the debug plugin from the main + plugin's package. --> + <selector id="extraFiles"> + <and> + <or> + <filename name="**/actions.xml" /> + <filename name="**/dockables.xml" /> + <filename name="**/services.xml" /> + <filename name="**/*.props" /> + <filename name="**/LICENSE" /> + <filename name="**/README" /> + <filename name="projectviewer/images/**" /> + </or> + <not> + <filename name="pvdebug/**" /> + </not> + <not> + <filename name="${build.dir}/**" /> + </not> + </and> + </selector> - <!-- ================================================ --> - <!-- Classpath definitions --> - <!-- ================================================ --> - <path id="default.classpath"> - <pathelement location="${jedit.install.dir}/jedit.jar" /> - <pathelement location="${install.dir}/InfoViewer.jar" /> - <pathelement location="${install.dir}/ErrorList.jar" /> + <!-- Add InfoViewer and ErrorList to the classpath. --> + <path id="project.class.path"> <fileset dir=".."> <include name="*.jar" /> + <exclude name="ProjectViewer*" /> </fileset> + <pathelement location="${install.dir}/InfoViewer.jar" /> + <pathelement location="${install.dir}/ErrorList.jar" /> </path> - - <!-- ================================================ --> - <!-- Targets --> - <!-- ================================================ --> - - - <!-- ================================================ --> - <target name="compile" - description="Compile all main classes"> - - <mkdir dir="${build.classes}"/> - - <javac srcdir="${src}" - destdir="${build.classes}" - debug="${compiler.debug}" - optimize="${compiler.optimize}" - deprecation="${compiler.deprecation}" - verbose="${compiler.verbose}" - classpathref="default.classpath" > - <include name="projectviewer/*.java" /> - <include name="projectviewer/**/*.java" /> - </javac> - - </target> - - <!-- ================================================ --> - <target name="docs" - depends="javadoc" - description="Build the User's Guide and Javadoc documentation"> - - <delete file="docbook-wrapper.xsl" /> - <echo file="docbook-wrapper.xsl" - message="<xsl:stylesheet"/> - <echo file="docbook-wrapper.xsl" append="true" - message=" xmlns:xsl='http://www.w3.org/1999/XSL/Transform'"/> - <echo file="docbook-wrapper.xsl" append="true" - message=" version='1.0'>"/> - <echo file="docbook-wrapper.xsl" append="true" - message="<xsl:import href='${docbook.xsl}/html/docbook.xsl'/>"/> - <echo file="docbook-wrapper.xsl" append="true" - message="</xsl:stylesheet>"/> - - <antcall target="docs-${docs-proc.target}"/> - </target> - - <!-- ================================================ --> - <target name="build" - depends="compile" - description="Build the plugin"> - - <copy todir="${build.classes}"> - <fileset dir="${src}"> - <include name="projectviewer/**/*.props"/> - <include name="projectviewer/**/*.properties"/> - <include name="projectviewer/**/icons/*.gif"/> - </fileset> - </copy> - - <copy todir="${build.classes}"> - <fileset dir="${src}"> - <include name="actions.xml"/> - <include name="dockables.xml"/> - </fileset> - </copy> - - <mkdir dir="${build.docs}"/> - <copy todir="${build.docs}"> - <fileset dir="docs"> - <exclude name="**/*.xml"/> - <exclude name="**/*.xsl"/> - </fileset> - </copy> - - <mkdir dir="${build.images}"/> - <copy todir="${build.images}"> - <fileset dir="projectviewer/images"/> - </copy> - - <jar jarfile="${build}/ProjectViewer.jar"> - <fileset dir="${build.classes}"> - <exclude name="pvdebug/**" /> - </fileset> - <fileset dir="${build.docs}"> - <exclude name="**/javadoc/**" /> - </fileset> - <fileset dir="${build}"> - <include name="images/**"/> - </fileset> - </jar> - - <copy todir=".." file="${build}/ProjectViewer.jar" /> - </target> - - <!-- build.debug: builds the pvdebug plugin --> - <target name="build.debug" description="builds the debug plugin"> - - <javac srcdir="${src}" - debug="${compiler.debug}" - optimize="${compiler.optimize}" - deprecation="${compiler.deprecation}" - verbose="${compiler.verbose}" - classpathref="default.classpath" > - <include name="pvdebug/*.java" /> - </javac> - - <jar jarfile="${debug.target.dir}/ProjectViewerDebug.jar"> - <fileset dir="${src}"> + <!--{{{ Builds the debug plugin. --> + <target name="build.debug" + description="Builds the PV debug plugin and the test cases."> + <path id="project.class.path"> + <pathelement location="../ProjectViewer.jar" /> + <pathelement location="${jedit.install.dir}/jars/ProjectViewer.jar" /> + </path> + <jp.javac> + <and> + <filename name="**/*.java" /> + <not> + <filename name="projectviewer/**" /> + </not> + </and> + </jp.javac> + <runtarget target="compile" /> + <jar jarfile="${debug.target.dir}/ProjectViewerDebug.jar"> + <fileset dir="${build.classes}"> <include name="pvdebug/**.*" /> </fileset> - </jar> - - </target> - - <target name="clean.debug" description="cleans up the debug plugin"> - - <delete> - <fileset dir="${src}/pvdebug"> - <include name="**/*.class" /> + <fileset dir="${basedir}"> + <include name="pvdebug/**.*" /> + <exclude name="**/*.java" /> </fileset> - </delete> - - <delete file="${debug.target.dir}/ProjectViewerDebug.jar" /> - - </target> - - <!-- ================================================ --> - <target name="dist" - depends="docs,build" - description="Build a distribution"> - <zip zipfile="ProjectViewer-${pvversion}.zip"> - <fileset dir="${build}"> - <include name="projectviewer/**"/> - <include name="ProjectViewer.jar"/> - </fileset> - </zip> - </target> - - - <!-- ================================================ --> - <target name="deploy" - depends="dist" - description="Deploy the plugin"> - <unzip src="ProjectViewer-${pvversion}.zip" dest="${jedit.user.home}/jars"/> - <!-- - invoke 'jedit -run=reload_plugin.bsh' to reload the plugin - --> - </target> - - - <!-- ================================================ --> - <target name="javadoc" description="Generates javadoc sourcecode documentation"> - <mkdir dir="${build.javadoc}"/> - <javadoc sourcepath="${src}" - destdir="${build.javadoc}" - packagenames="projectviewer.*" - windowtitle="${ant.project.name} API" - classpathref="default.classpath"/> - </target> - - <target name="doxydoc" description="Generates doxygen sourcecode documentation"> - <mkdir dir="${build.doxydoc}"/> - <exec executable="doxygen"> - <arg value="doxyconf"/> - </exec> - </target> - - - <!-- ================================================ --> - <!-- Generate docs with xsltproc tool from www.xmlsoft.org --> - <target name="docs-xsltproc" description="Generate user documentation in hmtl format with xsltproc"> - <echo file="docbook.catalog" - message="PUBLIC '-//OASIS//DTD DocBook XML V4.1.2//EN' '${docbookx.dtd}'"/> - - <exec executable="xsltproc"> - <env key="SGML_CATALOG_FILES" value="docbook.catalog" /> - <arg value="-o"/> - <arg value="${build.docs}/index.html"/> - <arg value="--catalogs"/> - <arg value="docs/users-guide.xsl"/> - <arg value="docs/users-guide.xml"/> - </exec> - - <!--delete file="docbook.catalog" quiet="true" /--> - </target> - - - <!-- Generate docs with Xalan tool from xml.apache.org --> - <target name="docs-xalan" description="Generate user documentation in hmtl format with xalan"> - <style style="docs/users-guide.xsl" - in="docs/users-guide.xml" - out="${build.docs}/users-guide.html" > - <xmlcatalog> - <dtd publicId="-//OASIS//DTD DocBook XML V4.1.2//EN" - location="${docbookx.dtd}" /> - </xmlcatalog> - </style> - </target> - - <!-- ================================================ --> - <target name="clean" description="Cleans project directories"> - <delete dir="${build}"/> - <delete file="docbook-wrapper.xsl" /> - <delete file="ProjectViewer-${pvversion}.zip" /> + </jar> </target> + <!--}}}--> </project> + |