Java – Maven dependency of IBM WebSphere package

I'm trying to use IBM WebSphere 8.0 0.5 "classic" Java EE project is transformed into Maven multi module project, and faces the problem of IBM family members

We use IBM classes from the following packages:

> com. ibm. websphere. asynchbeans > com. ibm. websphere. scheduler > com. ibm. websphere. ce. cm > com. ibm. ws. asynchbeans > com. ibm. ws. util. ThreadPool

To compile my local project, I downloaded was. Com from IBM installer-8.0. 0.pm and install it into my Maven

mvn install -f "was.installer-8.0.0.pom" -D serverInstallationFolder="C:\Program Files (x86)\IBM\WebSphere\AppServer"

According to the command line output, this step is successful

Then, I add the following dependencies to my project, as described by IBM:

In parents:

<dependency>
 <groupId>com.ibm.tools.target</groupId>
 <artifactId>was</artifactId>
 <version>8.0.0</version>
 <type>pom</type>
 <scope>provided</scope>
</dependency>

In the module:

<dependency>
   <groupId>com.ibm.tools.target</groupId>
   <artifactId>was</artifactId>
 </dependency>

But because I couldn't find the IBM package, I still couldn't compile my project

Can anyone help me find and correct my mistakes?

edit

After following the bevynq prompt from the comments, I copied "was_public. Jar" to "was_public-8.0.0. Jar" (described in IBM here) and added it to my Repository:

mvn install:install-file -Dfile="C:\Program Files (x86)\IBM\WebSphere\AppServer\dev\was_public-8.0.0.jar" -DpomFile="C:\Program Files (x86)\IBM\WebSphere\AppServer\dev\was_public-8.0.0.pom"

Then I change the dependency to:

<dependency>
 <groupId>com.ibm.websphere.appserver</groupId>
 <artifactId>was_public</artifactId>
 <version>8.0.0</version>
 <scope>provided</scope>
</dependency>

 <dependency>
   <groupId>com.ibm.websphere.appserver</groupId>
   <artifactId>was</artifactId>
 </dependency>

This helps to convert imported compilation errors to com ibm. websphere.

I still open the package com ibm. ws. * Bag Does anyone have an idea?

Edit 2 I added the following dependencies, and then I got rid of com ibm. ws. * Import error

<dependency>
  <groupId>com.ibm.websphere.ws</groupId>
  <artifactId>com.ibm.ws.runtime</artifactId>
  <version>1.0.0</version>
</dependency>

But it still can't compile because the indirect reference (commonj. Work. Workmanager in my example) can't be found now It seems that I need to add more for everything jars. Use COM. Com in the link tutorial above ibm. Tools dependency (it doesn't work), is there a simpler way to provide all WebSphere jars immediately?

Solution

Generally speaking, com ibm. WebSphere is the public API used by the provider (in the packages listed above), which is similar to that in was_ public. The packages in the jar are consistent

But, com ibm. Ws packages are usually internal to the product Excuse me, com ibm. ws. What are the interface methods used in the asynchbeans package? There may be a public API alternative

About commonj Work, the only place I can find it in the WebSphere Application Server product image is was / plugins / com ibm. ws. prereq. commonj-twm. Jar, so it looks like you need to use it to compile

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>