dev@glassfish.java.net

Re: Circular build time dependency between jsp project and glassfish project

From: Sahoo <sahoo_at_sun.com>
Date: Tue, 08 Jul 2008 23:45:19 +0530

Kin-man Chung wrote:
> OK. Thanks for pointing this out to me! I'll make the change.
>
> But shouldn't the parent be
>
> org.glassfish:glassfish-parent:10.0-SNAPSHOT
>
That's again the same circular dependency problem in the transitive closure.
> since that's where hk2.version is defined?
>
> Come to think of it, maybe the packaging for JSP project shouldn;t be
> hk2-jar, but just jar. We should then create a JSP module in V3
> that imports the jar and repackage it as a hk2-jar.
The answer depends on what you want to produce? Do you want to produce
a) HK2 module or b) OSGi bundle or c) HK2 module as well as OSGi bundle
or d) only a plain jar file? V3 can work with #b or #c. To work with #d,
v3 has to repackage and that is something we do not want to do.
> That way, JSP is
> not dependent on HK2, and V3 can use a new version of hk2 without
> having to rebuild JSP, thus avoiding the recent build issues.
>

With my latest change in hk2-maven-plugin, you no longer have to rebuild
jsp project when hk2 changes as long as the change in hk2 is backward
compatible. The runtime would be happy to use a later version of hk2
than what was used during build.

Thanks,
Sahoo

> -Kin-man
>
>
> Sahoo wrote:
>> Kin-man,
>>
>> There is a circular dependency between 1.0-SNAPSHOT of JSP project
>> and 10.0-SNAPSHOT of GlassFish as shown below:
>>
>> jsp/pom.xml:
>> ----------------
>>
>> <parent>
>> <groupId>org.glassfish.web</groupId>
>> <artifactId>web</artifactId>
>> *<version>10.0-SNAPSHOT</version>*
>> </parent>
>> <artifactId>jspimpl</artifactId>
>> <packaging>hk2-jar</packaging>
>> <version>1.0-SNAPSHOT</version>
>>
>> v3/web/webtier/pom.xml:
>> --------------------------------
>>
>> <dependency>
>> <groupId>org.glassfish.web</groupId>
>> <artifactId>jspimpl</artifactId>
>> *<version>${jspimpl.version}</version>*
>> </dependency>
>>
>> where, jspimpl.version=1.0-SNAPSHOT.
>>
>> It appears to me that jsp project has just been pulled out of v3/web
>> without making necessary changes to its pom.xml. Don't set
>> org.glassfish.web:web:10.0-SNAPSHOT as its parent, set
>> org.glassfish:pom:2 as the parent.
>>
>> Thanks,
>> Sahoo
>>