Hi,
Our Maven plug-in which handles RAD of blocks has a concept of profiles. In profile one can define
default content of basic resources like web.xml or applicationContext.xml for web application
prepared by RCL that will host developed block(s).
The problem I have is that we have two profiles hardcoded right now:
* cocoon22
* ssf
The first one is rather obvious; the second one is meant for people developing on top of SSF but not
using Cocoon so web.xml does not contain definitions of Cocoon-specific filters, etc.
However, if you develop on top of Cocoon you still might need to customize applicationContext.xml
(e.g. configuration of Spring Configurator) in order to run your block properly. Therefore, I see
the need for being able to define custom profiles.
Why only wonders me is this snippet[1]:
// check profile
if ("cocoon-22".equals(this.webappProfile)) {
getLog().info("Preparing a Cocoon web application.");
} else if ("ssf".equals(this.webappProfile)) {
getLog().info("Preparing a Servlet-Service web application.");
} else {
throw new MojoExecutionException("Only the profiles 'cocoon-22' and
'ssf' are supported.");
}
It looks like these two profiles were intentionally hard-coded and nothing else is allowed. Is there
any reason for that?
If not, wouldn't anybody mind if I implemented the ability to define custom profile and provide it
as dependency for Cocoon Maven plug-in?
[1]
http://svn.eu.apache.org/viewvc/cocoon/trunk/tools/cocoon-maven-plugin/src/main/java/org/apache/cocoon/maven/rcl/PrepareWebappMojo.java?view=markup
--
Best regards,
Grzegorz Kossakowski