开发者

How to mange dependencies for a Glassfish JavaEE client application?

开发者 https://www.devze.com 2023-01-17 19:15 出处:网络
JBoss has the jbossall-client.jar which can be used in client applications for JNDI lookups a开发者_运维知识库nd more... It is available in the JBoss maven repository.

JBoss has the jbossall-client.jar which can be used in client applications for JNDI lookups a开发者_运维知识库nd more... It is available in the JBoss maven repository.

How should one do it when using Glassfish 3 in a dependency managed environment?

The FAQ says in step 3 that one should refer directly to gf-client.jar in the installation directoy of glassfish. The gf-client.jar only has relative references to other JARs in glassfish installation directory. So putting the gf-client.jar in a private repository is no option, unless you are willing to put alls the refered JARSs into the repository, too. But that is no good, because then you have to put the manually to the correct relative location.

There is a package-appclient script which generates a appclient.jar, which is not directly usable in a classpath, because it mainly just a ZIP-file containing all needed JARs for a client. Of course you could put appclient.jar in the repository and then do all the extraction and classpath-building in a build script, but should I really do it this way?

Is there any other way to do it, or better how it is intended to use this appclient.jar?

Have I overseen a "glassfishall-client.jar"?


I'm not familiar with your exact problem but I can speak on one of your statements:

So putting the gf-client.jar in a private repository is no option, unless you are willing to put alls the refered JARSs into the repository, too. But that is no good, because then you have to put the manually to the correct relative location.

I manage our local repository and I can tell you, it's very easy to include "alls the refered JARSs into the repository." To do so, you run the install task with transitive set to true. That looks like this:

<ivy:install organisation="[orgName]" module="[modName]" revision="[rev]"
from="myRepositoryChain" to="myLocalResolver" transitive="true" />

It's hard to tell from your question but I'm guessing the problem is that some of those dependencies are only available directly from JBoss? As long as you include the appropriate repository in your "myRepositoryChain," it all will work, effortlessly.

If these jars are hard to access, then that's all the more reason to pull them into your local repository, somewhere.

I hope that helps, in some way.

Here's a great resource for more info on managing a local ivy repository.

0

精彩评论

暂无评论...
验证码 换一张
取 消