简体   繁体   中英

How to build EAR/WAR for Websphere Application Server by Eclipse?

IBM Rational Application Developer is very slow and has many problems.

I tried to use ant scripts to build EAR/WAR files for Websphere Application Server but it did not work.

If Ant can't find the WAS tasks, then it is likely that the WAS API's are missing from the Ant classpath.

See this question for other sample scripts and suggestions.

You need to make sure the jar file containing the com.ibm.websphere.ant.tasks.WSDL2Java is in your lib.path classpath.

<taskdef name="wsdl2java"
    classname="com.ibm.websphere.ant.tasks.WSDL2Java">
    <classpath refid="lib.path"/>
</taskdef>

If you're on UNIX, you can scan for this class using code similar to:

find . -type f -name "*.jar" | while read file
do
    jar tvf $file | grep WSDL2Java && echo $file
done

If RAD is slow, - try to upgrade to the latest FixPack available. - read the following article https://www.ibm.com/developerworks/wikis/download/attachments/113606723/radtipsv754.pdf?version=1

Or contact support and explain more specifically the problem.

My understanding is that you build the EAR/WAR, then open your browser, login to the admin console, then deploy your application.

If my understanding is correct, just add an instance of the WAS server to your workspace, and then right click on the server, select Add/Remove Projects and add your project. This way, you don't have to build the EAR/WAR file at all... Building your project is enough. If the build is successful, then RAD automatically builds the EAR/WAR and publishes the file to the server.

Atleast that's the way we do it.

If you're using a brand new version of Eclipse (like Helios or Indigo) that has the Marketplace, then there is the possibility of deploying directly to Websphere. Here's a link about it: Announcing the new WebSphere Application Server Developer Tools for Eclipse V8.0.4

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM