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 <[email protected]> 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/[email protected]/msg115082.html > > /Anders > > On Tue, Jan 18, 2011 at 11:17, Miguel Almeida <[email protected] > >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 > > >
