webapp load order isn't supported by jetty-deploy or the DeploymentManager.
But never fear, you can manually add the required webapps that need to come first, and then let the DeploymentManager handle the rest.
Lets assume you have a war called example.war that you want to ensure is deployed and started first.
Here's the process:
[~]$ cd my-base
[my-base]$ mkdir prewebapps
[my-base]$ cp ~/code/project/target/example-1.0-SNAPSHOT.war prewebapps/example.war
[my-base]$ mkdir etc
[my-base[$ cp ~/code/project/prewebapps.xml etc/prewebapps.xml
[my-base]$ echo "prewebapps.xml" >> start.ini
[my-base]$ cat etc/prewebapps.xml
<?xml version="1.0"?>
<Configure id="Contexts" class="org.eclipse.jetty.server.handler.ContextHandlerCollection">
<Call name="addHandler">
<Arg>
<New class="org.eclipse.jetty.webapp.WebAppContext">
<Set name="contextPath">/example</Set>
<Set name="war"><Property name="jetty.base" default="."/>/prewebapps/example.war</Set>
</New>
</Arg>
</Call>
</Configure>
The key points:
- Put the example.war into a directory that is NOT the ${jetty.base}/webapps/ directory
(as you don't want it to be picked up by the standard jetty-deploy / DeploymentManger techniques) - You are configuring the existing "Contexts" (id) to manually add those webapps.
This means you don't have a separate XML for each war file (like you would with the jetty-deploy techniques)
Instead what was a separate XML is now embedded in this ${jetty.base}/etc/prewebapps.xml file.
Good luck