I am trying to convert a “classic” JAVA EE project using IBM websphere 8.0.0.5 into a maven multi-module module project and run into problems related to IBM requirements.
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.installer-8.0.0.pm from IBM and installed it for my maven using
mvn install -f "was.installer-8.0.0.pom" -D serverInstallationFolder="C:\Program Files (x86)\IBM\WebSphere\AppServer"
This step was successful according to the output of the command line.
Then I added the following dependencies to my project, as described by IBM:
In parent:
<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 I still can’t compile my project because no IBM packages were found.
Can someone help me find and fix the mistake I made?
Edit
After I read BevynQ's comment, I copied "was_public.jar" to "was_public-8.0.0.jar" (described here by 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 changed the dependencies 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 helped to get compilation errors for import into com.ibm.websphere done.
Now I am still opening the com.ibm.ws.* package. Does anyone have an idea?
Edit 2 I added the following dependency, and then I got rid of com.ibm.ws.* import errors.
<dependency> <groupId>com.ibm.websphere.ws</groupId> <artifactId>com.ibm.ws.runtime</artifactId> <version>1.0.0</version> </dependency>
But it still does not compile, since now indirectly links cannot be found (in my case commonj.work.WorkManager ). It seems I need to add more .jars for each thing. Is there an easier way to provide all websphere banks at once as descirbe in the above related tutorial with com.ibm.tools dependency (which do not work)?