Changeset 3953


Ignore:
Timestamp:
Nov 13, 2007, 1:36:12 PM (14 years ago)
Author:
Nicklas Nordborg
Message:
 
Location:
trunk
Files:
33 added
4 deleted
4 edited

Legend:

Unmodified
Added
Removed
  • trunk

    • Property svn:ignore
      •  

        old new  
        55.settings
        66testdata
         7package
         8examples
         9plugins
  • trunk/build.xml

    r3952 r3953  
    4848    test:         Build test programs
    4949    web:          Build web client application for local use
     50   
     51    Example code:
     52    examples:             Build all examples
     53    examples.plugins:     Build plug-in examples
     54    examples.webservices: Build webservices examples
    5055
    5156    Documentation:
    52     doc:          Build all documentation for local use
    53     docbook:      Build only html and pdf from docbook
     57    doc:          Build documentation for local use
     58    doc.javadoc:  Build javadoc for local use
     59    doc.docbook:  Build docbook documentation for local use
    5460    helptext:     Generate help text import file from the docbook documentation
    5561
    5662    Packaging:
    57     package:      Create *.tar.gz files with binary and source distributions
     63    package:          Create *.tar.gz files with binary, source and exampele distributions
     64    package.bin       Create binary distribution only
     65    package.src       Create source distribution only
     66    package.examples: Create examples distribution only
    5867  </description>
    5968
     
    7685  <property name="build" location="build" description="Location of compiled files" />
    7786  <property name="dist" location="dist" description="Directory where distribution should be created" />
     87  <property name="package" location="package" description="Directory where packaged distribution files are created"/>
     88  <property name="examples" location="examples" description="Directory where examples are beeing put together"/>
    7889  <property name="lib" location="lib" description="Location of 3rd-party JAR files" />
    7990  <property name="config.dist" location="config/dist"
     
    161172      <fileset dir="${build}" defaultexcludes="no" />
    162173      <fileset dir="${dist}" defaultexcludes="no" />
     174      <fileset dir="${package}" defaultexcludes="no" />
     175      <fileset dir="${examples}" defaultexcludes="no" />
    163176      <fileset dir="bin/jar" defaultexcludes="no" />
    164177      <fileset dir="misc/wsdl" defaultexcludes="no" />
     
    171184      <fileset dir="doc/html" defaultexcludes="no" />
    172185      <fileset file="doc/base.pdf" />
    173       <fileset file="doc/download/exampleplugins.tar.gz" />
    174186    </delete>
    175187  </target>
     
    178190    name="dist"
    179191    depends="clean,dist.init,core.jar,coreplugins.jar,web.jar,webservices.jar,webservices.wsdl,
    180       installprg.jar,jobagent.jar,migrate.jar,copy.config,copy.jar,doc,doc.dist"
     192      installprg.jar,jobagent.jar,migrate.jar,copy.config,copy.jar,examples,doc,doc.dist"
    181193    description="Create everything needed for distribution"
    182194    >
     
    207219  <target
    208220    name="package"
    209     depends="package.bin,package.src"
    210     description="Generate tar.gz files for the binary and source distribution"
     221    depends="package.bin,package.src,package.examples"
     222    description="Generate tar.gz files for the binary, source and examples distribution"
    211223    >
    212224  </target>
     
    214226  <target
    215227    name="dev"
    216     depends="dev.init,core,coreplugins,web,webservices,installprg,jobagent,migrate,test"
     228    depends="dev.init,core,coreplugins,web,webservices,installprg,jobagent,migrate,test,examples"
    217229    description="Create a runnable local installation"
    218230  />
     
    231243 
    232244  <target
    233     name="exampleplugins"
    234     depends="core,exampleplugins.jar"
    235     description="Build the example plugins for local use"
    236   />
    237  
    238   <target
    239245    name="test"
    240246    depends="test.jar,core.hibernate"
     
    289295  <target
    290296    name="doc"
    291     depends="doc.javadoc,exampleplugins.tar,doc.docbook"
    292     description="Generate documentation for local use"
     297    depends="doc.javadoc,doc.docbook"
     298    description="Generate documentation (javadoc and docbook) for local use and distribution"
    293299  />
    294300 
    295   <target
    296     name="docbook"
    297     depends="doc.docbook"
    298     description="Generate docbook documentation. This target is temporary.
    299       It will be included in the 'doc' target in the future."
     301  <target
     302    name="examples"
     303    depends="examples.plugins,examples.webservices"
     304    description="Create examples for local use and distribution"
    300305  />
    301306 
     
    645650  <!-- example plugin targets -->
    646651  <target
    647     name="exampleplugins.init"
     652    name="examples.plugins.init"
    648653    depends="core.init"
    649654    >
    650     <property name="exampledir" location="${src}/examples/plugins" />
    651     <property name="exampleplugins.src" location="${exampledir}/src"
     655    <property name="examples.plugins.dir" location="${src}/examples/plugins" />
     656    <property name="examples.plugins.src" location="${examples.plugins.dir}/src"
    652657      description="Location of source files" />
    653     <property name="exampleplugins.build" location="${build}/plugins/example"
     658    <property name="examples.plugins.build" location="${build}/plugins/example"
    654659      description="Location of compiled files" />
    655     <path id="exampleplugins.classpath" description="Class path for compiling plugins">
     660    <path id="examples.plugins.classpath" description="Class path for compiling plugins">
    656661      <path refid="core.classpath"/>
    657662      <pathelement location="${core.build}"/>
     
    660665 
    661666  <target
    662     name="exampleplugins.compile"
    663     depends="core.compile,exampleplugins.init"
     667    name="examples.plugins.compile"
     668    depends="core.compile,examples.plugins.init"
    664669    description="Compile the example plugins"
    665670    >
    666     <mkdir dir="${exampleplugins.build}" />
     671    <mkdir dir="${examples.plugins.build}" />
    667672    <javac
    668       srcdir="${exampleplugins.src}"
    669       destdir="${exampleplugins.build}"
    670       classpathref="exampleplugins.classpath"
     673      srcdir="${examples.plugins.src}"
     674      destdir="${examples.plugins.build}"
     675      classpathref="examples.plugins.classpath"
    671676      encoding="ISO-8859-1"
    672677      debug="true"
     
    678683 
    679684  <target
    680     name="exampleplugins.jar"
    681     depends="exampleplugins.compile"
     685    name="examples.plugins.jar"
     686    depends="examples.plugins.compile"
    682687    description="Create the example plugins jar file: ExamplePlugins.jar"
    683688    >
    684689    <mkdir dir="${plugins}" />
    685690    <jar
    686       basedir="${exampleplugins.build}"
     691      basedir="${examples.plugins.build}"
    687692      jarfile="${plugins}/ExamplePlugins.jar"
    688       manifest="${exampledir}/MANIFEST.MF"
    689       >
    690       <metainf file="${exampledir}/base-plugins.xml"></metainf>
    691        <metainf file="${exampledir}/base-configurations.xml"></metainf>
     693      manifest="${examples.plugins.dir}/META-INF/MANIFEST.MF"
     694      >
     695      <metainf file="${examples.plugins.dir}/META-INF/base-plugins.xml"></metainf>
     696       <metainf file="${examples.plugins.dir}/META-INF/base-configurations.xml"></metainf>
    692697    </jar>
    693698  </target>
    694 
    695   <target
    696     name="exampleplugins.tar"
    697     depends="exampleplugins.jar"
    698     description="Create a downloadable tar file with the example plugins"
    699     >
    700     <mkdir dir="${doc}/download" />
    701     <tar
    702       destfile="${doc}/download/exampleplugins.tar.gz"
    703       compression="gzip"
    704       >
    705       <tarfileset
    706         dir="${exampledir}"
    707         preserveLeadingSlashes="true"
    708       />
    709       <tarfileset
    710         dir="${exampleplugins.build}"
    711         prefix="bin"
    712         preserveLeadingSlashes="true"
    713       />
    714     </tar>
     699 
     700  <target
     701    name="examples.plugins"
     702    depends="examples.plugins.jar,core.jar"
     703    description="Put together the plugin examples in the examples/plugins directory"
     704    >
     705    <mkdir dir="${examples}/plugins" />
     706    <copy todir="${examples}/plugins">
     707      <fileset dir="${examples.plugins.dir}" />
     708      <fileset file="${plugins}/ExamplePlugins.jar" />
     709      <fileset file="base2.license.txt" />
     710    </copy>
     711    <copy todir="${examples}/plugins/bin">
     712      <fileset dir="${examples.plugins.build}" />
     713    </copy>
     714    <copy todir="${examples}/plugins/lib">
     715      <fileset file="${jar}/BASE2Core.jar" />
     716    </copy>
     717  </target>
     718
     719  <!-- webservices example targets -->
     720  <target
     721    name="examples.webservices.init"
     722    depends="webservices.init"
     723    >
     724    <property name="examples.webservices.dir" location="${src}/examples/webservices" />
     725    <property name="examples.webservices.src" location="${examples.webservices.dir}/src"
     726      description="Location of source files" />
     727    <property name="examples.webservices.build" location="${build}/webservices/example"
     728      description="Location of compiled files" />
     729    <path id="examples.webservices.classpath" description="Class path for compiling example">
     730      <path refid="lib.webservices.classpath"/>
     731      <pathelement location="${webservices.build}/client"/>
     732    </path>
     733  </target>
     734 
     735  <target
     736    name="examples.webservices.compile"
     737    depends="webservices.client.compile,examples.webservices.init"
     738    description="Compile the webservices example"
     739    >
     740    <mkdir dir="${examples.webservices.build}" />
     741    <javac
     742      srcdir="${examples.webservices.src}"
     743      destdir="${examples.webservices.build}"
     744      classpathref="examples.webservices.classpath"
     745      encoding="ISO-8859-1"
     746      debug="true"
     747      deprecation="true"
     748      >
     749      <compilerarg value="${javac.arg}" />
     750    </javac>
     751  </target>
     752 
     753  <target
     754    name="examples.webservices"
     755    depends="examples.webservices.compile,webservices.jar"
     756    description="Put together the webservices examples in the examples/webservices directory"
     757    >
     758    <mkdir dir="${examples}/webservices" />
     759    <copy todir="${examples}/webservices">
     760      <fileset  dir="${examples.webservices.dir}" />
     761      <fileset file="base2.license.txt" />
     762    </copy>
     763    <copy todir="${examples}/webservices/bin">
     764      <fileset  dir="${examples.webservices.build}" />
     765    </copy>
     766    <copy todir="${examples}/webservices/lib">
     767      <fileset  dir="${lib}/webservices" />
     768      <fileset file="${jar}/BASE2WSClient.jar" />
     769      <fileset dir="${lib}/dist" includes="commons-logging-*" />
     770      <fileset dir="${lib}/dist" includes="xerces-*" />
     771    </copy>
    715772  </target>
    716773 
     
    889946  <target
    890947    name="webservices.init"
    891     depends="core.init"
     948    depends="core.init,coreplugins.init"
    892949    >
    893950    <property name="webservices.src" location="${src}/webservices"
     
    9461003    name="webservices.server.compile"
    9471004    description="Compile the server part of webservices"
    948     depends="webservices.init,core.compile"
     1005    depends="webservices.init,core.compile,coreplugins.compile"
    9491006    >
    9501007    <mkdir dir="${webservices.build}/server" />
     
    10251082    >
    10261083    <mkdir dir="${config}/../services" />
     1084    <!-- server side: core.aar -->
    10271085    <jar
    10281086      basedir="${webservices.build}/server"
    10291087      jarfile="${config}/../services/core.aar"
    10301088    />
     1089    <!-- client side: BASE2WSClient.jar -->
    10311090    <jar
    10321091      jarfile="${jar}/BASE2WSClient.jar"
     
    14651524    description="Create binary distribution package"
    14661525    >
     1526    <mkdir dir="${package}" />
    14671527    <tar
    1468       destfile="base-${base.version}.tar.gz"
     1528      destfile="${package}/base-${base.version}.tar.gz"
    14691529      longfile="gnu"
    14701530      compression="gzip"
     
    14861546      </tarfileset>
    14871547    </tar>
    1488     <checksum file="base-${base.version}.tar.gz" />
     1548    <checksum file="${package}/base-${base.version}.tar.gz" />
    14891549  </target>
    14901550 
     
    15191579      description="Remove package.src target"
    15201580    />
     1581    <mkdir dir="${package}" />
    15211582      <tar
    1522       destfile="base-${base.version}-src.tar.gz"
     1583      destfile="${package}/base-${base.version}-src.tar.gz"
    15231584      longfile="gnu"
    15241585      compression="gzip"
     
    15401601      </tarfileset>
    15411602    </tar>
    1542     <checksum file="base-${base.version}-src.tar.gz"/>
     1603    <checksum file="${package}/base-${base.version}-src.tar.gz"/>
    15431604    <delete dir="${tempdir}" />
    15441605  </target>
    15451606 
     1607  <target
     1608    name="package.examples"
     1609    depends="package.examples.plugins,package.examples.webservices"
     1610  />
     1611 
     1612  <target
     1613    name="package.examples.plugins"
     1614    depends="examples.plugins"
     1615    description="Create a downloadable tar file with the example plugins"
     1616    >
     1617    <mkdir dir="${package}" />
     1618    <tar
     1619      destfile="${package}/exampleplugins.tar.gz"
     1620      compression="gzip"
     1621      >
     1622      <tarfileset
     1623        dir="${examples}/plugins"
     1624        preserveLeadingSlashes="true"
     1625      />
     1626    </tar>
     1627  </target>
     1628 
     1629  <target
     1630    name="package.examples.webservices"
     1631    depends="examples.webservices"
     1632    description="Create a downloadable tar file with the webservices example"
     1633    >
     1634    <mkdir dir="${package}" />
     1635    <tar
     1636      destfile="${package}/examplewebservices.tar.gz"
     1637      compression="gzip"
     1638      >
     1639      <tarfileset
     1640        dir="${examples}/webservices"
     1641        preserveLeadingSlashes="true"
     1642      />
     1643    </tar>
     1644  </target>
     1645 
    15461646</project>
  • trunk/doc/src/docbook/developerdoc/plugin_developer.xml

    r3944 r3953  
    44864486      can ask a user for one or more parameters.
    44874487   
    4488       <ulink url="../../../download/exampleplugins.tar.gz">Download</ulink>
    4489       a tar file with the source and compiled code. It contains the followin
    4490       plug-ins:
     4488      You can <ulink url="http://base.thep.lu.se/wiki/DeveloperInformation">download
     4489      a tar file with the source and compiled plug-in code</ulink> from the BASE website.
     4490      It contains the following plug-ins:
    44914491    </para>
    44924492   
  • trunk/src/examples/plugins/build.xml

    r3763 r3953  
    11<?xml version="1.0" encoding="UTF-8"?>
    22<project
    3    name="ExamplePlugins"
    4    default="build.plugin"
    5    basedir="."
    6    >
     3  name="ExamplePlugins"
     4  default="build.plugin"
     5  basedir=".">
    76
    8    <!-- variables used -->
    9    <property name="plugin.name" value="ExamplePlugins" />
    10    <property name="src" value="src" />
    11    <property name="bin" value="bin" />
     7  <!-- variables used -->
     8  <property name="plugin.name" value="ExamplePlugins" />
     9  <property name="src" value="src" />
     10  <property name="bin" value="bin" />
    1211
    13    <!-- set up classpath for compiling -->
    14    <path id="classpath">
    15       <fileset dir="lib">
    16          <include name="**/*.jar"/>
    17       </fileset>
    18    </path>
    19    
    20    <!-- main target -->
    21    <target
    22       name="build.plugin"
    23       description="Compiles the plugin and put in jar"
    24       >
    25       <javac
    26          encoding="ISO-8859-1"
    27          srcdir="${src}"
    28          destdir="${bin}"
    29          debug="true"
    30          classpathref="classpath">
    31       </javac>
    32       <jar
    33          jarfile="${plugin.name}.jar"
    34          basedir="bin"
    35          manifest="MANIFEST.MF"
    36          >
    37     <metainf file="./base-plugins.xml"></metainf>
    38         <metainf file="./base-configurations.xml"></metainf>
    39       </jar>
    40     </target>
    41 </project> 
     12  <!-- set up classpath for compiling -->
     13  <path id="classpath">
     14    <fileset dir="lib">
     15      <include name="**/*.jar" />
     16    </fileset>
     17  </path>
     18
     19  <!-- main target -->
     20  <target
     21    name="build.plugin"
     22    description="Compiles the plugin and put in jar"
     23    >
     24    <javac
     25      encoding="ISO-8859-1"
     26      srcdir="${src}"
     27      destdir="${bin}"
     28      debug="true"
     29      classpathref="classpath">
     30    </javac>
     31    <jar
     32      jarfile="${plugin.name}.jar"
     33      basedir="bin"
     34      manifest="META-INF/MANIFEST.MF"
     35      >
     36      <metainf file="META-INF/base-plugins.xml" />
     37      <metainf file="META-INF/base-configurations.xml" />
     38    </jar>
     39  </target>
     40</project>
Note: See TracChangeset for help on using the changeset viewer.