Unfortunately not,
you can't use parent project with packaging pom as ear module.
Own module for EAR is a part of Maven paradigm: module -> artifact.
EAR plugin just replace JAR plugin in EAR module and it can't be used just like surefire plugin. In other words, EAR plugin doesn't attach to necessary build phase. It replace packaging mechanism of Maven.
Is it a problem to make one new module?
If you war module is a main and alone module in project, and you don't want to create parent module and change project structure, just make one more project, only for EAR.

Parent POM could be used for dependencies specification which must be included into EAR.

Best regards,
Aleksey Didik



Joerg Heinicke ?????:
Aleksey Didik <didik <at> magenta-technology.ru> writes:

Using separate module for EAR is the most useful solution.
This module is description of "what must be in the ear".
Use <packaging>ear</packaging>, <modules> section in the <configuration> and, attention, don't forget add dependency to project-web artifact to <dependencies> section.

Thanks Aleksey.

Can I directly combine this with a parent POM? From another thread I got a
parent POM is helpful in general for centralizing dependency management. I
already have multiple projects for the JARs of the webapp. (I overtook the
application, but only the source code, not the build files.) So can I use the
parent POM for also specifying the content of the EAR as you described above?

Joerg


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


Reply via email to