diff --git a/org.eclipse.wtp.releng.webupdatesite/build-home/featureFileCreate.jar b/org.eclipse.wtp.releng.webupdatesite/build-home/featureFileCreate.jar index 453c293a5b8c2df21e2d57ce15640bbd04337ca6..9d8b6d08d10b81f51c861030fa045a6c81a8f90b 100644 Binary files a/org.eclipse.wtp.releng.webupdatesite/build-home/featureFileCreate.jar and b/org.eclipse.wtp.releng.webupdatesite/build-home/featureFileCreate.jar differ diff --git a/org.eclipse.wtp.releng.webupdatesite/build-home/runUpdateAllProjects.sh b/org.eclipse.wtp.releng.webupdatesite/build-home/runUpdateAllProjects.sh index 56841d49adc2fe97e86d5740bcdaa7a284983d73..79760e48cc0bb7e1878c1a1d8b5e340e9d22dede 100644 --- a/org.eclipse.wtp.releng.webupdatesite/build-home/runUpdateAllProjects.sh +++ b/org.eclipse.wtp.releng.webupdatesite/build-home/runUpdateAllProjects.sh @@ -68,24 +68,24 @@ if [ $clean ] ; then fi echo " Updating index and web site files, and site.xml file" -rsync -rp "${buildrepositorypath}"/* "${testUpdateSite}" -rsync -p ${HOME}/${updateToolsDir}/WebContent/${mainIndexFileName} ${testUpdateSite}/index.html -rsync -p ${HOME}/${updateToolsDir}/WebContent/*.jpg ${testUpdateSite} +rsync -vrp "${buildrepositorypath}"/* "${testUpdateSite}" +rsync -vp ${HOME}/${updateToolsDir}/WebContent/${mainIndexFileName} ${testUpdateSite}/index.html +rsync -vp ${HOME}/${updateToolsDir}/WebContent/*.jpg ${testUpdateSite} echo "add capabilities to site" CAP_BUILD=20090608042922/S-S20090608042922-20090608042922 -rsync -rp /shared/webtools/committers/wtpcap-R3.1-S/"${CAP_BUILD}"/updateSite/features/* "${testUpdateSite}"/features/ -rsync -rp /shared/webtools/committers/wtpcap-R3.1-S/"${CAP_BUILD}"/updateSite/plugins/* "${testUpdateSite}"/plugins/ +rsync -vrp /shared/webtools/committers/wtpcap-R3.1-S/"${CAP_BUILD}"/updateSite/features/* "${testUpdateSite}"/features/ +rsync -vrp /shared/webtools/committers/wtpcap-R3.1-S/"${CAP_BUILD}"/updateSite/plugins/* "${testUpdateSite}"/plugins/ echo "add jaxws to site" JAXWS_BUILD=I-I20090813210640-20090813210640 -rsync -rp "${HOME}"/downloads/webtools/downloads/drops/R0.5/"${JAXWS_BUILD}"/updateSite/features/* "${testUpdateSite}"/features/ -rsync -rp "${HOME}"/downloads/webtools/downloads/drops/R0.5/"${JAXWS_BUILD}"/updateSite/plugins/* "${testUpdateSite}"/plugins/ +rsync -vrp "${HOME}"/downloads/webtools/downloads/drops/R0.5/"${JAXWS_BUILD}"/updateSite/features/* "${testUpdateSite}"/features/ +rsync -vrp "${HOME}"/downloads/webtools/downloads/drops/R0.5/"${JAXWS_BUILD}"/updateSite/plugins/* "${testUpdateSite}"/plugins/ ./createMirrorFile.sh -s "$stream" -b "${testUpdateSite}" diff --git a/org.eclipse.wtp.releng.webupdatesite/featureFileUpdaterDescription.jardesc b/org.eclipse.wtp.releng.webupdatesite/featureFileUpdaterDescription.jardesc index 09cc54c53eb4098e539f07ec11fd21e3d00cc6a9..ee50a4b6081708b2a2ad99ed7fc423ded1df30ce 100644 --- a/org.eclipse.wtp.releng.webupdatesite/featureFileUpdaterDescription.jardesc +++ b/org.eclipse.wtp.releng.webupdatesite/featureFileUpdaterDescription.jardesc @@ -21,7 +21,6 @@ <file path="/org.eclipse.wtp.releng.webupdatesite/features-galileo-wtp.xml"/> <file path="/org.eclipse.wtp.releng.webupdatesite/plugin.properties"/> <file path="/org.eclipse.wtp.releng.webupdatesite/build-home/updateTestUpdateSite.sh"/> - <file path="/org.eclipse.wtp.releng.webupdatesite/webtools.build"/> <file path="/org.eclipse.wtp.releng.webupdatesite/instructions.txt"/> <file path="/org.eclipse.wtp.releng.webupdatesite/build-home/updateGanymedeMirrorPatches.xml"/> <file path="/org.eclipse.wtp.releng.webupdatesite/build-home/createP2Repo.xml"/> @@ -31,17 +30,15 @@ <file path="/org.eclipse.wtp.releng.webupdatesite/build-home/getWTPUpdateToolsFromCVS.sh"/> <file path="/org.eclipse.wtp.releng.webupdatesite/build-home/copyToFinalUpdateSite-siteFiles.sh"/> <file path="/org.eclipse.wtp.releng.webupdatesite/build-home/updateMirrorProject.xml"/> - <file path="/org.eclipse.wtp.releng.webupdatesite/build-home/copyToMilestoneDirectory-SiteFiles.sh"/> <folder path="/org.eclipse.wtp.releng.webupdatesite/META-INF"/> + <file path="/org.eclipse.wtp.releng.webupdatesite/build-home/copyToMilestoneDirectory-SiteFiles.sh"/> <file path="/org.eclipse.wtp.releng.webupdatesite/build-home/createMirrorSite.xml"/> <file path="/org.eclipse.wtp.releng.webupdatesite/build-home/properties.shsource"/> <file path="/org.eclipse.wtp.releng.webupdatesite/build-home/updateGanymedeMirrorAll.xml"/> <file path="/org.eclipse.wtp.releng.webupdatesite/build-home/ant.sh"/> <file path="/org.eclipse.wtp.releng.webupdatesite/build-home/createMirrorFile.sh"/> <file path="/org.eclipse.wtp.releng.webupdatesite/build-home/runUpdateAllProjects.sh"/> - <file path="/org.eclipse.wtp.releng.webupdatesite/siteFileUpdaterManifest.mf"/> <file path="/org.eclipse.wtp.releng.webupdatesite/.project"/> - <file path="/org.eclipse.wtp.releng.webupdatesite/wtp.sc"/> <file path="/org.eclipse.wtp.releng.webupdatesite/build-home/updateGalileoMirrorAll.xml"/> <file path="/org.eclipse.wtp.releng.webupdatesite/build.properties"/> </selectedElements> diff --git a/org.eclipse.wtp.releng.webupdatesite/src/org/eclipse/wtp/releng/tools/CreateFeatureUpdateFile.java b/org.eclipse.wtp.releng.webupdatesite/src/org/eclipse/wtp/releng/tools/CreateFeatureUpdateFile.java index 26a8f0d7860ad4b6e708cabb79f66eb3d1e06b63..f0492d53d0fc4c0a458dea8651dd4de84ae98ed7 100644 --- a/org.eclipse.wtp.releng.webupdatesite/src/org/eclipse/wtp/releng/tools/CreateFeatureUpdateFile.java +++ b/org.eclipse.wtp.releng.webupdatesite/src/org/eclipse/wtp/releng/tools/CreateFeatureUpdateFile.java @@ -147,7 +147,7 @@ public class CreateFeatureUpdateFile { try { - Document newDOM = updateFeatureDOM(siteDOM, currentFeatureVersions); + Document newDOM = updateSiteFeatureDOM(siteDOM, currentFeatureVersions); // we'll write over what we read it outfile = new FileOutputStream(sitexmlFileName); @@ -164,6 +164,40 @@ public class CreateFeatureUpdateFile { } + private Document updateSiteFeatureDOM(Document siteDOM, Map currentFeatureVersions) { + NodeList features = siteDOM.getElementsByTagName("feature"); + + for (int i = 0; i < features.getLength(); i++) { + Node featureElement = features.item(i); + + NamedNodeMap attributes = featureElement.getAttributes(); + + Node featureURLNode = attributes.getNamedItem("url"); + String featureURL = featureURLNode.getNodeValue(); + + Node featureIDNode = attributes.getNamedItem("id"); + String featureID = featureIDNode.getNodeValue(); + + Node featureVersionNode = attributes.getNamedItem("version"); + String featureVersion = featureVersionNode.getNodeValue(); + + // check if still has substitutable value + if (featureVersion.equals("${"+featureID+"}")) { + String currentVersion = (String) currentFeatureVersions.get(featureID); + System.out.println("Substitutable value found: "); + System.out.println(" " + featureID); + System.out.println(" " + currentVersion); + featureVersionNode.setNodeValue(currentVersion); + String newfeatureURL = featureURL.replace("${"+featureID+"}", currentVersion); + featureURLNode.setNodeValue(newfeatureURL); + } + + } + return siteDOM; + + + } + private void doList(String[] featureDirectories, String[] featureOfFocus, String filename) throws IOException { File outFile = new File(filename); Writer output = new FileWriter(outFile);