What happened to the J2EE jar on Maven Central?

Aurasphere :

I have a legacy project with this dependency:

<dependency>
    <groupId>javax.j2ee</groupId>
    <artifactId>j2ee</artifactId>
    <version>1.4</version>
</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?

Thanks

Gimby :

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 \
    -DlocalRepositoryPath=${project.basedir}/local-maven-repo

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.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=11747&siteId=1