Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to install application thru ant task?

 
Smith Magadia
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I've been trying to install application thru ant task and obviously I need help! Please let me know what wrong with my code and how to properly do that.

Below is my sample build ant code:

<taskdef name="wsInstallApp" classname="com.ibm.websphere.ant.tasks.InstallApplication"/>

<target name="install">
<wsInstallApp ear="${ear.path}"/>
<wsStartApp application="${ant.project.name}"/>
</target>


And here are the log messages:

install:
[wsInstallApp] Installing Application [C:\smith\projects\motiva\Development\Sour
ce\original\motiva.war]...
[wsadmin] WASX7209I: Connected to process "server1" on node NEWGRANGENode01 us
ing SOAP connector; The type of process is: UnManagedProcess
[wsadmin] WASX7017E: Exception received while running file "C:\DOCUME~1\c-smit
hm\LOCALS~1\Temp\wsant55873jacl"; exception information: com.ibm.ws.scripting.Sc
riptingException: WASX7134E: "contextroot" option must be specified for war file
installation.

[wsadmin] Java Result: 105
[wsInstallApp] Installed Application [C:\smith\projects\motiva\Development\Sourc
e\original\motiva.war]
[wsStartApp] Starting Application [motiva]...
[wsadmin] WASX7209I: Connected to process "server1" on node NEWGRANGENode01 us
ing SOAP connector; The type of process is: UnManagedProcess
[wsadmin] WASX7017E: Exception received while running file "C:\DOCUME~1\c-smit
hm\LOCALS~1\Temp\wsant55874jacl"; exception information: javax.management.MBeanE
xception
[wsadmin] com.ibm.ws.exception.ConfigurationWarning: Application motiva not in
stalled

[wsadmin] Java Result: 105
[wsStartApp] Started Application [motiva]

all:

BUILD SUCCESSFUL
Total time: 53 seconds


Thanks a million for whatever help or assistance!
 
Smith Magadia
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm sorry, my sample ant code:

<taskdef name="wsInstallApp" classname="com.ibm.websphere.ant.tasks.InstallApplication"/>

<target name="install">
<wsInstallApp ear="${ear.path}"/>
<wsStartApp application="${ant.project.name}"/>
</target>
 
Smith Magadia
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<taskdef name="wsInstallApp" classname="com.ibm.websphere.ant.tasks.InstallApplication"/>
<target name="install">
<wsInstallApp ear="${ear.path}"/>
<wsStartApp application="${ant.project.name}"/>
</target>
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34095
337
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Smith,
To get the ant code to display, you need to escape the < as &lt; and the > as &gt;. Eric, one of our bartenders, has a web page that lets you cut and paste code into it to escape the characters for you.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic