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<and...@hammar.net> 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<migueldealme...@gmail.com
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-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org