dev@glassfish.java.net

Please review pom.xml issue 9637

From: Bhakti Mehta <Bhakti.Mehta_at_Sun.COM>
Date: Tue, 22 Sep 2009 13:13:12 -0700

Jane,
Sahoo filed this bug [Issue 9637] [web_services] New - jsr109 module
depends on kernel]. I have attached the other thread where you have
mentioned since we depend on kernel classes.jar does not need to be
added to bootclasspath. I have removed kernel but not added classes.jar
to bootclasspath yet the build went fine for me

Please can you review and let me know if I should commit this?
Thanks,
Bhakti

Index: pom.xml
===================================================================
--- pom.xml (revision 31707)
+++ pom.xml (working copy)
@@ -116,11 +116,6 @@
             <artifactId>hk2</artifactId>
         </dependency>
         <dependency>
- <groupId>org.glassfish.core</groupId>
- <artifactId>kernel</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
             <groupId>org.glassfish.deployment</groupId>
             <artifactId>dol</artifactId>
             <version>${project.version}</version>



attached mail follows:



Hi Bhakti,

I did a little more digging. Looks like if you have kernal artifact as
a depenency, the build succeeds w/o classes.jar in bootclasspath:

        <dependency>
            <groupId>org.glassfish.core</groupId>
            <artifactId>kernel</artifactId>
            <version>${project.version}</version>
        </dependency>

When kernel artifact is specified in pom.xml, classes.jar automatically
gets added to classpathElements when executing hk2-compile.
I added this dependency in deployment/dol/pom.xml and removed
classes.jar from bootclasspath and sure enough the build succeeded. I
suspect that somehere in kernel artifact, classes.jar is specified.

My take right now is that since webservices/jsr109-impl is compiling
just fine on Mac w/o classes.jar, let's just leave it alone. I don't
want to add anything to the build and not knowing the side-effects.
Let me know if you're okay with this.

Thanks,
Jane

cc'ing Tim to update him on this.



Bhakti Mehta wrote:
> Thanks Jane.
>
> Jane Young wrote:
>> I'll try it on a Solaris-Sparc and will let you know. If Byron has
>> time, I will ask him to try it on Windows. I will also let you know...
>>
>> Jane
>>
>>
>> Bhakti Mehta wrote:
>>> Jane,
>>> I do not have a non mac platform. Do you have one you can experiment
>>> with by removing rt.jar. I will really not want to remove rt.jar
>>> even if we dont add classes.jar. And so many classes are used from
>>> rt.jar like Exception,Throwable,Class etc. Not sure how it works on
>>> mac without Classes.jar in the bootclasspath but it has to fail on win.
>>> Regards,
>>> Bhakti
>>>
>>> Jane Young wrote:
>>>> Hi Bhakti,
>>>>
>>>> The path separator is a different issue. When I remove rt.jar, it
>>>> builds successfully. Can you try removing rt.jar and compile on a
>>>> Mac and non-Mac platforms. Also, do you know if the code is
>>>> referencing any packages from rt.jar/classes.jar?
>>>>
>>>> Thanks,
>>>> Jane
>>>>
>>>>
>>>> Bhakti Mehta wrote:
>>>>> Jane,
>>>>> Remember the build failed on windows due to path separator issue
>>>>> which you fixed. rt.jar should be there when we add bootclasspath
>>>>> I am sure it will fail on non mac platforms without rt.jar
>>>>> Regards,
>>>>> Bhakti
>>>>>
>>>>> Jane Young wrote:
>>>>>> Hi Bhakti,
>>>>>>
>>>>>> Is webservices/jsr109-impl referencing packages in
>>>>>> rt.jar/classes.jar? When I remove rt.jar from bootclasspath, the
>>>>>> module built successfully. If it's not needed, perhaps remove
>>>>>> rt.jar instead of adding classes.jar?
>>>>>>
>>>>>> Thanks,
>>>>>> Jane
>>>>>>
>>>>>>
>>>>>> Bhakti Mehta wrote:
>>>>>>> Jane,
>>>>>>> I read your feedback to Hong and would request to add this to
>>>>>>> the pom.xml so that Classes.jar is found in bootclasspath
>>>>>>> Please can you approve
>>>>>>>
>>>>>>> Thanks,
>>>>>>> Bhakti
>>>>>>> ===================================================================
>>>>>>> --- pom.xml (revision 30728)
>>>>>>> +++ pom.xml (working copy)
>>>>>>> @@ -86,7 +86,7 @@
>>>>>>> <artifactId>hk2-maven-plugin</artifactId>
>>>>>>> <configuration>
>>>>>>> <compilerArguments>
>>>>>>> -
>>>>>>> <bootclasspath>${project.build.directory}/endorsed/webservices-api-osgi-${webservices.version}.jar${path.separator}${project.build.directory}/endorsed/jaxb-api-osgi-${jaxb.version}.jar${path.separator}${java.home}/lib/rt.jar</bootclasspath>
>>>>>>>
>>>>>>> +
>>>>>>> <bootclasspath>${project.build.directory}/endorsed/webservices-api-osgi-${webservices.version}.jar${path.separator}${project.build.directory}/endorsed/jaxb-api-osgi-${jaxb.version}.jar${path.separator}${java.home}/../Classes/classes.jar${path.separator}${java.home}/lib/rt.jar</bootclasspath>
>>>>>>>
>>>>>>> </compilerArguments>
>>>>>>> <fork>true</fork>
>>>>>>> <archive>
>>>>>>>
>>>>>>
>>>>
>>>>
>>