Hi,
I'm developping some portlets, and bundling them into an EAR module.
I use a multi module POM architecture
the ear:generate-application-xml goal generate a <context-root> tag, when it
depends on a WAR module.
However, this line is problematic when you deploy a portlet, because it
seems illegal in this case.
(deployment fails)
My EAR config is as follow
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-ear-plugin</artifactId>
<version>2.1</version>
<configuration>
<displayName>Thierry Portlet</displayName>
<description>JBOSS portlet</description>
<modules>
<webModule>
<groupId>myApp</groupId>
<artifactId>JBPortlet1-war</artifactId>
<!--<contextRoot>/portlet</contextRoot> <<<<
My
problem goes here
</webModule>
</modules>
</configuration>
</plugin>
If i comment / remove the <contextroot> line, it takes the WAR filename as
context
It generates the following application.xml
<application>
<display-name>Thierry Portlet</display-name>
<description>JBOSS portlet</description>
<module>
<web>
<web-uri>JBPortlet1-war-1.0.war</web-uri>
<context-root>/portlet</context-root> <<< I would like
to
remove automatically this line
</web>
</module>
</application>
I would like to remove automatically the <context-root> line.
what could be the strategy?
=>a <noContextRoot> tag added to the ear plugin config
=>a way to specify that application-xml has to be generated regarding
portlet constraints?
Thanks for your help
Thierry
|