You are right of course.

The point was to explain how not to have duplicate source code and how not to make jars depend on wars.

As an aside:
I prefer to write libraries of code (deployed as jars) that perform all of the functions that are not related to the view since the model and controller can often be reused in webservices and standalone batch jobs. They are also easier to test and release since they do not require human interaction which war files almost always do. (you can run all the unit tests in the world but if the text on the screen is wrong or the wrong colour or size, you still can't put it in production)

The point was to explain how not to have duplicate source code and how not to make jars depend on wars.

Ron

On 11/11/2010 10:16 AM, Antonio Petrelli wrote:
2010/11/11 Ron Wheeler<rwhee...@artifact-software.com>:
War project has almost no code or preferably no code .
Code is in jar project.

War project has WebContent stuff (configurations, XML, images, JSPs) and
depends on your Jar project for its classes. It will create a WAR file with
the classes from the dependencies.
I disagree, you can put code in war projects, as long as it is tightly
connected to the web project itself, e.g. actions in an MVC framework,
servlets, etc.
If you really like to pack all the code into a jar, see here:
http://maven.apache.org/plugins/maven-war-plugin/faq.html#attached

Antonio

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org

Reply via email to