[EMAIL PROTECTED] wrote:
I parse this as meaning: I use the same source to make different things, maven makes one jar per project, and I don't want multiple copies of the same project source to do this?Our problem is that, in one subproject, we need to generate different jars and wars from the same sources (client, server, webservice). One would answer that we can divide this project into several subprojects, but we don't want the same source code to be present in different projects.
It seems to me that you could organize your source better. Build a jar. Use this jar in your webapp, webservice. Over time, break dependency cycles in the big fat jar and break out smaller jars, allowing your projects to depend on just the bits of code they need.
Yes its possible to do it this way too. Just add something appropriate in your project's maven.xml, e.g.So, the question is : Is it possible to have one Maven project (with only one project.xml) that generates multiple jars and wars ? And if not, has anybody tried to customize Maven to do that ?
<?xml version="1.0" encoding="ISO-8859-1"?>
<project default="java:jar"
xmlns:j="jelly:core">
<goal name="leon"
description="Bring me.... everyone.">
<attainGoal name="java:jar"/>
<attainGoal name="war:war"/>
</goal>
</project>
Now "maven -f project.xml leon" builds the jar and the war. You can make your own goals to build multiple webapps if you like.
-Baz
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
