Return-Path: Delivered-To: apmail-cayenne-dev-archive@www.apache.org Received: (qmail 19351 invoked from network); 18 Apr 2011 10:10:31 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 18 Apr 2011 10:10:31 -0000 Received: (qmail 29758 invoked by uid 500); 18 Apr 2011 10:10:31 -0000 Delivered-To: apmail-cayenne-dev-archive@cayenne.apache.org Received: (qmail 29685 invoked by uid 500); 18 Apr 2011 10:10:31 -0000 Mailing-List: contact dev-help@cayenne.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cayenne.apache.org Delivered-To: mailing list dev@cayenne.apache.org Received: (qmail 29675 invoked by uid 99); 18 Apr 2011 10:10:30 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 18 Apr 2011 10:10:30 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of grobmeier@gmail.com designates 209.85.210.171 as permitted sender) Received: from [209.85.210.171] (HELO mail-iy0-f171.google.com) (209.85.210.171) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 18 Apr 2011 10:10:24 +0000 Received: by iyi20 with SMTP id 20so5606853iyi.16 for ; Mon, 18 Apr 2011 03:10:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:from:date :message-id:subject:to:content-type:content-transfer-encoding; bh=bXL0TgCxeauud1/OeBRKoZ0WywvqHIfpk0S4mnLNo9A=; b=UIBDEo5ZmxgscMBGArN1cPAbZsETQpHP5CR0O/q+5XYY2iY3vFklnmJZEshUn4sdEA YWBfHhumK3Ol+9yQcN9IxFl8Ch2Bx3XnpVw12ejpVh9702Lvdr1809vuE6iP4/VhsUXT fIAKq7Jc42z5w4xu2LuRkt1Q5XQ6zWWu63ghE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; b=YjBTeEhu2FGDGO98V3ZeqnbajjICatdfpRpr48uv/XRlXiukc6iVr9dDe5/kDzP0T3 +araAeFuMEpDlz66MQUppuFChsIa6hOfvAwrsz5gD6kGKE6YRGETE4YTwlZVI/X8ayYd z0gTs3EpjFewO1IZ0cse6dT9mg5o4hd4h5RCU= Received: by 10.42.176.2 with SMTP id bc2mr6186317icb.275.1303121404042; Mon, 18 Apr 2011 03:10:04 -0700 (PDT) MIME-Version: 1.0 Received: by 10.43.56.6 with HTTP; Mon, 18 Apr 2011 03:09:44 -0700 (PDT) In-Reply-To: References: From: Christian Grobmeier Date: Mon, 18 Apr 2011 12:09:44 +0200 Message-ID: Subject: Re: Maven: Aggregation and unpublished modules To: dev@cayenne.apache.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hello, I can only answer from a user perspective now. I have started to dig a little more deep into Cayenne and found the current maven usage very confusing. I prefer to learn one thing (mvn) and then use it all over the time. It was really shocking for me this is not the case with Cayenne. Its like opening source code and the brackets are on the wrong line, like in Wicket ;-) > The original idea of having "private" (aka "unpublished") modules that ar= e aggregated into bigger public modules was about consistent picture that w= e wanted to present to the end users. In these mvn days people seem to drill down their apps to small jars. I don't see a benefit of one big jar anymore. Mvn (and in ant world ivy) is getting all necessary jars for me - I really don't care. With one exception: if i want to download for example a json lib and it has a dependency to a code generator of a specific version. In this case I care because I am afraid another jar dependency is using the same dependency in another version. But I would not mind if I have 5 cayenne jars (or more, or less). I know this situation from frameworks like Spring or Hibernate. > I always imagined ideal Cayenne as a self-contained drag-and-drop lib tha= t does not require special installation, and ideally has no third-party dep= endencies. It originated from the earlier days of manual CLASSPATH, but som= e of this has merit these days as well. Third-party dependencies have versi= on conflicts with same dependencies coming from other libs, so we worked on= reducing the number of them (in 3.1 it is just c-collections which should = go too, c-logging and velocity.). Reducing dependencies is another story - and I actually like the small third party libs idea of cayenne. But a reduced number of libs and a huge aggregated jar of self-written classes are two different shoes imho > Now a single Cayenne jar does not have direct technical benefits. In a wa= y it is a "feel good" thing these days. However let's look at the factors t= hat led us to creating it: I agree - I remember the pain when maven was not there (or ivy) > 1. Cross JDK builds. We don't have it in this iteration, but we used to h= ave it before and may have it in the future. A single jar would provide fea= tures of the newer Java under newer JRE, and seamlessly degrade under older= JRE (e.g. that's how we implemented annotations support). How is Hibernate doing it? They have a similar feature with their annotatio= ns. Probably there is a chance to solve this with maven profiles. > So say we refactor everything, merge cayenne-di with parts of cayenne-ser= ver into a new cayenne-common, remove all the kludges and start supporting = Java 9 extensions. Java 9 extensions? Can you give more information - I don't know what you me= an >The runtime modules will be these: > > * cayenne-common.jar (say we merge di in here) > * cayenne-common-java9.jar > * cayenne-server.jar > * cayenne-server-java9.jar > * cayenne-client.jar > * cayenne-client-java9.jar > > plus some build or other extensions: > > * cayenne-project.jar > * cayenne-tools.jar > * cayenne-lifecycle.jar > > So should we aggregate them for downloadable distro, but not Maven? Shoul= d we give up on aggregation completely and use other means to reduce confus= ion? Imho: Use a standard maven build. No aggregation. In other terms, the jars you mentioned a perfectly understandable. I can fully accept each of them in my app as a dependency. Still my app has a dependency to cayenne-server.jar only. cayenne-server.jar does care bout its dependencies. If one wants a downloadable distro - we can create an assembly.xml for that. I think even aggregated builds are easily possible with an assembly file: jar-with-dependencies http://maven.apache.org/plugins/maven-assembly-plugin/usage.html my 2 cents- but I am in full favour of this approach as you probably have seen in an email before a few days (which was not the easy to understand, I admit). Cheers, Christian > > (Also notice that I am not touching the Modeler in this discussion as the= Modeler distro is opaque and we can reorganize it internally as much as we= 'd like. I am only concerned about the runtime libraries and somewhat about= the build tools). > > Andrus > > > --=20 http://www.grobmeier.de