0

Websphere offers a set of provided jars, including com.ibm.ws.ejb.thinclient_8.5.0.jar, com.ibm.ws.batch.runtime.jar, com.ibm.ws.orb_8.5.0.jar, etc.

In the ANT build process, some people had these files on the classpath. Now we are moving to Maven, and I am not sure what I should do with these files:

  • If they should be part of the build process, I need to put them into the repository. But how should I get or generate proper POMs for them?

  • If they should not be part of the build process, what are proper replacements?

J Fabian Meier
  • 33,516
  • 10
  • 64
  • 142

2 Answers2

3

If you are using a company maven repository as a proxy to maven central, the best thing to do is to make these jar files available there:

mvn install:install-file -Dfile=<path to the jarfile> -DgeneratePom=true -Dpackaging=jar -Dversion=<version> -DgroupId=<groupId> -DartifactId=<artifactId>

In such a case the groupId is usualy composed by your company prefix and then the base package of the artifact. The artefactId would be the last part without the version. For example for com.ibm.ws.ejb.thinclient_8.5.0.jar, the version is 8.5.0, the artifactId thinclient and the groupId something like com.example.thirdparty.com.ibm.ws.ejb. The same approach works as well if you are the sole developer and install these artifacts in your local repository.

See also the official documentation

Another approach would be to have these files as part of the project and reference them through a local path and install it from there either using the maven-install-plugin or by issuing the steps from the first approach as part of the build process. See Maven and adding JARs to system scope and Maven: add a dependency to a jar by relative path.

Disclaimer: I always used the first option, as this seems to be the proper way.

Community
  • 1
  • 1
hotzst
  • 7,238
  • 9
  • 41
  • 64
  • Thank you. Actually, I was looking for a more Websphere-specific answer because your method just creates empty poms for each of the jars. I hoped that there are predefined poms somewhere on the web or at IBM. – J Fabian Meier Jun 10 '16 at 12:52
  • 1
    @JFMeier there are not publicly available maven artifacts for the WebSphere thinclient jars. Your best option IMO is to create local maven artifacts from your local install as hotzst has suggested – Andy Guibert Jun 10 '16 at 15:47
1

Try the "was_public" JAR and POM shipped along with WebSphere Application Server traditional, starting with Version 8.

See here.

Scott Kurz
  • 4,985
  • 1
  • 18
  • 40
  • 1
    How does the was_public.jar relate to all the other Websphere jars, like the ones mentioned in the question? – J Fabian Meier Jun 15 '16 at 14:56
  • The purpose is to provide the publicly-documented APIs, not the various client runtimes. E.g. it has the batch APIs, but doesn't have the ORB runtime classes. So you still might have a need to bring the JARs into your local repository as the other answer mentioned, but this at least answers the question of "where can I find some IBM-defined POMs for WebSphere APIs". – Scott Kurz Jun 15 '16 at 15:26
  • Actually, the pom of was_public does not define any dependencies. But thank you for the hint. – J Fabian Meier Jun 15 '16 at 15:35