Home » Java » java – What happened to the J2EE jar on Maven Central?-Exceptionshub

java – What happened to the J2EE jar on Maven Central?-Exceptionshub

Posted by: admin February 25, 2020 Leave a comment


I have a legacy project with this dependency:


Although, I can find this on Maven here, if I try to download the jar I get a 404.

So what happened to this jar? With what should I replace it?


How to&Answers:

That’s an old legacy jar from the Sun days, they tended to have licensing issues that prevented them from being in Maven central. If that build ever succeeded, the jar may have been hosted in a third party Maven repository.

I found this dependency… even though the group name is different it looks to be the one: https://repo.maven.apache.org/maven2/milyn/j2ee/1.4/

If that doesn’t work then your best bet is to probably find a copy of the jar somewhere, most likely on the official download site. You can then put it in your own project as a local Maven repository as described in this excellent answer. Then you can never lose access to it again.

So adapting the knowledge in that answer, the install command for the j2ee jar would look like this:

mvn org.apache.maven.plugins:maven-install-plugin:2.5.2:install-file  \
    -Dfile=/some/path/on/my/local/filesystem/j2ee.jar \
    -DgroupId=javax.j2ee -DartifactId=j2ee \
    -Dversion=1.4 -Dpackaging=jar \

Side note: that’s one long command, the way it is structured here with the slashes is just for visibility purposes.

Credit goes to Stephen C for providing the Oracle download site for the legacy j2ee 1.4 materials.