TaggedLibraries

Tagged libraries requirements

Author: Denis Anisimov
Version: draft 0.0.1

There is a bug filed originally on REST functionality issue 196466. However the problem is general. REST libraries are just an example of tagged libraries which needs to be used in the project classpath.

So here is the problem description : some feature related libraries could be bundled with J2EE server. One need to provide a common way how such libraries could be added in the classpath of the project. The libraries could be server deployable libraries ( they are distributed as WAR files ) and could be just a JAR files inside the server installation directory. It is also possible that libraries are not bundled with the server. In this case NB bundled libraries should be used.

From the very beginning there is a problem with set of related libraries identification : for each server one need to "hardcode" either names of jar files or impl ( spec ) name of library ( in the ServerLibrary approach ). Such hardcoding could be present on the server plugin side or external functionality but not on the client side. So "tagging" functionality is needed. We require some API which allows to client get libraries by the tag and add these libraries to the project classpath.

Such API should return "unified" libraries . Such libraries could be deployed libraries ( WAR files ) or JAR files. ServerLibrary API already exist for deployable libraries concept . Probably the same concept could be used for JAR files also and ServerLibrary class is the existed "unified" library concept which can be used for tagging. Configuration of the library will depend on essence of the library : it will be deployed by "resolve dep problem" action in case of deployable library and it will be just added into classpath file in case of Jar file.

Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo