jeudi 7 juin 2018

jetty.xml Add useTestScope

I'm working with jetty.xml so I can start two web apps, but I have a lack of configuration in the XML file. This is the actual XML file:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_0.dtd">
<Configure id="Server" class="org.eclipse.jetty.server.Server">
    <Set name="connectors">
        <Array type="org.eclipse.jetty.server.Connector">
            <Item>
                <New class="org.eclipse.jetty.server.ServerConnector">
                    <Arg> <Ref refid="Server"/> </Arg>
                    <Set name="port">9300</Set>
                    <Set name="name">public-server</Set>
                </New>
            </Item>
        </Array>
    </Set>
<New id="context-public" class="org.eclipse.jetty.maven.plugin.JettyWebAppContext">
    <Set name="contextPath">/</Set>
    <Set name="war">public.war</Set>
    <Set name="virtualHosts">
        <Array type="java.lang.String">
            <Item>@public</Item>
        </Array>
    </Set>
</New>
<Set name="handler">
    <New class="org.eclipse.jetty.server.handler.ContextHandlerCollection">
        <Set name="handlers">
            <Array type="org.eclipse.jetty.server.Handler">
                <Item>
                    <Ref refid="context-public" />
                </Item>
                <Item>
                    <New class="org.eclipse.jetty.server.handler.DefaultHandler" />
                </Item>
            </Array>
        </Set>
    </New>
</Set>
</Configure>

I want to add this maven jetty config to the XML file.

   <useTestScope>true</useTestScope>

Aucun commentaire:

Enregistrer un commentaire