Bug 672319 - rhq-ant.cmd command script is not compatible with Windows
Summary: rhq-ant.cmd command script is not compatible with Windows
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: RHQ Project
Classification: Other
Component: Launch Scripts
Version: 3.0.0
Hardware: Unspecified
OS: Windows
high
high vote
Target Milestone: ---
: ---
Assignee: John Mazzitelli
QA Contact: Mike Foley
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-01-24 20:07 UTC by Larry O'Leary
Modified: 2018-11-14 15:01 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Windows 7 64-bit rhq-ant-bundle-common-3.0.0.GA
Last Closed: 2013-09-02 07:23:47 UTC


Attachments (Terms of Use)
Patch diff to remove unneeded files and add missing file (17.18 KB, patch)
2011-01-24 20:59 UTC, Larry O'Leary
no flags Details | Diff
Patch diff to remove unneeded files and add missing file with RHQ specific updates (18.94 KB, patch)
2011-01-25 00:36 UTC, Larry O'Leary
no flags Details | Diff
rhq-ant-bat based on Ant 1.8.0 ant.bat (8.04 KB, application/octet-stream)
2011-02-11 16:08 UTC, John Mazzitelli
no flags Details

Description Larry O'Leary 2011-01-24 20:07:27 UTC
The rhq-ant.cmd command script is for OS/2 and not for Windows. It appears this file was copied from the Apache Ant bin directory (ant.cmd) instead of ant.bat which is the Windows version.

If executing the rhq-ant.cmd file the output is:

C:\Users\redhat\Desktop\rhq-bundle-deployer-3.0.0.GA\rhq-ant-bundle-common-3.0.0.GA\bin>rhq-ant.cmd -version

C:\Users\redhat\Desktop\rhq-bundle-deployer-3.0.0.GA\rhq-ant-bundle-common-3.0.0.GA\bin>/*
'/*' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\redhat\Desktop\rhq-bundle-deployer-3.0.0.GA\rhq-ant-bundle-common-3.0.0.GA\bin>Licensed to the Apache Software Foundation (ASF) under one or more
'Licensed' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\redhat\Desktop\rhq-bundle-deployer-3.0.0.GA\rhq-ant-bundle-common-3.0.0.GA\bin>contributor license agreements.  See the NOTICE file distributed with
'contributor' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\redhat\Desktop\rhq-bundle-deployer-3.0.0.GA\rhq-ant-bundle-common-3.0.0.GA\bin>this work for additional information regarding copyright ownership.
'this' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\redhat\Desktop\rhq-bundle-deployer-3.0.0.GA\rhq-ant-bundle-common-3.0.0.GA\bin>The ASF licenses this file to You under the Apache License, Version 2.0

'The' is not recognized as an internal or external command,
operable program or batch file.
you was unexpected at this time.

C:\Users\redhat\Desktop\rhq-bundle-deployer-3.0.0.GA\rhq-ant-bundle-common-3.0.0.GA\bin>   (the "License"); you may not use this file except in compliance with

Comment 1 Larry O'Leary 2011-01-24 20:15:11 UTC
To resolve this issue:

cd modules/common/ant-bundle/src/main/assembly/bin

Download ant.bat: 
wget
https://svn.apache.org/repos/asf/gump/trunk/test/fixture/packages/ant-1.6.2/bin/ant.bat

Rename:
mv ant.bat rhq-ant.bat

Remove other OS/2 scripts:
rm antenv.cmd envset.cmd rhq-ant.cmd runrc.cmd

Comment 2 Larry O'Leary 2011-01-24 20:59:26 UTC
Created attachment 475045 [details]
Patch diff to remove unneeded files and add missing file

Comment 3 Ian Springer 2011-01-24 22:22:53 UTC
rhq-ant.bat also needs to be modified to call the RHQ Ant main class rather the standard Ant main class, and perhaps other changes (the equivalent of whatever changes were made to the rhq-ant shell script).

Comment 4 Larry O'Leary 2011-01-25 00:36:30 UTC
Created attachment 475091 [details]
Patch diff to remove unneeded files and add missing file with RHQ specific updates

Based on comment 3, I have updated the patch to include the RHQ specific changes to ant.bat. The changes are noted in the attachment but essentially the only thing that seems to have been necessary from the ant -> rhq-ant version of the script in the Windows world is:

ANT_HOME environment variable changed to RHQ_ANT_HOME
User specific pre and post configuration scripts for ANT are pulled from .rhq/rhq-antrc-pre.bat and .rhq/rhq-antrc-post.bat instead of their default of antrc-pre.bat and antrc-post.bat located in the user's home directory.
The -main ANT argument is now referencing org.rhq.bundle.ant.AntMain

The only noticable difference between the rhq-ant and rhq-ant.bat scripts is the order of the JARs loaded from the lib directory. This can be seen by running rhq-ant -diagnostics.

Comment 5 John Mazzitelli 2011-02-11 16:08:50 UTC
Created attachment 478269 [details]
rhq-ant-bat based on Ant 1.8.0 ant.bat

the bundle deployer tool utilizes Ant 1.8.0, not 1.6.2. Therefore the attached patch version of rhq-ant.bat is not fully correct. I will attach rhq-ant.bat that is based off of ant 1.8.0

Comment 6 John Mazzitelli 2011-02-11 19:55:32 UTC
this is done. note that the attended rhq-ant.bat based on 1.8 was not fully correct - missed two additional places where the -main argument needed to be passed in. I checked in the fully corrected script and I tested on WinXP and and it worked fine.

commits:
d3799e2f59f40845bdf2da3898d347ae4e795cdd
5a7f6fb357fab1abfdfe1d40735596e1f7ad5baf

Comment 7 John Mazzitelli 2011-02-11 19:56:48 UTC
last comment: "attended" should have been "attached"

Comment 8 Sunil Kondkar 2011-06-15 11:48:37 UTC
Verified on build 135 (Version: 4.1.0-SNAPSHOT Build Number: 925b384)

Downloaded and extracted the rhq-bundle-deployer-4.1.0-SNAPSHOT.zip to windows box.
Verified that the bin directory has file 'rhq-ant.bat'.
Copied deploy.xml and bundle files to the bin directory of the bundle deployer tool and deployed the bundle successfully.

Marking as verified.

Comment 9 Heiko W. Rupp 2013-09-02 07:23:47 UTC
Bulk closing of issues that were VERIFIED, had no target release and where the status changed more than a year ago.


Note You need to log in before you can comment on or make changes to this bug.