Hi Zhong, > -----Original Message----- > From: Zhong ZHENG [mailto:[EMAIL PROTECTED] > Sent: vendredi 23 septembre 2005 19:25 > To: cactus-dev@jakarta.apache.org > Subject: Migrating cactus to Maven2: how about decoupling the 'share-12- > 13-14' and 'j2ee-1x' components? > > Hi cactus team, > > I checked out the cactus source from the branch '1.7_CARGO', and tried to > migrate the framework subproject to maven 2 (without the EJB, jetty and > servlet samples, documentations, integration, and the aspectj code for > logging). I saw in your mailing archive that you are also planning to use > maven 2 for cactus, so I think this may interest you.
We want to migrate to Maven2 so it's great if you want to help us do that! Kenney has actually started a discussion about migrating to m2: http://www.nabble.com/Converting-to-maven2-t252889.html#a717165 > Here is my question in details: > > During the migration, the most difficult thing is that there are > cross-dependencies among different components: share-12-13-14 depends on > share-13-14 as well as j2ee-1x , while j2ee-1x depends on share-12-13-14 > and > share-13-14: the share-xxx component needs an implementation of, for > example, AbstractHttpServletRequestWrapper, while such implementation, > which > varies depending on the servlet spec version, is provided in the > j2ee-1xcomponent. > > So I wondered, why didn't you use a factory to create those wrapper > instances, and thus get rid of those cross-dependencies? Yes, we though about this when Cactus was created several years ago. Honestly I don't remember the reason and I'm all for re-starting the discussion about this. ATM I can think of the following: - Usually our users only use a given J2EE spec at a time so it's nice for them to have different Cactus distributions (one for J2EE 1.2, one for 1.3, one for 1.4, etc). I think we should keep this but I'm open to change my view if there are good reasons (but they must be user-oriented reasons, not just build reasons ;-)). There are 2 ways to provide those different distributions: - have a single project but different packages so that when the distribution is created classes are individually selected by their package name - have separate directory structure as we now have I believe the directory separation is way cleaner than the first method and is more in the Maven spirit. - If we had all in one big cactus jar we would have to be very careful that it doesn't not need the different versions of the J2EE jars available in the CP. This includes the use case when Cactus is dropped in some container and the container traverses the classloader and tries to load all classes. I'm not sure about this but I think I remember some issues with this in the past, a very long time ago. I don't know if it's still an issue though. - building: you would need to have all J2EE version jars available in the build classpath to build Cactus. If I want to build Cactus only for a specific J2EE version I should be able to do it without caring for the other versions. [snip] > After decoupled the components, I successfully migrated cactus framework > to maven 2. I agree that putting everything in one subproject makes it easier. However it's not the only way and it's possible to migrate to m2 even with the current structure. That's what build profiles are for. [snip] > But I am still not sure if I did things right. Maybe you have some strong > reasons not doing what I have done... Let's discuss it! I've started listing some elements above. They may or may not be correct... I'm all ears. Thanks -Vincent --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]