Eclipse p2 automated plugin build for continious integration
Posted on March 24, 2010
Eclipse is big, so it took me a while to figure out hot to do headless build and release of eclipse plug-ins. So here is the ant script that will do that. Run it with
java -Drepo.dir=file:///usr/local/tomcat/webapps/eclipse/ -jar /opt/eclipse-rcp-galileo-SR2/plugins/org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar -application org.eclipse.ant.core.antRunner -v -buildfile build.xml
build.xml
<?xml version="1.0" encoding="ISO-8859-1"?>
<project name="aseg-plugins-update-site" basedir="." default="all">
<property name="buildDirectory" value="${basedir}/build"/>
<property name="builder" value="${basedir}"/>
<property name="baseLocation" value="${eclipse.home}"/>
<property name="buildType" value="I"/>
<property name="buildId" value="aseg"/>
<property name="buildLabel" value="${buildType}.${buildId}"/>
<property name="collectingFolder" value="${buildType}.${buildId}"/>
<property name="javacVerbose" value="true"/>
<property name="javacDebugInfo" value="true"/>
<property name="javacFailOnError" value="true"/>
<property name="javacSource" value="1.6"/>
<property name="javacTarget" value="1.6"/>
<property name="fautureName" value="SE_Advisor_Client"/>
<property name="repoName" value="ASEG"/>
<!-- todo: pluginPath to avoid copy to builddir -->
<tstamp/>
<target name="all">
<antcall target="clean"/>
<antcall target="resolve"/>
<antcall target="init"/>
<antcall target="buildScript"/>
<antcall target="compile"/>
<antcall target="assemble"/>
<antcall target="package"/>
<antcall target="updateFuture"/>
<antcall target="addCategories"/>
</target>
<target name="clean">
<delete dir="${buildDirectory}"/>
<delete dir="${buildLabel}"/>
</target>
<target name="resolve">
<ant dir="../SE-Advisor Eclipse Plug-in" antfile="resolve.xml" target="resolve"/>
<ant dir="../SE-Advisor Eclipse Query UI" antfile="resolve.xml" target="resolve"/>
<ant dir="../Freemarker" antfile="resolve.xml" target="resolve"/>
<ant dir="../ca.concordia.cs.aseg.seadvisor" antfile="resolve.xml" target="resolve"/>
</target>
<target name="init">
<mkdir dir="${buildDirectory}" />
<mkdir dir="${buildDirectory}/plugins" />
<mkdir dir="${buildDirectory}/features" />
<copy todir="${buildDirectory}/plugins" overwrite="false" verbose="false">
<fileset dir="../">
<exclude name="**/bin/**" />
<include name="SE-Advisor Eclipse Plug-in/**" />
<include name="SE-Advisor Eclipse Query UI/**" />
<include name="ca.concordia.cs.aseg.seadvisor/**" />
<include name="Freemarker/**" />
</fileset>
</copy>
<copy todir="${buildDirectory}/features">
<fileset dir="../">
<include name="SE-Advisor Eclipse Feature/**" />
</fileset>
</copy>
</target>
<target name="buildScript" depends="">
<eclipse.buildScript
elements="feature@${fautureName}"
buildDirectory="${buildDirectory}"
children="true"
recursiveGeneration="true"
parallelcompilation="false"
outputupdatejars="true"
groupconfiguration="false"
flattendependencies="true"
generateversionslists="true"
baselocation="${eclipse.home}"
/>
</target>
<target name="compile">
<ant dir="${buildDirectory}" antfile="compile.${fautureName}.xml"/>
<fail>
<condition>
<isset property="compilation.error.occured"/>
</condition>
</fail>
</target>
<target name="assemble">
<ant dir="${buildDirectory}/" antfile="assemble.${fautureName}.xml"/>
</target>
<target name="package">
<ant antfile="${buildDirectory}/package.${fautureName}.xml" />
</target>
<target name="updateFuture">
<p2.publish.featuresAndBundles
metadataRepository="${repo.dir}"
artifactRepository="${repo.dir}"
metadataRepositoryName="${repoName}"
artifactRepositoryName="${repoName}"
compress="false"
publishArtifacts="true"
append="true"
source="${buildDirectory}">
</p2.publish.featuresAndBundles>
</target>
<target name="addCategories">
<java classname="org.eclipse.equinox.launcher.Main">
<arg value="-application"/>
<arg value="org.eclipse.equinox.p2.publisher.CategoryPublisher"/>
<arg value="-metadataRepository"/>
<arg value="${repo.dir}"/>
<arg value="-categoryDefinition"/>
<arg value="../SE-Advisor Eclipse Update Site/category.xml"/>
</java>
</target>
</project>
Filed Under Uncategorized | Leave a Comment
JVM crash analysis
Posted on February 14, 2010
Very interesting articles about post-mortem analysis of JVM crashes: http://weblogs.java.net/blog/2009/02/19/crash-course-jvm-crash-analysis and http://java.sun.com/javase/6/webnotes/trouble/TSG-VM/html/felog.html
Filed Under Uncategorized | Leave a Comment
Loosing my concentration
Posted on January 28, 2010
I noticed that i have a hard time concentrating on something like reading. What happened?
Filed Under Uncategorized | Leave a Comment
computer
Posted on January 28, 2010
CPU speed no longer increase at unbelievable speed, now only the number of transistors double every 18 months. And since single thread programs are not going anywhere it might be a good time to purchase one.
Filed Under Uncategorized | Leave a Comment
Software and Systems Engineering Vocabulary
Posted on January 23, 2010
Use your words wisely, go to http://pascal.computer.org/sev_display/index.action and download the 300+ page PDF file of all software terms and definitions.
Filed Under Uncategorized | Leave a Comment
Thesis
Posted on January 12, 2010
A thesis is much like a graduate student: It has a limited purpose and
a small audience; it is often insecure and defensive, justifying itself with
excessive documentation; it is too narrowly focussed; and it has not yet
developed a style of its own. (Luey, 2002, p. 34)
Filed Under Uncategorized | Leave a Comment
Eclipse RPC
Posted on January 6, 2010
To display error log in eclipse RCP to the console use -consoleLog argument
Filed Under Uncategorized | Leave a Comment
Please Santa!
Posted on December 29, 2009

Filed Under Uncategorized | Leave a Comment
Exams
Posted on October 29, 2009
Why assignments have 4 questions and you have two weeks to finish them, but exam has 10 questions and you only have 2 hours to complete it? What’s the point?
Filed Under Uncategorized | Leave a Comment
First thought after uncomfarteble sleep in a chair
Posted on October 19, 2009
meh. my life is a mess. the future is uncertain i guess. but never the less. I should never settle for less. because i’m the best.
Filed Under Uncategorized | Leave a Comment