Return-Path: Delivered-To: apmail-maven-users-archive@www.apache.org Received: (qmail 72396 invoked from network); 25 Jan 2011 16:33:41 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 25 Jan 2011 16:33:41 -0000 Received: (qmail 62181 invoked by uid 500); 25 Jan 2011 16:33:39 -0000 Delivered-To: apmail-maven-users-archive@maven.apache.org Received: (qmail 62055 invoked by uid 500); 25 Jan 2011 16:33:38 -0000 Mailing-List: contact users-help@maven.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Maven Users List" Reply-To: "Maven Users List" Delivered-To: mailing list users@maven.apache.org Received: (qmail 62047 invoked by uid 99); 25 Jan 2011 16:33:38 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 25 Jan 2011 16:33:38 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [207.183.49.139] (HELO production.artifact-software.com) (207.183.49.139) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 25 Jan 2011 16:33:32 +0000 Received: from [192.168.3.176] (unknown [192.168.3.176]) by production.artifact-software.com (Postfix) with ESMTP id 36EC26A7A29 for ; Tue, 25 Jan 2011 11:33:10 -0500 (EST) Message-ID: <4D3EFB44.5020804@artifact-software.com> Date: Tue, 25 Jan 2011 11:33:08 -0500 From: Ron Wheeler User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-GB; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7 MIME-Version: 1.0 To: users@maven.apache.org Subject: Re: One project per package or multiple packages in same project? References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org 1) get your Database coords and other deployment properties out of the project and onto your servers. Use JNDI. Two advantages - your builds are simpler and less prone to nasty run-time surprises and you can actually run the WAR file that you tested not some other WAR file that you made after you tested which now has production values in it 2) Break your one BIG project into smaller projects that can be developed and tested separately. Look at moving to SOA. Eclipse can handle lots of projects. Our application is made up of over 70 independent Eclipse projects. No problem. Ron On 25/01/2011 6:14 AM, Miguel Almeida wrote: > Anders, > > Is what you propose possible without repeating the War files? ie, I > currently have *one* WAR project, where I have all the xml, jsp and java > files for the web app. > The only difference between the development and production environments is a > few configs like: on line in the database.xml has jdbc:...db, the other has > jdbc....db-test. > Are you suggesting having one WAR with all the code, html and xmls, and then > some void war projects that depend on it? I'm not even sure that would work > in an IDE environment like Eclipse. > > On Tue, Jan 18, 2011 at 11:04 AM, Anders Hammar wrote: > >> Have different projects for the different wars and then externalize any >> configuration stuff outside of your wars. >> We've been over this many times now. Here's one thread in the archive: >> http://www.mail-archive.com/users@maven.apache.org/msg115082.html >> >> /Anders >> >> On Tue, Jan 18, 2011 at 11:17, Miguel Almeida>> wrote: >>> Hi, >>> >>> In >>> >>> >> http://maven.40175.n5.nabble.com/Maven-Problem-in-including-excluding-some-java-packages-in-the-src-while-creating-a-jar-td2641836.htmlAnders >>> strongly discouraged having more than one package per project. >>> >>> However, I have a Maven conceptual doubt regarding this and thought you >>> might be able to help. >>> >>> I have a webapp project in the format: >>> >>> -Parent >>> ------ModuleServices >>> ------ModulePersistence >>> ------ModuleWeb >>> >>> Packaging the Parent returns what I am really interested in, the .WAR >> file >>> returned from the ModuleWeb. >>> >>> However, I do need more than one WAR: two for the client (one with a test >>> profile, with some test configuration strings like test-db and that >> returns >>> a myproject-test.war; and another myproject.war which will be the >>> production >>> environment). Both will be installed on the same machine. >>> >>> Now, in addition to this, you also might see that these .war will be >>> specific to a particular client (it's his db, his credentials..). >>> >>> Until I saw this post, I had different maven profiles (these 2 plus a >>> development one) and my only doubt was "which profile will be active when >> I >>> deploy the maven artifact?). Now it got me thinking: should I have one >>> project per profile instead? Although I follow your logic, this approach >>> seems cumbersome and I'm not even sure how I'd implement it. >>> >>> Can you share your thoughts on how the best Maven approach would be? >>> >>> Thank you for your help, >>> >>> Miguel Almeida >>> --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@maven.apache.org For additional commands, e-mail: users-help@maven.apache.org