Am 19.10.2012 14:32, schrieb Thomas Sundberg:
On 19 October 2012 10:15, kenduron <[email protected]> wrote:
Hello,

perhaps you can help me.

I got a WAR (web archive) which is built with maven.
It works perfectly.

mvn clean package install

But from now on, I need to create and additional special version of this war
from the same code base. In this special version, some modification will be
done:

- some classes are removed from the war (indeed controller classes)
- a configuration file is changed

the special version is a limited version of the normal version.

It should be deployed with a special tag, e.g.

MyWar - Version 1.0.0 - specialEdition.

Probably not, it should be deployed with a specific name that differs
it from the normal artifact. Not a special tag.


Is this possible with maven?

Yes

If so, how?

You divide your project in different modules. Everything common should
be in a common module, anything specific should be in a specific
module. Typically one module per artifact.

The common module should create a jar that the specific modules depends on.
These specific modules should all depend om the common module, add
it's specific difference and finally produce a war as deployable
artifact.

This would be the Maven way. Common things in one module, specific
things in specific modules.

Thank you, but maybe you got it wrong.
My Project is already separated in the following way

MyJar.jar
MyWar.war
MyEear.ear

During the build of the war, some 3 class files should be removed, like this

del src/main/java/.../controller/SpecialAdmin1Controller.java
del src/main/java/.../controller/SpecialAdmin2Controller.java
del src/main/java/.../controller/SpecialAdmin3Controller.java

Can this done with maven without separating?




---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to