SQL Zone is brought to you in partnership with:

Software developer and architect, Java EE/SE. IT Consultant since 1994. Certified Java Architect. Certified SCRUM Master. Certified Java Programmer. Broad experience in developing, delivering and maintaining large and small software systems in large and small organizations. Server side expert. Client side expert. Finished about 40 software projects. Proud designer and owner of a Linux-controlled garden lighting. Daniel has posted 1 posts at DZone. You can read more from them at their website. View Full User Profile

Oracle and Maven

09.21.2012
| 6077 views |
  • submit to reddit

Oracle has a problem with Maven and the negative effects of that is spreading to us Java developers.

I do not think it is an intentional Oracle strategy to avoid Maven, I think it is more of a Sun cultural legacy combined with loss of momentum in the transition to Oracle, but I really cannot tell.

The majority of Java projects active today I hear about are using Maven. Almost all new projects are based on Maven. Yet there are no Oracle examples, tutorials, legal constructions or anything else I can find, supporting Maven. Wouldn't it be nice if there were?

There are Oracle initiatives to support Maven but they seems fairly limited. Oracle continue to release major software with technical and legal constructions that make it so hard to use with Maven that one might think it is intentional attack on Maven. One example is JavaFX 2 with a distribution license making it incompatible with Maven.

Another annoying example is the javaee*-api artifacts in repo1.maven.org without method bodies. You get errors like

java.lang.ClassFormatError: Absent Code attribute in method that is not native or abstract in class file javax/ws/rs/core/MediaType

(workarounds for that here).

It is claimed that the implementations are not needed because the container will provide these. I write unit tests, and I observe that you cannot execute any unit tests in a Maven module declaring a dependency to such an artifact.

Moreover, the Oracle artifacts are lacking javadoc and source, which seems to be a systematic problem. Publishing artifacts like this may waste my time more than if Oracle did not publish them at all (from that perspective maybe it is a feature that the Oracle JPA 2 artifact is missing).

I think it is fair to require of Oracle to either express a strategy for avoiding Maven and present an alternative technology, or to stop messing with us Java developers requiering separate downloads and malformed artifacts. The best alternative would be if Oracle started using and supporting Maven.

Published at DZone with permission of its author, Daniel Marell.

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)

Comments

Jonathan Fisher replied on Sat, 2012/09/22 - 7:47am

I agree! The easier you can get the libs into developers hands, the faster the speed of adoption.

Zemian Deng replied on Sat, 2012/09/22 - 12:52pm

Your workaround link in the post is broken. Not sure if it mention there or not, but a practical workaround is to use a internal maven repository (eg: Nexus) and then upload Oracle jars there. 

I agree too that Oracle is lacking very much on Maven support. I also think Java EE api jars are most annoying, and another often used library is Oracle database jdbc jar. Even if one are willing to do their behave by hosting publicly, their license restrictions might preventing it to happen too. These certainly cause many painful steps to get EE started with Maven.

I have to give shout out to JBoss developers here because they have step up way above Oracle in this area. One can get started any Java EE projects easily using JBoss's Nexus maven repository here  https://repository.jboss.org/nexus/index.html. JBoss has not only released their product there in a consistent manner, but also host many other supporting artifacts as well. 

Zemian Deng 

Daniel Marell replied on Sat, 2012/09/22 - 1:15pm

Both links are broken. Sorry for that.

Here is the first one: http://weblogs.java.net/blog/ludo/archive/2007/01/java_ee_5_apis.html

And the other one (as usual, stackoverflow is providing a good solution): http://stackoverflow.com/questions/3424207/testing-against-java-ee-6-api

Markus Eisele replied on Sat, 2012/09/22 - 1:24pm

Hi,

 

here is my longer response:

http://blog.eisele.net/2012/09/oracle-and-maven-love-story-out-of-he.html

 

- M 

Daniel Marell replied on Sat, 2012/09/22 - 6:54pm in response to: Markus Eisele

Markus, after reading your response and re-reading my article I got your comment about the tone and about generalizing things. And after doing some more homework I realize that this is not a systematic problem after all. You wrote about maven-glassfish-plugin. I'm a fan of Glassfish and I'm happily using maven-glassfish-plugin every day! I actually forgot who made that possible. We tend to forget things that just works.  

I'm glad to hear that you do not percieve that Oracle have a general problem with Maven nor distributing well-formed artifacts nor distribution licenses that works with Maven. This is the kind of answer I want. If this is the case, you are right that any complains are better adressed directly where they belong instead of this way. 

It would be wonderful if we agreed about that there is no general reason for Oracle to publish any apis or reference implementation artifacts without source and documentation. In that case, I rest my case!

 Some things on my list:

 

 

Markus Eisele replied on Mon, 2012/09/24 - 1:42am in response to: Daniel Marell

Hi Daniel,

 

thanks for your reply. I think the kind of examples given in your list makes this post more valueable!

- M 

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.