You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@turbine.apache.org by he...@apache.org on 2003/08/07 15:11:27 UTC

cvs commit: jakarta-turbine-2/proposals/henning/eclipse-build INSTALLATION README eclipse_build eclipse_classpath eclipse_prepare_turbine eclipse_project install.sh

henning     2003/08/07 06:11:27

  Added:       proposals/henning/eclipse-build INSTALLATION README
                        eclipse_build eclipse_classpath
                        eclipse_prepare_turbine eclipse_project install.sh
  Log:
  The experimental "build Turbine with Eclipse and without Maven"
  code. Moved into the CVS to give it more exposition to the user
  base. Wants docs and some testing. Should be ready for moving in by
  the time we start 2.4, hopefully dragging a few more hands in to work
  on Turbine.
  
  Revision  Changes    Path
  1.1                  jakarta-turbine-2/proposals/henning/eclipse-build/INSTALLATION
  
  Index: INSTALLATION
  ===================================================================
  This is an experimental Build environment to build Turbine with
  Eclipse without Maven.
  
  To try this out, change into this directory and run
  "install.sh". 
  
  Sorry, this is *ix only yet (I don't do Windows. ;-) )
  
  	-- henning
  
  
  
  
  1.1                  jakarta-turbine-2/proposals/henning/eclipse-build/README
  
  Index: README
  ===================================================================
  This directory contains some helpers to build the Turbine source code
  with the Eclipse IDE (http://www.eclipse.org/). If you're using maven,
  you shouldn't need anything from this directory.
  
  This was created and is intended for Eclipse 2.1.1 or better. Updates
  and patches are welcome, please send them to turbine-dev@jakarta.apache.org.
  
  Contents:
  
  build.xml     - ant Build file which sets up the auto generated Torque
                  peer classes. This file does not build Turbine itself!
  
  
  
  
  1.1                  jakarta-turbine-2/proposals/henning/eclipse-build/eclipse_build
  
  Index: eclipse_build
  ===================================================================
  <?xml version="1.0"?>
  
  <!-- ===================================================================== --> 
  <!-- =                                                                   = -->
  <!-- = This is a helper file to build Turbine 2 with Eclipse             = -->
  <!-- =                                                                   = -->
  <!-- = @author <a href="hps@intermeta.de">Henning P. Schmiedehausen</a>  = -->
  <!-- = @version $Id: eclipse_build,v 1.1 2003/08/07 13:11:27 henning Exp $ = -->
  <!-- =                                                                   = -->
  <!-- ===================================================================== --> 
  
  <project name="Turbine Torque Peers" basedir="../.." default="prepare-turbine">
  
    <property name="libdir" value="target/lib"/>
  
    <target name="prepare-turbine"
       depends="fetch-jars, peers" description="==> Default Target. Run me to prepare the Turbine source code for Eclipse"/>
  
    <target name="torque-init">
      <property name="torque.contextProperties" value="project.properties"/>
      <property file="${torque.contextProperties}"/>
  
      <path id="torque-classpath">
        <fileset dir="${libdir}"/>
      </path>
  
      <!--
        The default.properties file will map old properties to the new ones along
        with setting the correct defaults.
      -->
      <property resource="org/apache/torque/default.properties">
        <classpath>
          <path refid="torque-classpath"/>
        </classpath>
      </property>
  
      <taskdef
        name="torque-data-model"
        classpathref="torque-classpath"
        classname="org.apache.torque.task.TorqueDataModelTask"/>
    </target>
  
    <!-- ================================================== -->
    <!-- Build the Torque Peers for the Turbine builds      -->
    <!-- ================================================== -->
    <target name="peers" description="==> Builds the Turbine Torque Peer classes"
      depends="torque-init">
      <antcall target="copy-om"/>
      <antcall target="scheduler-om"/>
      <antcall target="torque-security-om"/>
  
      <!-- Kludge, because this file is overwritten by the Turbine code itself -->
      <delete file="${torque.java.dir}/org/apache/turbine/services/schedule/JobEntry.java"/>
    </target>
  
  
    <!-- ================================================== -->
    <!-- Prepare all Sources for Torque                     -->
    <!-- ================================================== -->
    <target name="copy-om" description="Copy all schema files to target/xml and replace database related variables"
      depends="copy-scheduler-om ,copy-torque-security-om, copy-id-table-om"/>
  
    <!-- ================================================== -->
    <!-- Prepare Scheduler Sources for Torque               -->
    <!-- ================================================== -->
    <target name="copy-scheduler-om" description="Copy scheduler schema files to target/xml and replace database related variables">
      <filter token="DATABASE_DEFAULT" value="${scheduler.database.name}"/>
      <filter token="EXTRA_USER_COLUMNS" value="${scheduler.extra.user.columns}"/>
      <copy
        file="src/schema/scheduler-schema.xml"
        tofile="${torque.schema.dir}/scheduler-schema.xml"
        filtering="yes"/>
    </target>
  
    <!-- ================================================== -->
    <!-- Prepare Torque Security Service Sources for Torque -->
    <!-- ================================================== -->
    <target name="copy-torque-security-om" description="Copy torque security service schema files to target/xml and replace database related variables">
      <filter token="DATABASE_DEFAULT" value="${torque.security.database.name}"/>
      <copy
        file="src/schema/torque-security-schema.xml"
        tofile="${torque.schema.dir}/torque-security-schema.xml"
        filtering="yes"/>
    </target>
    
    <!-- ================================================== -->
    <!-- Prepare ID Table (for idBroker) Sources for Torque -->
    <!-- ================================================== -->
    <target name="copy-id-table-om" description="Copy id-table schema files to target/xml and replace database related variables">
      <filter token="DATABASE_DEFAULT" value="${scheduler.database.name}"/>
      <copy
        file="src/schema/id-table-schema.xml"
        tofile="${torque.schema.dir}/scheduler-idtable-schema.xml"
        filtering="yes"/>
      <filter token="DATABASE_DEFAULT" value="${torque.security.database.name}"/>
      <copy
        file="src/schema/id-table-schema.xml"
        tofile="${torque.schema.dir}/torque-security-idtable-schema.xml"
        filtering="yes"/>
    </target>
  
    <!-- ================================================== -->
    <!-- Build Peers for the Scheduler                      -->
    <!-- ================================================== -->
    <target name="scheduler-om" description="generate Torque peers for the scheduler"
      depends="copy-scheduler-om">
  
      <torque-data-model
        contextProperties="${torque.contextProperties}"
        controlTemplate="${torque.template.om}"
        outputDirectory="${torque.java.dir}"
        outputFile="report.scheduler.om.generation"
        targetDatabase="${torque.database}"
        targetPackage="${scheduler.package}"
        useClasspath="true">
        <fileset dir="${torque.schema.dir}"
          includes="scheduler-schema.xml"
          excludes="${torque.schema.om.excludes}"
        />
      </torque-data-model>
  
    </target>
  
    <!-- ================================================== -->
    <!-- Build Peers for Torque Security                    -->
    <!-- ================================================== -->
    <target name="torque-security-om" description="generate Torque peers for the torque security service"
      depends="copy-torque-security-om">
  
      <torque-data-model
        contextProperties="${torque.contextProperties}"
        controlTemplate="${torque.template.om}"
        outputDirectory="${torque.java.dir}"
        outputFile="report.torque-security.om.generation"
        targetDatabase="${torque.database}"
        targetPackage="${torque.security.package}"
        useClasspath="true">
        <fileset dir="${torque.schema.dir}"
          includes="torque-security-schema.xml"
          excludes="${torque.schema.om.excludes}"
        />
      </torque-data-model>
  
    </target>
  
    <!-- ================================================== -->
    <!-- Fetch all needed jars from ibiblio                 -->
    <!-- ================================================== -->
    <target name="fetch-jars" description=" ==> Fetch the needed jars for Turbine">
      <mkdir dir="${libdir}"/>
      <antcall target="fetch-sun-jars" />
      <antcall target="fetch-ibiblio-jars" />
    </target>
  
    <target name="check-sun-jars">
      <condition property="sunjars.present">
        <and>
          <available file="${libdir}/activation-1.0.2.jar" type="file"/>
          <available file="${libdir}/javamail-1.3.jar" type="file"/>
          <available file="${libdir}/jdbc-2.0.jar" type="file"/>
          <available file="${libdir}/jndi-1.2.1.jar" type="file"/>
        </and>
      </condition>
    </target>
  
    <target name="fetch-sun-jars" unless="sunjars.present" depends="check-sun-jars">
      <fail>
        For a successful build, you must get the following jars from java.sun.com
        and copy them into ${libdir}:
  
        activation.jar, Version 1.0.2  as activation-1.0.2.jar
        mail.jar, Version 1.3 as javamail-1.3.jar
        jdbc.jar, Version 2.0 as jdbc-2.0.jar
        jndi.jar, Version 1.2.1 as jndi-1.2.1.jar
  
        One of these jars is missing. Please correct this error and
        rebuild.
      </fail>
    </target>
  
    <target name="fetch-ibiblio-jars">
      <get verbose="true" usetimestamp="true" src="http://www.ibiblio.org/maven/avalon-framework/jars/avalon-framework-4.1.4.jar" dest="${libdir}/avalon-framework-4.1.4.jar"/>
      <get verbose="true" usetimestamp="true" src="http://www.ibiblio.org/maven/commons-beanutils/jars/commons-beanutils-1.6.1.jar" dest="${libdir}/commons-beanutils-1.6.1.jar"/>
      <get verbose="true" usetimestamp="true" src="http://www.ibiblio.org/maven/commons-codec/jars/commons-codec-1.1.jar" dest="${libdir}/commons-codec-1.1.jar"/>
      <get verbose="true" usetimestamp="true" src="http://www.ibiblio.org/maven/commons-collections/jars/commons-collections-2.1.jar" dest="${libdir}/commons-collections-2.1.jar"/>
      <get verbose="true" usetimestamp="true" src="http://www.ibiblio.org/maven/commons-configuration/jars/commons-configuration-20030706.202021.jar" dest="${libdir}/commons-configuration-20030706.202021.jar"/>
      <get verbose="true" usetimestamp="true" src="http://www.ibiblio.org/maven/commons-digester/jars/commons-digester-1.5.jar" dest="${libdir}/commons-digester-1.5.jar"/>
      <get verbose="true" usetimestamp="true" src="http://www.ibiblio.org/maven/commons-email/jars/commons-email-20030310.165926.jar" dest="${libdir}/commons-email-20030310.165926.jar"/>
      <get verbose="true" usetimestamp="true" src="http://www.ibiblio.org/maven/commons-fileupload/jars/commons-fileupload-1.0.jar" dest="${libdir}/commons-fileupload-1.0.jar"/>
      <get verbose="true" usetimestamp="true" src="http://www.ibiblio.org/maven/commons-lang/jars/commons-lang-1.0.1.jar" dest="${libdir}/commons-lang-1.0.1.jar"/>
      <get verbose="true" usetimestamp="true" src="http://www.ibiblio.org/maven/commons-logging/jars/commons-logging-1.0.3.jar" dest="${libdir}/commons-logging-1.0.3.jar"/>
      <get verbose="true" usetimestamp="true" src="http://www.ibiblio.org/maven/commons-pool/jars/commons-pool-1.0.1.jar" dest="${libdir}/commons-pool-1.0.1.jar"/>
      <get verbose="true" usetimestamp="true" src="http://www.ibiblio.org/maven/cryptix/jars/cryptix-3.2.0.jar" dest="${libdir}/cryptix-3.2.0.jar"/>
      <get verbose="true" usetimestamp="true" src="http://www.ibiblio.org/maven/dom4j/jars/dom4j-1.4.jar" dest="${libdir}/dom4j-1.4.jar"/>
      <get verbose="true" usetimestamp="true" src="http://www.ibiblio.org/maven/ecs/jars/ecs-1.4.2.jar" dest="${libdir}/ecs-1.4.2.jar"/>
      <get verbose="true" usetimestamp="true" src="http://www.ibiblio.org/maven/excalibur-component/jars/excalibur-component-1.1.jar" dest="${libdir}/excalibur-component-1.1.jar"/>
      <get verbose="true" usetimestamp="true" src="http://www.ibiblio.org/maven/excalibur-instrument/jars/excalibur-instrument-1.0.jar" dest="${libdir}/excalibur-instrument-1.0.jar"/>
      <get verbose="true" usetimestamp="true" src="http://www.ibiblio.org/maven/excalibur-logger/jars/excalibur-logger-1.0.1.jar" dest="${libdir}/excalibur-logger-1.0.1.jar"/>
      <get verbose="true" usetimestamp="true" src="http://www.ibiblio.org/maven/excalibur-pool/jars/excalibur-pool-1.2.jar" dest="${libdir}/excalibur-pool-1.2.jar"/>
      <get verbose="true" usetimestamp="true" src="http://www.ibiblio.org/maven/jython/jars/jython-2.1.jar" dest="${libdir}/jython-2.1.jar"/>
      <get verbose="true" usetimestamp="true" src="http://www.ibiblio.org/maven/log4j/jars/log4j-1.2.8.jar" dest="${libdir}/log4j-1.2.8.jar"/>
      <get verbose="true" usetimestamp="true" src="http://www.ibiblio.org/maven/logkit/jars/logkit-1.0.1.jar" dest="${libdir}/logkit-1.0.1.jar"/>
      <get verbose="true" usetimestamp="true" src="http://www.ibiblio.org/maven/oro/jars/oro-2.0.7.jar" dest="${libdir}/oro-2.0.7.jar"/>
      <get verbose="true" usetimestamp="true" src="http://www.ibiblio.org/maven/servletapi/jars/servletapi-2.3.jar" dest="${libdir}/servletapi-2.3.jar"/>
      <get verbose="true" usetimestamp="true" src="http://www.ibiblio.org/maven/stratum/jars/stratum-1.0-b3.jar" dest="${libdir}/stratum-1.0-b3.jar"/>
      <get verbose="true" usetimestamp="true" src="http://www.ibiblio.org/maven/torque/jars/torque-3.1-alpha2.jar" dest="${libdir}/torque-3.1-alpha2.jar"/>
      <get verbose="true" usetimestamp="true" src="http://www.ibiblio.org/maven/torque/jars/torque-gen-3.1-alpha2.jar" dest="${libdir}/torque-gen-3.1-alpha2.jar"/>
      <get verbose="true" usetimestamp="true" src="http://www.ibiblio.org/maven/velocity/jars/velocity-1.3.1.jar" dest="${libdir}/velocity-1.3.1.jar"/>
      <get verbose="true" usetimestamp="true" src="http://www.ibiblio.org/maven/village/jars/village-2.0-dev-20030625.jar" dest="${libdir}/village-2.0-dev-20030625.jar"/>
      <get verbose="true" usetimestamp="true" src="http://www.ibiblio.org/maven/xalan/jars/xalan-2.5.1.jar" dest="${libdir}/xalan-2.5.1.jar"/>
      <get verbose="true" usetimestamp="true" src="http://www.ibiblio.org/maven/xerces/jars/xercesImpl-2.4.0.jar" dest="${libdir}/xercesImpl-2.4.0.jar"/>
      <get verbose="true" usetimestamp="true" src="http://www.ibiblio.org/maven/xml-apis/jars/xml-apis-1.0.b2.jar" dest="${libdir}/xml-apis-1.0.b2.jar"/>
      <get verbose="true" usetimestamp="true" src="http://www.ibiblio.org/maven/xmlrpc/jars/xmlrpc-1.2-b1.jar" dest="${libdir}/xmlrpc-1.2-b1.jar"/>
    </target>
  </project>
  
  
  
  1.1                  jakarta-turbine-2/proposals/henning/eclipse-build/eclipse_classpath
  
  Index: eclipse_classpath
  ===================================================================
  <?xml version="1.0" encoding="UTF-8"?>
  <classpath>
      <classpathentry kind="src" path="src/java"/>
      <classpathentry kind="src" path="target/src"/>
      <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
      <classpathentry kind="lib" path="target/lib/activation-1.0.2.jar"/>
      <classpathentry kind="lib" path="target/lib/avalon-framework-4.1.4.jar"/>
      <classpathentry kind="lib" path="target/lib/commons-beanutils-1.6.1.jar"/>
      <classpathentry kind="lib" path="target/lib/commons-codec-1.1.jar"/>
      <classpathentry kind="lib" path="target/lib/commons-collections-2.1.jar"/>
      <classpathentry kind="lib" path="target/lib/commons-configuration-20030706.202021.jar"/>
      <classpathentry kind="lib" path="target/lib/commons-digester-1.5.jar"/>
      <classpathentry kind="lib" path="target/lib/commons-email-20030310.165926.jar"/>
      <classpathentry kind="lib" path="target/lib/commons-fileupload-1.0.jar"/>
      <classpathentry kind="lib" path="target/lib/commons-lang-1.0.1.jar"/>
      <classpathentry kind="lib" path="target/lib/commons-logging-1.0.3.jar"/>
      <classpathentry kind="lib" path="target/lib/commons-pool-1.0.1.jar"/>
      <classpathentry kind="lib" path="target/lib/cryptix-3.2.0.jar"/>
      <classpathentry kind="lib" path="target/lib/dom4j-1.4.jar"/>
      <classpathentry kind="lib" path="target/lib/ecs-1.4.2.jar"/>
      <classpathentry kind="lib" path="target/lib/excalibur-component-1.1.jar"/>
      <classpathentry kind="lib" path="target/lib/excalibur-instrument-1.0.jar"/>
      <classpathentry kind="lib" path="target/lib/excalibur-logger-1.0.1.jar"/>
      <classpathentry kind="lib" path="target/lib/excalibur-pool-1.2.jar"/>
      <classpathentry kind="lib" path="target/lib/javamail-1.3.jar"/>
      <classpathentry kind="lib" path="target/lib/jdbc-2.0.jar"/>
      <classpathentry kind="lib" path="target/lib/jndi-1.2.1.jar"/>
      <classpathentry kind="lib" path="target/lib/jython-2.1.jar"/>
      <classpathentry kind="lib" path="target/lib/log4j-1.2.8.jar"/>
      <classpathentry kind="lib" path="target/lib/logkit-1.0.1.jar"/>
      <classpathentry kind="lib" path="target/lib/oro-2.0.7.jar"/>
      <classpathentry kind="lib" path="target/lib/servletapi-2.3.jar"/>
      <classpathentry kind="lib" path="target/lib/stratum-1.0-b3.jar"/>
      <classpathentry kind="lib" path="target/lib/torque-3.1-alpha2.jar"/>
      <classpathentry kind="lib" path="target/lib/torque-gen-3.1-alpha2.jar"/>
      <classpathentry kind="lib" path="target/lib/velocity-1.3.1.jar"/>
      <classpathentry kind="lib" path="target/lib/village-2.0-dev-20030625.jar"/>
      <classpathentry kind="lib" path="target/lib/xalan-2.5.1.jar"/>
      <classpathentry kind="lib" path="target/lib/xercesImpl-2.4.0.jar"/>
      <classpathentry kind="lib" path="target/lib/xml-apis-1.0.b2.jar"/>
      <classpathentry kind="lib" path="target/lib/xmlrpc-1.2-b1.jar"/>
      <classpathentry kind="output" path="target/classes"/>
  </classpath>
  
  
  
  1.1                  jakarta-turbine-2/proposals/henning/eclipse-build/eclipse_prepare_turbine
  
  Index: eclipse_prepare_turbine
  ===================================================================
  <?xml version="1.0" encoding="UTF-8"?>
  <launchConfiguration type="org.eclipse.ant.AntBuilderLaunchConfigurationType">
      <booleanAttribute
          key="org.eclipse.ui.externaltools.ATTR_RUN_IN_BACKGROUND" value="false"/>
      <stringAttribute
          key="org.eclipse.ui.externaltools.ATTR_RUN_BUILD_KINDS" value="full,incremental,"/>
      <stringAttribute
          key="org.eclipse.ui.externaltools.ATTR_WORKING_DIRECTORY" value="${workspace_loc:/jakarta-turbine-2}"/>
      <stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:/jakarta-turbine-2/build/eclipse/build.xml}"/>
      <stringAttribute key="org.eclipse.ui.externaltools.ATTR_ANT_TARGETS" value="prepare-turbine,"/>
      <stringAttribute key="org.eclipse.debug.ui.target_run_perspective" value="perspective_none"/>
  </launchConfiguration>
  
  
  
  1.1                  jakarta-turbine-2/proposals/henning/eclipse-build/eclipse_project
  
  Index: eclipse_project
  ===================================================================
  <?xml version="1.0" encoding="UTF-8"?>
  <projectDescription>
  	<name>jakarta-turbine-2</name>
  	<comment></comment>
  	<projects>
  	</projects>
  	<buildSpec>
  		<buildCommand>
  			<name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
  			<arguments>
  				<dictionary>
  					<key>LaunchConfigHandle</key>
  					<value>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
  &lt;launchConfiguration local=&quot;false&quot; path=&quot;/jakarta-turbine-2/.externalToolBuilders/Prepare Turbine.launch&quot;/&gt;
  </value>
  				</dictionary>
  			</arguments>
  		</buildCommand>
  		<buildCommand>
  			<name>org.eclipse.jdt.core.javabuilder</name>
  			<arguments>
  			</arguments>
  		</buildCommand>
  	</buildSpec>
  	<natures>
  		<nature>org.eclipse.jdt.core.javanature</nature>
  	</natures>
  </projectDescription>
  
  
  
  1.1                  jakarta-turbine-2/proposals/henning/eclipse-build/install.sh
  
  Index: install.sh
  ===================================================================
  #! /bin/sh
  #
  # Linux Installation
  #
  
  #
  # Change this to the actual location of your
  # Turbine Tree! The default should work if you've checked out
  # the tree from CVS and enter the directory where this file
  # is located.
  #
  TURBINE_PROJECT_HOME=../../..
  
  [ -f ${TURBINE_PROJECT_HOME}/maven.xml ] || exit 1
  
  cp eclipse_classpath ${TURBINE_PROJECT_HOME}/.classpath
  cp eclipse_project   ${TURBINE_PROJECT_HOME}/.project
  
  mkdir -p ${TURBINE_PROJECT_HOME}/.externalToolBuilders
  cp eclipse_prepare_turbine "${TURBINE_PROJECT_HOME}/.externalToolBuilders/Prepare Turbine.launch"
  
  mkdir -p ${TURBINE_PROJECT_HOME}/build/eclipse
  cp eclipse_build ${TURBINE_PROJECT_HOME}/build/eclipse/build.xml
  
  PWD=`( cd ${TURBINE_PROJECT_HOME} ; pwd )`
  
  echo "Now import a project from ${PWD} into Eclipse!"
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-dev-help@jakarta.apache.org