Hi Simon,

Excellent explanation.  It all makes much more sense now.  I'll give it go.

Thanks again,
- Ole


simon wrote:
On Mon, 2007-12-17 at 09:52 -0600, Ole Ersoy wrote:

This is what I did initially (Might be valuable in case there are some build 
issues):
svn co http://svn.apache.org/repos/asf/myfaces/shared/branches/3_0_0 
myfaces-shared-3.0.0
Then made the change, deleted myfaces from the repository, and rebuilt.  My 
assumption was that these changes would replace the dependencies needed by the 
webapp dependencies (And it did seem to work because maven only downloaded 
non-shared artifact):

      <dependency>
         <groupId>org.apache.myfaces.core</groupId>
         <artifactId>myfaces-api</artifactId>
         <version>1.2.0</version>
         <scope>runtime</scope>
      </dependency>

      <dependency>
         <groupId>org.apache.myfaces.core</groupId>
         <artifactId>myfaces-impl</artifactId>
         <version>1.2.0</version>
         <scope>runtime</scope>
      </dependency>

However the the webapp worked the same way as before, even with everything 
commented out in the renderer.

What happens when you *build* the shared jar is that multiple jars are
generated:
  * shared-impl
  * shared-tomahawk
  * etc
each with a renamed version of the classes in the shared project.

Then when you build myfaces-impl.jar, it fetches shared-impl and copies
all the .class files into its own jar.

This trickery is done so that there is only one lot of shared source to
maintain, write unit tests for, etc. But a user can simultaneously use
myfaces-impl that was build with shared-3.0.0 and tomahawk that was
build with shared-3.0.2.

Without this, myfaces would have to either re-release all projects any
time we release a new shared version (even when the changes only affect
one user of shared), or ensure complete binary and functional
compatibility between shared releases, even though the api is private
and internal to the myfaces subprojects.

But yes it does make debugging/building a little trickier.

In your case, once you have rebuild shared, you then need to rebuild
myfaces-impl so that it imports those changes into its jar. Or, just for
testing purposes, you can ensure your modified shared-impl jar is
earlier on the classpath than myfaces-impl, so the new classes are used
instead of the old ones inside myfaces-impl.

Note that normally there is no shared-* jar on the classpath; the
classes are embedded inside other jars. Have a look at the contents of
the myfaces-impl.jar file...

Regards,

Simon


Reply via email to