From: <ma...@rh...> - 2009-01-08 21:13:03
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head><style type="text/css"><!-- #msg DL { border : 1px #006 solid; background-color : #369; padding : 6px; color : #fff; } #msg DT { float : left; width : 6em; font-weight : bold; } #msg DL, #msg DT, #msg UL, #msg LI { font-family : arial,helvetica,sans-serif; font-size : 10pt; } h3 { font-family : arial,helvetica,sans-serif; font-size : 10pt; font-weight : bold; } #msg PRE { overflow : auto; white-space : normal; background-color : #ffc; border : 1px #fc0 solid; padding : 6px; } #msg UL, PRE, .diff { overflow : auto; } #patch h4 { font-family : arial,helvetica,sans-serif; font-size : 10pt; } #patch h4 { padding: 8px; background : #369; color : #fff; margin : 0; } #patch .propset h4, #patch .binary h4 {margin: 0;} #patch pre {padding:0;line-height:1.2em;margin:0;} #patch .diff {background:#eeeeee;padding: 0 0 10px 0;} #patch .propset .diff, #patch .binary .diff {padding: 10px 0;} #patch span {display:block;padding:0 10px;} #patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;} #patch .add {background:#ddffdd;} #patch .rem {background:#ffdddd;} #patch .lines, .info {color:#888888;background:#ffffff;} .diff { width : 100%; } #msg DL { border : 1px #006 solid; background-color : #369; padding : 6px; color : #fff; } #msg DT { float : left; width : 6em; font-weight : bold; } #msg DL, #msg DT, #msg UL, #msg LI { font-family : arial,helvetica,sans-serif; font-size : 10pt; } h3 { font-family : arial,helvetica,sans-serif; font-size : 10pt; font-weight : bold; } #msg PRE { overflow : auto; white-space : normal; background-color : #ffc; border : 1px #fc0 solid; padding : 6px; } #msg UL, PRE, .diff { overflow : auto; } #patch h4 { font-family : arial,helvetica,sans-serif; font-size : 10pt; } #patch h4 { padding: 8px; background : #369; color : #fff; margin : 0; } #patch .propset h4, #patch .binary h4 {margin: 0;} #patch pre {padding:0;line-height:1.2em;margin:0;} #patch .diff {background:#eeeeee;padding: 0 0 10px 0;} #patch .propset .diff, #patch .binary .diff {padding: 10px 0;} #patch span {display:block;padding:0 10px;} #patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;} #patch .add {background:#ddffdd;} #patch .rem {background:#ffdddd;} #patch .lines, .info {color:#888888;background:#ffffff;} .diff { width : 100%; } --></style> <title>[rhq-project.org rhq] [2581] opps...</title> </head> <body> <div id="msg"> <dl> <dt>Revision</dt> <dd>2581</dd> <dt>Author</dt> <dd>mazz</dd> <dt>Date</dt> <dd>2009-01-08 15:12:53 -0600 (Thu, 08 Jan 2009)</dd> </dl> <h3>Log Message</h3> <pre>opps... used from EOL characters</pre> <h3>Modified Paths</h3> <ul> <li><a href="#rhqtrunketcagentversioningbuildxml">rhq/trunk/etc/agent-versioning/build.xml</a></li> </ul> </div> <div id="patch"> <h3>Diff</h3> <a id="rhqtrunketcagentversioningbuildxml"></a> <div class="modfile"><h4>Modified: rhq/trunk/etc/agent-versioning/build.xml (2580 => 2581)</h4> <pre class="diff"> <span class="info">--- rhq/trunk/etc/agent-versioning/build.xml 2009-01-08 21:12:26 UTC (rev 2580) +++ rhq/trunk/etc/agent-versioning/build.xml 2009-01-08 21:12:53 UTC (rev 2581) </span><span class="lines">@@ -1,73 +1,73 @@ </span><span class="rem">-<?xml version="1.0" encoding="UTF-8"?> - -<!-- -This ANT script is used to test the agent auto-update functionality. -This takes an agent's core jar file that contains the version information -and alters it to make it look like its a different version/build than it -really use. Use this to change the version and/or build strings so the -server will think the agent is out of date and needs to be updated. - -To configure this script, you must tell the script where the agent's -home directory is. You do this by either setting the normal -RHQ_AGENT_HOME environment variable or you pass in -Dagent.home.dir -on the ANT command line. You can also tell this script what the new -version and build strings should be used by passing in the command -line arguments -Dnew.version and/or -Dnew.build. - -The typical usage of this script that you will normally use is: - -ant -Dagent.home.dir=/my/agent/rhq-agent - -Which simply resets the build number to 0. - -This is another usage (this shows all command line args being used): - -ant -Dagent.home.dir=/my/agent/rhq-agent -Dnew.version=0.0.0.GA -Dnew.build=1 - ---> -<project name="agent-versioning" default="stamp" basedir="."> - <target name="init"> - <property environment="env" /> </span><span class="add">+<?xml version="1.0" encoding="UTF-8"?> + +<!-- +This ANT script is used to test the agent auto-update functionality. +This takes an agent's core jar file that contains the version information +and alters it to make it look like its a different version/build than it +really use. Use this to change the version and/or build strings so the +server will think the agent is out of date and needs to be updated. + +To configure this script, you must tell the script where the agent's +home directory is. You do this by either setting the normal +RHQ_AGENT_HOME environment variable or you pass in -Dagent.home.dir +on the ANT command line. You can also tell this script what the new +version and build strings should be used by passing in the command +line arguments -Dnew.version and/or -Dnew.build. + +The typical usage of this script that you will normally use is: + +ant -Dagent.home.dir=/my/agent/rhq-agent + +Which simply resets the build number to 0. + +This is another usage (this shows all command line args being used): + +ant -Dagent.home.dir=/my/agent/rhq-agent -Dnew.version=0.0.0.GA -Dnew.build=1 + +--> +<project name="agent-versioning" default="stamp" basedir="."> + <target name="init"> + <property environment="env" /> </span><span class="cx"> <property name="env.RHQ_AGENT_HOME" location="rhq-agent"/> </span><span class="rem">- <property name="agent.home.dir" location="${env.RHQ_AGENT_HOME}"/> </span><span class="add">+ <property name="agent.home.dir" location="${env.RHQ_AGENT_HOME}"/> </span><span class="cx"> </target> </span><span class="rem">- - <target name="stamp" depends="init"> - <echo>RHQ Agent Home=${agent.home.dir}</echo> - - <delete file="${java.io.tmpdir}/rhq-agent-version.properties" verbose="false" quiet="true" /> - <unjar dest="${java.io.tmpdir}"> - <fileset dir="${agent.home.dir}/lib"> - <include name="rhq-enterprise-agent-*.jar"/> - </fileset> - <patternset> - <include name="rhq-agent-version.properties"/> - </patternset> - </unjar> - - <property name="agent.version.properties.file" location="${java.io.tmpdir}/rhq-agent-version.properties" /> - <property file="${agent.version.properties.file}"/> - <echo>Current Version=${Product-Version}</echo> - <echo>Current Build=${Build-Number}</echo> - - <!-- set some defaults, but the user can override these via -D command line args --> - <!-- by default, we keep the version string, but reset the build number to 0 --> - <property name="new.version" value="${Product-Version}" /> - <property name="new.build" value="0" /> - <echo>New Version To Be Used=${new.version}</echo> - <echo>New Build To Be Used=${new.build}</echo> - - <replace file="${agent.version.properties.file}"> - <replacefilter token="Product-Version=${Product-Version}" value="Product-Version=${new.version}"/> - <replacefilter token="Build-Number=${Build-Number}" value="Build-Number=${new.build}"/> - </replace> - - <property name="agent.jar" location="${agent.home.dir}/lib/rhq-enterprise-agent-${Product-Version}.jar"/> - <echo>RHQ Agent Jar Being Modified=${agent.jar}</echo> - <jar file="${agent.jar}" update="true"> - <fileset dir="${java.io.tmpdir}"> - <include name="rhq-agent-version.properties" /> - </fileset> - </jar> - </target> </span><span class="add">+ + <target name="stamp" depends="init"> + <echo>RHQ Agent Home=${agent.home.dir}</echo> + + <delete file="${java.io.tmpdir}/rhq-agent-version.properties" verbose="false" quiet="true" /> + <unjar dest="${java.io.tmpdir}"> + <fileset dir="${agent.home.dir}/lib"> + <include name="rhq-enterprise-agent-*.jar"/> + </fileset> + <patternset> + <include name="rhq-agent-version.properties"/> + </patternset> + </unjar> + + <property name="agent.version.properties.file" location="${java.io.tmpdir}/rhq-agent-version.properties" /> + <property file="${agent.version.properties.file}"/> + <echo>Current Version=${Product-Version}</echo> + <echo>Current Build=${Build-Number}</echo> + + <!-- set some defaults, but the user can override these via -D command line args --> + <!-- by default, we keep the version string, but reset the build number to 0 --> + <property name="new.version" value="${Product-Version}" /> + <property name="new.build" value="0" /> + <echo>New Version To Be Used=${new.version}</echo> + <echo>New Build To Be Used=${new.build}</echo> + + <replace file="${agent.version.properties.file}"> + <replacefilter token="Product-Version=${Product-Version}" value="Product-Version=${new.version}"/> + <replacefilter token="Build-Number=${Build-Number}" value="Build-Number=${new.build}"/> + </replace> + + <property name="agent.jar" location="${agent.home.dir}/lib/rhq-enterprise-agent-${Product-Version}.jar"/> + <echo>RHQ Agent Jar Being Modified=${agent.jar}</echo> + <jar file="${agent.jar}" update="true"> + <fileset dir="${java.io.tmpdir}"> + <include name="rhq-agent-version.properties" /> + </fileset> + </jar> + </target> </span><span class="cx"> </project> \ No newline at end of file </span> </pre> </div> </div> </body> </html> |