0

While I was able to find many WebSphere Liberty related jar files based on question Liberty Maven repo for 17.0.0.1 not found I am still not able to find the repo containing jar files like:

  • com.ibm.ws.javaee.servlet.3.1_1.0.13.jar
  • com.ibm.ws.javaee.websocket.1.1_1.0.13.jar
  • com.ibm.ws.logging-1.0.16.jar
  • com.ibm.json4j_1.0.16.jar

Could someone help point me to the proper repo for these jars? Thanks in advance.

Community
  • 1
  • 1
wnm3
  • 381
  • 3
  • 17

1 Answers1

2

For WebSocket 1.1:

<dependency>
    <groupId>javax.websocket</groupId>
    <artifactId>javax.websocket-all</artifactId>
    <version>1.1</version>
</dependency>

For Servlet 3.1:

<dependency>
    <groupId>javax.servlet</groupId>
    <artifactId>javax.servlet-api</artifactId>
    <version>3.1.0</version>
</dependency>

The json4j jar you mention isn't an API jar in Liberty, it is com.ibm.websphere.appserver.api.json_1.0.16.jar, but the maven dependency is:

<dependency>
    <groupId>com.ibm.websphere.appserver.api</groupId>
    <artifactId>com.ibm.websphere.appserver.api.json</artifactId>
    <version>1.0.16</version>
</dependency>

The logging jar mentioned is part of the Liberty internals so is not available in maven central.

Alasdair
  • 3,071
  • 15
  • 20
  • IIRC, using the websphere.appserver.api.json failed because it needed another internal class that isn't packaged with it: com/ibm/json/java/internal/Parser.class com/ibm/json/java/internal/Serializer.class com/ibm/json/java/internal/SerializerVerbose.class com/ibm/json/java/internal/Token.class com/ibm/json/java/internal/Tokenizer.class which are shipped with the com.ibm.json4j.jar file in Liberty 17.0.0.1 – wnm3 May 17 '17 at 19:50
  • So, for use in non-web applications we could use the websphere.api.json and run them as Liberty clients to find the rest of the dependencies. – wnm3 May 17 '17 at 21:04
  • We don't provide the IBM JSON4J for use outside web apps. It isn't a strategic API, if you want use outside an app server there is JSON-P or Apache Wink JSON4J which is more similar to IBM JSON4J than JSON-P. – Alasdair May 17 '17 at 23:32
  • org.apache.wink.json4j throws an exception around put methods... making refactoring a nuisance. But it does preserve the sorted output for consistent serialization. Thank you for the suggestions. – wnm3 May 18 '17 at 14:58
  • Alas, Apache Wink has been retired last month (4/25/17). – wnm3 May 18 '17 at 15:03