A mostly working command line (headless) build using PDE build. Still needs some...
authorpombredanne <pombredanne>
Thu, 2 Nov 2006 19:53:21 +0000 (19:53 +0000)
committerpombredanne <pombredanne>
Thu, 2 Nov 2006 19:53:21 +0000 (19:53 +0000)
build/allElements.xml [new file with mode: 0644]
build/build.properties [new file with mode: 0644]
build/build.xml [new file with mode: 0644]
build/customTargets.xml [new file with mode: 0644]

diff --git a/build/allElements.xml b/build/allElements.xml
new file mode 100644 (file)
index 0000000..65e9ba5
--- /dev/null
@@ -0,0 +1,32 @@
+<project name="allElements Delegator" >
+       
+       <!-- ===================================================================== -->
+       <!-- Run a given ${target} on all elements being built                     -->
+       <!-- Replace element.id with the id of the top level element being built.    -->
+       <!-- If element.id does not exist in ${buildDirectory}/features/element.id   -->
+       <!-- or ${baseLocation}/features/element.id, then you must provide the       -->
+       <!-- location by setting the property "pluginPath"                           -->
+       <!-- Add on <ant> task for each top level element being built.             -->
+       <!-- ===================================================================== -->
+       <target name="allElementsDelegator">
+               <ant antfile="${genericTargets}" target="${target}">
+                       <property name="type" value="feature" />
+                       <property name="id" value="net.sourceforge.phpeclipse" />
+               </ant>
+       </target>
+       <!-- ===================================================================== -->
+       <!-- Targets to assemble the built elements for particular configurations  -->
+       <!-- These generally call the generated assemble scripts (named in         -->
+       <!-- ${assembleScriptName}) but may also add pre and post processing       -->
+       <!-- Add one target for each root element and each configuration           -->
+       <!-- Replace element.id with the id of the top level element being built   -->
+       <!-- ===================================================================== -->
+       <target name="assemble.element.id[.config.spec]">
+               <ant antfile="${assembleScriptName}" dir="${buildDirectory}"/>
+       </target>
+  
+  <!--The platform independent assemble target-->
+  <target name="assemble.net.sourceforge.phpeclipse">
+    <ant antfile="${assembleScriptName}" dir="${buildDirectory}"/>
+  </target>
+</project>
diff --git a/build/build.properties b/build/build.properties
new file mode 100644 (file)
index 0000000..d2e7941
--- /dev/null
@@ -0,0 +1,232 @@
+###############################################################################
+# Copyright (c) 2003, 2006 IBM Corporation and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+# 
+# Contributors:
+#     IBM Corporation - initial API and implementation
+#                      PHPEclipse - development team
+###############################################################################
+#####################
+# Parameters describing how and where to execute the build.
+# Typical users need only update the following properties:
+#    baseLocation - where things you are building against are installed
+#    bootclasspath - The base jars to compile against (typicaly rt.jar)
+#    configs - the list of {os, ws, arch} configurations to build.  
+#
+# Of course any of the settings here can be overridden by spec'ing 
+# them on the command line (e.g., -DbaseLocation=d:/eclipse
+#
+############# BASE CONTROL #############
+# Settings for the base Eclipse components and Java class libraries 
+# against which you are building.
+# Base location for anything the build needs to compile against.  For example,
+# in most RCP app or a plug-in,  the baseLocation should be the location of a previously
+# installed Eclipse against which the application or plug-in code will be compiled 
+# and the RCP delta pack.
+
+# The directory into which the build elements are fetched and where
+# the build takes place.
+# it is the location of an eclipse install containing all the pre-built 
+#features and plug-ins in features/ and plugins/ subdirectories.
+#Set this to the full path of the build directory created previously.
+#buildDirectory=${basedir}/build
+#base=<path/to/parent/of/eclipse>
+#baseLocation=${base}/eclipse
+
+#Os/Ws/Arch/nl of the eclipse specified by baseLocation
+baseos=win32
+basews=win32
+basearch=x86
+
+
+# fetch a base eclipse platform from eclipse.org to build against
+#skipBase=true
+#eclipse 3.2.1 release
+eclipseBuildId=M20060921-0945
+
+#pluginPath is a list of locations in which to find plugins and features.  
+#This list is separated by the platform file separator (; or :)
+#a location is one of:  
+#- the location of the jar or folder that is the plugin or feature : /path/to/foo.jar or /path/to/foo
+#- a directory that contains a /plugins or /features subdirectory
+#- the location of a feature.xml, or for 2.1 style plugins, the plugin.xml or fragment.xml
+#pluginPath=
+
+
+
+
+############# PRODUCT/PACKAGING CONTROL #############
+#product=/plugin or feature id/path/to/.product
+runPackager=true
+
+#Set the name of the archive that will result from the product build.
+#archiveNamePrefix=
+
+# The prefix that will be used in the generated archive.
+#the name of the directory in which your feature will be unzipped on disk.
+#archivePrefix=net.sourceforge.phpeclipse
+archivePrefix=
+
+# The location underwhich all of the build output will be collected.
+collectingFolder=${archivePrefix}
+
+# The list of {os, ws, arch} configurations to build.  This 
+# value is a '&' separated list of ',' separate triples.  For example, 
+#     configs=win32,win32,x86 & linux,motif,x86
+# By default the value is *,*,*
+#configs=win32, win32, x86 & \
+#      linux, gtk, ppc &\
+# linux, gtk, x86 & \
+#      linux, gtk, x86_64 & \
+#      linux, motif, x86 & \
+#      solaris, motif, sparc & \
+#      solaris, gtk, sparc & \
+#      aix, motif, ppc & \
+#      hpux, motif, PA_RISC & \
+#      macosx, carbon, ppc
+#list the configurations for which you want your feature to be built. You can uncomment the configuration(s) provided (be careful of the line continuations). 
+#If the feature you are building is platform independent, 
+#this property does not need to be set or can be set to *,*,*.
+configs=*,*,*
+
+# By default PDE creates one archive (result) per entry listed in the configs property.
+# Setting this value to try will cause PDE to only create one output containing all 
+# artifacts for all the platforms listed in the configs property.
+groupConfigurations=true
+
+#The format of the archive. By default a zip is created using antZip.
+#The list can only contain the configuration for which the desired format is different than zip.
+#archivesFormat=win32, win32, x86 - antZip& \
+#      linux, gtk, ppc - antZip &\
+#    linux, gtk, x86 - antZip& \
+#      linux, gtk, x86_64 - antZip& \
+# linux, motif, x86 - antZip& \
+#      solaris, motif, sparc - antZip& \
+#      solaris, gtk, sparc - antZip& \
+#      aix, motif, ppc - antZip& \
+#      hpux, motif, PA_RISC - antZip& \
+#      macosx, carbon, ppc - antZip
+       
+#Set to true if you want the output to be ready for an update jar (no site.xml generated)
+outputUpdateJars = true
+
+#Set to true for Jnlp generation
+#codebase should be a URL that will be used as the root of all relative URLs in the output.
+#generateJnlp=false
+#jnlp.codebase=<codebase url>
+#jnlp.j2se=<j2se version>
+
+#Set to true if you want to sign jars
+signJars=false
+#sign.alias=<alias>
+#sign.keystore=<keystore location>
+#sign.storepass=<keystore password>
+
+#Arguments to send to the zip executable
+zipargs=
+
+#Arguments to send to the tar executable
+tarargs=
+
+#Control the creation of a file containing the version included 
+#in each configuration - on by default 
+#generateVersionsLists=false
+
+############## BUILD NAMING CONTROL ################
+
+# Type of build.  Used in naming the build output.  Typically this value is
+# one of I, N, M, S, ...
+buildType=I
+
+# ID of the build.  Used in naming the build output.
+buildId=CVS-20061101
+
+# Label for the build.  Used in naming the build output
+buildLabel=${buildType}.${buildId}
+
+# Timestamp for the build.  Used in naming the build output
+timestamp=20061101
+
+#The value to be used for the qualifier of a plugin or feature when you want to override the value computed by pde.
+#The value will only be applied to plugin or features indicating build.properties, qualifier = context 
+#forceContextQualifier=<the value for the qualifier>
+
+#Enable / disable the generation of a suffix for the features that use .qualifier. 
+#The generated suffix is computed according to the content of the feature   
+#generateFeatureVersionSuffix=true
+
+
+############# MAP FILE CONTROL ################
+# This section defines CVS tags to use when fetching the map files from the repository.
+# If you want to fetch the map file from repository / location, change the getMapFiles target in the customTargets.xml
+
+#skipMaps=true
+mapsRepo=:pserver:anonymous@phpeclipse.cvs.sourceforge.net:/cvsroot/phpeclipse
+mapsRoot=build/maps
+mapsCheckoutTag=HEAD
+
+#tagMaps=true
+mapsTagTag=v${buildId}
+
+
+############ REPOSITORY CONTROL ###############
+# This section defines properties parameterizing the repositories where plugins, fragments
+# bundles and features are being obtained from. 
+
+# The tags to use when fetching elements to build.
+# By default thebuilder will use whatever is in the maps.  
+# This value takes the form of a comma separated list of repository identifier 
+#(like used in the map files) and the overriding value
+# For example fetchTag=CVS=HEAD, SVN=v20050101
+# fetchTag=HEAD
+#skipFetch=true
+
+
+############# JAVA COMPILER OPTIONS ##############
+# The location of the Java jars to compile against.  Typically the rt.jar for your JDK/JRE
+#bootclasspath=${java.home}/lib/rt.jar
+
+# specific JRE locations to compile against. These values are used to compile bundles specifying a 
+# Bundle-RequiredExecutionEnvironment. Uncomment and set values for environments that you support
+#CDC-1.0/Foundation-1.0= /path/to/rt.jar
+#CDC-1.1/Foundation-1.1=
+#OSGi/Minimum-1.0=
+#OSGi/Minimum-1.1=
+#JRE-1.1=
+#J2SE-1.2=
+#J2SE-1.3=
+#J2SE-1.4= 
+#J2SE-1.5=
+#JavaSE-1.6=
+#PersonalJava-1.1=
+#PersonalJava-1.2=
+#CDC-1.0/PersonalBasis-1.0=
+#CDC-1.0/PersonalJava-1.0=
+#CDC-1.1/PersonalBasis-1.1=
+#CDC-1.1/PersonalJava-1.1=
+
+# Specify the output format of the compiler log when eclipse jdt is used
+logExtension=.log
+
+# Whether or not to include debug info in the output jars
+javacDebugInfo=false 
+
+# Whether or not to fail the build if there are compiler errors
+javacFailOnError=true
+
+# Enable or disable verbose mode of the compiler
+javacVerbose=true
+
+# Extra arguments for the compiler. These are specific to the java compiler being used.
+#compilerArg=
+
+# Default value for the version of the source code. This value is used when compiling plug-ins that do not set the Bundle-RequiredExecutionEnvironment or set javacSource in build.properties
+#javacSource=1.3
+
+# Default value for the version of the byte code targeted. This value is used when compiling plug-ins that do not set the Bundle-RequiredExecutionEnvironment or set javacTarget in build.properties.
+#javacTarget=1.1
+
+
diff --git a/build/build.xml b/build/build.xml
new file mode 100644 (file)
index 0000000..20bef5c
--- /dev/null
@@ -0,0 +1,30 @@
+<project name="Build PHPEclipse" default="main">
+       <property file="${user.home}/phpeclipse/build.properties" />
+       <property file="${basedir}/build.properties" />
+       <property environment="env" />
+
+       <property name="builder" location="${basedir}" />
+       <property name="buildDirectory" location="${builder}/build" />
+  <property name="base" location="${buildDirectory}/base" />
+  <property name="baseLocation" location="${base}/eclipse" />
+       <property name="tempDirectory" location="${buildDirectory}/temp" />
+       <property name="base.eclipse.install" value="d:/ee-pw-1.2.0/" />
+       <property name="pdebuild.version" value="3.2.0.v20060603" />
+       <property name="pdebuild.build.xml" value="${base.eclipse.install}/plugins/org.eclipse.pde.build_${pdebuild.version}/scripts/build.xml" />
+
+       <target name="main" description="build everything">
+               <mkdir dir="${buildDirectory}" />
+               <mkdir dir="${buildDirectory}/temp" />
+               <ant antfile="${pdebuild.build.xml}" dir="${builder}" />
+       </target>
+
+       <target name="clean" description="clean the build directory, except for the downloaded zips">
+               <delete includeemptydirs="true"  deleteonexit="true">
+                       <fileset dir="${buildDirectory}" >
+                               <include name="*/**" />
+                               <exclude name="downloads/**" />
+                       </fileset>
+               </delete>
+       </target>
+
+</project>
diff --git a/build/customTargets.xml b/build/customTargets.xml
new file mode 100644 (file)
index 0000000..e179950
--- /dev/null
@@ -0,0 +1,186 @@
+<project name="Build specific targets and properties" default="noDefault">
+
+       <!-- ===================================================================== -->
+       <!-- Run a given ${target} on all elements being built -->
+       <!-- Add on <ant> task for each top level element being built. -->
+       <!-- ===================================================================== -->
+       <property name="allElementsFile" value="allElements.xml" />
+       <import file="${allElementsFile}" />
+       <target name="allElements">
+               <antcall target="allElementsDelegator" />
+       </target>
+
+       <!-- ===================================================================== -->
+       <!-- Fetch a base eclipse environment matching your local (linux/mac/win)  -->
+       <!-- os/ws to use in the build. only for linux/gtk/x86, win32 and macosx   -->
+       <!-- this is used to bootstrap the build and guarantee that the build      -->
+       <!-- runs against the correct version of Eclipse                           -->
+       <!-- ===================================================================== -->
+       <target name="getBaseComponents" depends="checkLocalBase" unless="skipBase">
+               <condition property="download.extension" value="win32.zip">
+                       <os family="windows" />
+               </condition>
+               <condition property="download.extension" value="macosx-carbon.tar.gz">
+                       <and>
+                               <os family="mac" />
+                               <os family="unix" />
+                       </and>
+               </condition>
+               <condition property="download.extension" value="linux-gtk.tar.gz">
+                       <and>
+                               <not>
+                                       <os family="mac" />
+                               </not>
+                               <os family="unix" />
+                       </and>
+               </condition>
+
+               <property name="eclipseURL" value="http://download.eclipse.org/eclipse/downloads/drops" />
+               <property name="eclipseBaseURL" value="${eclipseURL}/${eclipseBuildId}/eclipse-platform-${eclipseBuildId}-${download.extension}" />
+
+               <get usetimestamp="true" src="${eclipseBaseURL}" dest="${buildDirectory}/downloads/eclipse-platform-${eclipseBuildId}-${download.extension}" />
+               <unzip dest="${base}" overwrite="true" src="${buildDirectory}/downloads/eclipse-platform-${eclipseBuildId}-${download.extension}" />
+       </target>
+
+       <target name="checkLocalBase">
+               <available file="${base}" property="skipBase" />
+       </target>
+
+       <!-- ===================================================================== -->
+       <!-- Check out map files from correct repository -->
+       <!-- Replace values for mapsCheckoutTag as desired. -->
+       <!-- ===================================================================== -->
+       <target name="getMapFiles" depends="checkLocalMaps" unless="skipMaps">
+               <property name="mapsCheckoutTag" value="HEAD" />
+               <cvs cvsRoot="${mapsRepo}" package="${mapsRoot}" dest="${buildDirectory}/maps" tag="${mapsCheckoutTag}" />
+       </target>
+
+       <target name="checkLocalMaps">
+               <available property="skipMaps" file="${buildDirectory}/maps" />
+       </target>
+
+       <target name="tagMapFiles" if="tagMaps">
+               <cvs dest="${buildDirectory}/maps/${mapsRoot}" command="tag ${mapsTagTag}" />
+       </target>
+
+       <!-- ===================================================================== -->
+
+       <target name="clean" unless="noclean">
+               <antcall target="allElements">
+                       <param name="target" value="cleanElement" />
+               </antcall>
+       </target>
+
+       <target name="gatherLogs">
+               <mkdir dir="${buildDirectory}/${buildLabel}/compilelogs" />
+               <antcall target="allElements">
+                       <param name="target" value="gatherLogs" />
+               </antcall>
+               <unzip dest="${buildDirectory}/${buildLabel}/compilelogs" overwrite="true">
+                       <fileset dir="${buildDirectory}/features">
+                               <include name="**/*.log.zip" />
+                       </fileset>
+               </unzip>
+       </target>
+
+       <!-- ===================================================================== -->
+       <!-- Steps to do before setup -->
+       <!-- ===================================================================== -->
+       <target name="preSetup">
+       </target>
+
+       <!-- ===================================================================== -->
+       <!-- Steps to do after setup but before starting the build proper -->
+       <!-- ===================================================================== -->
+       <target name="postSetup">
+               <antcall target="getBaseComponents" />
+       </target>
+
+       <!-- ===================================================================== -->
+       <!-- Steps to do before fetching the build elements -->
+       <!-- ===================================================================== -->
+       <target name="preFetch">
+       </target>
+
+       <!-- ===================================================================== -->
+       <!-- Steps to do after fetching the build elements -->
+       <!-- ===================================================================== -->
+       <target name="postFetch">
+       </target>
+
+       <!-- ===================================================================== -->
+       <!-- Steps to do before generating the build scripts. -->
+       <!-- ===================================================================== -->
+       <target name="preGenerate">
+       </target>
+
+       <!-- ===================================================================== -->
+       <!-- Steps to do after generating the build scripts. -->
+       <!-- ===================================================================== -->
+       <target name="postGenerate">
+               <antcall target="clean" />
+       </target>
+
+       <!-- ===================================================================== -->
+       <!-- Steps to do before running the build.xmls for the elements being built. -->
+       <!-- ===================================================================== -->
+       <target name="preProcess">
+       </target>
+
+       <!-- ===================================================================== -->
+       <!-- Steps to do after running the build.xmls for the elements being built. -->
+       <!-- ===================================================================== -->
+       <target name="postProcess">
+       </target>
+
+       <!-- ===================================================================== -->
+       <!-- Steps to do before running assemble. -->
+       <!-- ===================================================================== -->
+       <target name="preAssemble">
+       </target>
+
+       <!-- ===================================================================== -->
+       <!-- Steps to do after  running assemble. -->
+       <!-- ===================================================================== -->
+       <target name="postAssemble">
+       </target>
+
+       <!-- ===================================================================== -->
+       <!-- Steps to do before running package. -->
+       <!-- ===================================================================== -->
+       <target name="prePackage">
+       </target>
+
+       <!-- ===================================================================== -->
+       <!-- Steps to do after  running package. -->
+       <!-- ===================================================================== -->
+       <target name="postPackage">
+       </target>
+
+       <!-- ===================================================================== -->
+       <!-- Steps to do after the build is done. -->
+       <!-- ===================================================================== -->
+       <target name="postBuild">
+               <antcall target="gatherLogs" />
+       </target>
+
+       <!-- ===================================================================== -->
+       <!-- Steps to do to test the build results -->
+       <!-- ===================================================================== -->
+       <target name="test">
+       </target>
+
+       <!-- ===================================================================== -->
+       <!-- Steps to do to publish the build results -->
+       <!-- ===================================================================== -->
+       <target name="publish">
+       </target>
+
+       <!-- ===================================================================== -->
+       <!-- Default target                                                        -->
+       <!-- ===================================================================== -->
+       <target name="noDefault">
+               <echo message="You must specify a target when invoking this file" />
+       </target>
+
+</project>