Author: nickboldt
Date: 2011-05-31 13:41:04 -0400 (Tue, 31 May 2011)
New Revision: 31685
Modified:
branches/jbosstools-3.2.x/build/target-platform/build.xml
branches/jbosstools-3.2.x/build/target-platform/jbds.target
branches/jbosstools-3.2.x/build/target-platform/targetUpdateFromRepo.xml
Log:
backport changes from trunk and attempt to find apache.commons.io another way
Modified: branches/jbosstools-3.2.x/build/target-platform/build.xml
===================================================================
--- branches/jbosstools-3.2.x/build/target-platform/build.xml 2011-05-31 16:57:48 UTC (rev
31684)
+++ branches/jbosstools-3.2.x/build/target-platform/build.xml 2011-05-31 17:41:04 UTC (rev
31685)
@@ -77,6 +77,10 @@
Or, simply call the jbds target, to use the defaults in the previous example:
$ ant jbds
+
+To run for JBDS target file WHILE JBT target file is being run:
+
+ $ ant jbds -DWORKINGDIR=${basedir}
</echo>
</target>
@@ -139,6 +143,8 @@
<!-- should work on osx-cocoa32, win32, lin32, lin64 -->
<target name="get.eclipse">
<!-- NOTE: must use same platform (50M) or SDK (103M - 168M) version as feature
version on target platform, or will get install/update conflicts -->
+ <!-- don't forget to increment these files when moving up a version:
+ build.xml, *.target*, publish.sh, target2p2mirror.xml -->
<property name="eclipse.version" value="3.6.2" />
<property name="eclipse.URL"
value="http://www.eclipse.org/downloads/download.php?r=1&fil...
/>
<!--
Modified: branches/jbosstools-3.2.x/build/target-platform/jbds.target
===================================================================
--- branches/jbosstools-3.2.x/build/target-platform/jbds.target 2011-05-31 16:57:48 UTC
(rev 31684)
+++ branches/jbosstools-3.2.x/build/target-platform/jbds.target 2011-05-31 17:41:04 UTC
(rev 31685)
@@ -2,12 +2,12 @@
<target includeMode="feature" name="jbds">
<locations>
<location includeAllPlatforms="false" includeMode="planner"
type="InstallableUnit">
- <!-- Pro tip: to convert
- from
org.eclipse.tptp.platform.xerces_4.6.0.v201005032111-777K4AkF7B77R7c7N77.jar
- to <unit version="4.6.0.v201005032111-777K4AkF7B77R7c7N77"
id="org.eclipse.tptp.platform.xerces.feature.group"/>
- using vi, apply this transform:
- :%s/.\+\/\(org.\+\)_\(\d\+.\+\)\.jar/\t\t\t<unit
id="\1.feature.group" version="\2"\/>/g
- -->
+ <!-- Pro tip: to convert
+ from org.eclipse.tptp.platform.xerces_4.6.0.v201005032111-777K4AkF7B77R7c7N77.jar
+ to <unit version="4.6.0.v201005032111-777K4AkF7B77R7c7N77"
id="org.eclipse.tptp.platform.xerces.feature.group"/>
+ using vi, apply this transform:
+ :%s/.\+\/\(org.\+\)_\(\d\+.\+\)\.jar/\t\t\t<unit id="\1.feature.group"
version="\2"\/>/g
+ -->
<!-- CVS -->
<unit id="org.eclipse.cvs.feature.group"
version="1.2.0.v20100427-7B77FKt90GE5h0SBT5FV9A01911"/>
@@ -153,4 +153,7 @@
<repository
location="http://download.jboss.org/jbosstools/updates/helios/"...
</location>
</locations>
-</target>
+ <includeBundles>
+ <plugin id="org.apache.commons.io"/>
+ </includeBundles>
+ </target>
Modified: branches/jbosstools-3.2.x/build/target-platform/targetUpdateFromRepo.xml
===================================================================
--- branches/jbosstools-3.2.x/build/target-platform/targetUpdateFromRepo.xml 2011-05-31
16:57:48 UTC (rev 31684)
+++ branches/jbosstools-3.2.x/build/target-platform/targetUpdateFromRepo.xml 2011-05-31
17:41:04 UTC (rev 31685)
@@ -105,39 +105,60 @@
<delete dir="${tmpDir}" includeemptydirs="true"
quiet="true" />
</target>
+ <!-- test examples:
+ cd ~/32x/build/target-platform
+ ant -f targetUpdateFromRepo.xml test.updateTargetFile -Dtest.pattern=swtbot
+ ant -f targetUpdateFromRepo.xml test.updateTargetFile -Dtest.pattern=js
-DtargetFile=jbds.target -DrepoDir=`pwd`/JBDS_REPO/
+ -->
<target name="test.updateTargetFile" depends="check.content.xml,
get.content.xml, copy.content.xml, contentXml2artifactVersions.xsl">
- <echo>Load *swtbot* properties from
${tmpDir}/artifactVersions.properties</echo>
+ <!-- properties to set commandline: -->
+ <property name="test.pattern" value="swtbot"/>
+ <property name="test.targetFile" value="${targetFile}"/>
+
+ <property name="tmpfile"
value="${tmpDir}/test.updateTargetFile.tmp"/>
+ <property name="tmpfile2"
value="${tmpDir}/test.updateTargetFile.tmpsed"/>
+ <echo level="info">Load /${test.pattern}/ properties from
${tmpDir}/artifactVersions.properties</echo>
<loadfile srcfile="${tmpDir}/artifactVersions.properties"
property="artifactVersionsPropertiesContents">
<filterchain>
<linecontains>
- <contains value="swtbot" />
+ <contains value="${test.pattern}" />
<contains value="feature.group" />
</linecontains>
</filterchain>
</loadfile>
- <echo>${artifactVersionsPropertiesContents}</echo>
+ <echo
file="${tmpfile}">${artifactVersionsPropertiesContents}</echo>
<antcall target="target2targetTemplate">
- <param name="outputFile"
value="${tmpDir}/${unified.targetFile}.template" />
+ <param name="outputFile"
value="${tmpDir}/${test.targetFile}.template" />
<param name="replacement.URL" value="${unified.URL}" />
</antcall>
- <echo>Generated ${tmpDir}/${unified.targetFile}.template: </echo>
- <exec executable="egrep">
- <arg line=""swtbot"
${tmpDir}/${unified.targetFile}.template" />
- </exec>
+ <!-- <echo level="info">Generated
${tmpDir}/${unified.targetFile}.template: </echo>
+ <exec executable="egrep">
+ <arg line=""${test.pattern}"
${tmpDir}/${test.targetFile}.template" />
+ </exec> -->
<antcall target="updateTargetFile">
- <param name="targetFile" value="${unified.targetFile}" />
+ <param name="targetFile" value="${test.targetFile}" />
</antcall>
- <echo>--
+ <echo level="info">--
If loaded version values (in artifactVersions.properties) do not match
-output below, an error has occurred or replace.versions is undefined.
+output below (values from repo), an error has occurred or replace.versions is undefined.
+It is also possible that the complete list of features in the repo is greater than those
+in the target. If so, clean the repo and regenerate to remove extraneous content.
--</echo>
- <exec executable="egrep">
- <arg line=""swtbot.*feature.group"
${unified.targetFile}" />
+ <!-- $ sed -n -e '/swtbot.*feature.group/ p' unified.target | sed -e
's/\t\t\t<unit id="\|"\/>//g' -->
+ <exec executable="sed" output="${tmpfile2}">
+ <arg line=" -n -e '/${test.pattern}.*feature.group/ p'
${test.targetFile}" />
</exec>
-
-
+ <exec executable="sed" output="${tmpfile}.2">
+ <arg line=" -e 's/\t\t\t<unit
id="\|"\/>//g' ${tmpfile2} -e 's/"
version="/.version=/g'" />
+ </exec>
+ <exec executable="sort" output="${tmpfile}.sorted"><arg
line="${tmpfile}"/></exec>
+ <exec executable="sort" output="${tmpfile}.2.sorted"><arg
line="${tmpfile}.2"/></exec>
+ <exec executable="diff" outputproperty="diffout">
+ <arg line="${tmpfile}.sorted ${tmpfile}.2.sorted"/>
+ </exec>
+ <echo>${diffout}</echo>
+ <antcall target="cleanup"/>
</target>
-
</project>