projectname should be passed as env. variable on every java call (so it's always available).
diff --git a/releng.wtpbuilder/distribution/wtp.site/build.xml b/releng.wtpbuilder/distribution/wtp.site/build.xml
index 8fdb809..fc45414 100644
--- a/releng.wtpbuilder/distribution/wtp.site/build.xml
+++ b/releng.wtpbuilder/distribution/wtp.site/build.xml
@@ -35,6 +35,8 @@
             <jvmarg value="-Dbuild.distribution=${build.distribution}" />
             <jvmarg value="-DbuildDirectory=${buildDirectory}" />
             <jvmarg value="-Dwtp.builder.home=${wtp.builder.home}" />
+          <jvmarg
+            value="-Dprojectname=${projectname}" />
             <jvmarg value="-Djava.io.tmpdir=${env.RECOMMENDED_TMP_DIR}" />            	
           <jvmarg
                value="-Djava.protocol.handler.pkgs=com.ibm.etools.www.protocol" />