dev@glassfish.java.net

Re: pom review for adding the inject apis in the javaee apis module

From: Sahoo <Sahoo_at_Sun.COM>
Date: Tue, 06 Oct 2009 23:14:36 +0530

Ludovic Champenois wrote:
>> I guess things are working because of includes that contains artifact
>> names. As I mentioned, I certainly don't know the history of this
>> file. Can you try making the change and let me know what you see?
>> BTW, do you agree that adding javax.inject:inject-api is wrong?
>>
> I agree with nothing...
There are two artifacts which JSR330 APIs as you can see here:

http://www.mvnbrowser.com/artifacts-search.html?page=1&search=javax.inject

I see you have specified the artifact name as javax.inject:inject-api in
api-assembly.xml. How do we know which one to use? It can change from
one version of webbeans-osgi-bundle to another, right?

Since you changed the dependency to webbeans-osgi-bundle from jsr299-api
in the pom.xml, an appropriate fix in api-assembly.xml would have been this:
- <include>org.jboss.webbeans:jsr299-api</include>
+ <include>org.jboss.webbeans:webbeans-osgi-bundle</include>

After making this change, you can see javax.inject being part of the api
jar. You will also see some non-javax stuff being part of the jar. To
fix that, you need to add appropriate patterns in <excludes>.

Same applies to web-api-assembly.xml as well.

Thanks,
Sahoo