Hi, I think there are a few probs in your plan:

1. schema is outdated.
2. web-uri element is not allowed, should be web element.
3. there should be a / before test within the context-root element.

You can try change it to something like below -

<application xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-1.2";>
  <dep:environment xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.2";>
    <dep:moduleId>
      <dep:groupId>com.yourco</dep:groupId>
      <dep:artifactId>moduleid</dep:artifactId>
      <dep:version>1.0</dep:version>
      <dep:type>car</dep:type>
    </dep:moduleId>
    <!---dependencies goes here -->
  </dep:environment>
<module>
    <web>testit.war</web>
    <web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-1.2";>
        <context-root>/test</context-root>
    </web-app>
  </module>
...
</application>

HTH

Lin

On Tue, Oct 21, 2008 at 4:34 AM, MarcoLaponder
<[EMAIL PROTECTED]> wrote:
>
> Hi All,
>
>
>
> I am trying to accomplish the following: I have an ear file which containts
> a web archive. I want to determine the context root at deployment time. I
> was considering to specify this in the deployment plan but this doesn't
> work. The deployment plan I use is:
>
>
>
> <?xml version="1.0" encoding="utf-8"?>
>
> <application application-name="HelloWorldEar"
>
>      xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-1.1";
>
>      xmlns:app="http://geronimo.apache.org/xml/ns/j2ee/application-1.1";
>
>      xmlns:sec="http://geronimo.apache.org/xml/ns/security-1.1";
> xmlns:sys="http://geronimo.apache.org/xml/ns/deployment-1.1";>
>
>
>
>      <!—
>
>            Deleted some dependencies and security info
>
>      -->
>
>      <module>
>
>            <web>
>
>                  <web-uri>testit.war</web-uri>
>
>                  <context-root>test</context-root>
>
>            </web>
>
>      </module>
>
> </application>
>
>
>
> But this plan gives an error when deploying. Is it not possible to do this
> or am I doing something wrong ? The errors I get are:
>
>
>
> C:\j5ee\geronimo-jetty6-javaee5-2.1.1\var\temp\geronimo-application.xml:36:4:
> error: cvc-complex-type.2.4b: Element not allowed:
> [EMAIL PROTECTED]://geronimo.apache.org/xml/ns/j2ee/application-2.0 in element
> [EMAIL PROTECTED]://geronimo.apache.org/xml/ns/j2ee/application-2.0
>
> C:\j5ee\geronimo-jetty6-javaee5-2.1.1\var\temp\geronimo-application.xml:37:4:
> error: cvc-complex-type.2.4b: Element not allowed:
> [EMAIL PROTECTED]://geronimo.apache.org/xml/ns/j2ee/application-2.0 in
> element [EMAIL PROTECTED]://geronimo.apache.org/xml/ns/j2ee/application-2.0
>
> C:\j5ee\geronimo-jetty6-javaee5-2.1.1\var\temp\geronimo-application.xml:37:4:
> error: cvc-complex-type.2.4c: Expected element
> '[EMAIL PROTECTED]://geronimo.apache.org/xml/ns/j2ee/application-2.0' before 
> the
> end of the content in element
> [EMAIL PROTECTED]://geronimo.apache.org/xml/ns/j2ee/application-2.0
>
>
>
> Any help will be appreciated.
>
>
>
> Kind regards,
>
> Marco
> --
> View this message in context: 
> http://www.nabble.com/context-root-in-ear--deployment-plan-tp20085767s134p20085767.html
> Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.
>
>

Reply via email to