embedded@glassfish.java.net

Re: [embedded] overriding dependencies in embedded glassfish

From: Pavel Bucek <Pavel.Bucek_at_Sun.COM>
Date: Mon, 07 Jun 2010 14:39:07 +0200

On 6/4/10 5:28 PM, Siraj Ghaffar wrote:
> Pavel Bucek wrote:
>> Exactly.
>>
>> It is doable when I'm using maven embedded gf plugin,
> That's correct.
>> but its not (?) possible when I want to start embedded gf from java
>> code.
> Not directly support via the APIs. I wonder if in your code, you could
> have the classloader look up your jar(s) first?
I guess I can (I don't see another option). How can I register my class
loader to be used in glassfish? Setting current thread's context class
loader doesn't work.. (its used only for JDK classes).

>>
>>
>> On 6/4/10 5:04 PM, Siraj Ghaffar wrote:
>>>
>>> Are you trying to override the jersey stuff bundled in glassfish
>>> embedded jar with a different version of jersey?
>>>
>>> Pavel Bucek wrote:
>>>> Hello,
>>>>
>>>> I'm Jersey (JAX-RS RI) developer and I'm trying to integrate
>>>> embedded glassfish into our test framework.
>>>>
>>>> I did first tryouts with maven plugin and it works fine and does
>>>> exactly as I want, because maven has standard way how to override
>>>> plugin dependency, so I can have something like:
>>>>
>>>> <plugin>
>>>> <groupId>org.glassfish</groupId>
>>>> <artifactId>maven-embedded-glassfish-plugin</artifactId>
>>>> <version>3.0</version>
>>>> ...
>>>>
>>>> <dependencies>
>>>> <dependency>
>>>> <groupId>com.sun.jersey</groupId>
>>>> <artifactId>jersey-server</artifactId>
>>>> <version>${project.version}</version>
>>>> </dependency>
>>>> ...
>>>> </dependencies>
>>>> </plugin>
>>>>
>>>> Unfortunately, there is no way how to do this when I want to depend
>>>> on embedded gf directly and control it from java code, not from maven.
>>>>
>>>> Is there any support for overriding dependencies? I don't see
>>>> anything usable in API or documentation.
>>>>
>>>> Thanks,
>>>> Pavel
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: embedded-unsubscribe_at_glassfish.dev.java.net
>>>> For additional commands, e-mail: embedded-help_at_glassfish.dev.java.net
>>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: embedded-unsubscribe_at_glassfish.dev.java.net
>>> For additional commands, e-mail: embedded-help_at_glassfish.dev.java.net
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: embedded-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: embedded-help_at_glassfish.dev.java.net
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: embedded-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: embedded-help_at_glassfish.dev.java.net
>