This commit is contained in:
gregw 2020-12-02 09:33:37 +01:00
parent 1768bd898f
commit f00a2c2917
3 changed files with 24 additions and 10 deletions

View File

@ -21,16 +21,30 @@
TODO: review in light of Jetty 10
The most basic way of starting the Jetty standalone server is to execute the `start.jar`, which is a bootstrap for starting Jetty with the configuration you want.
The most basic way of starting the Jetty standalone server is to execute the `start.jar` from a base directory containing
the configuration of jetty:
----
[jetty-home-{VERSION}]$ java -jar start.jar
2013-09-23 11:27:06.654:INFO:oejs.Server:main: jetty-{VERSION}
[] mkdir /var/jetty-base
[] cd /var/jetty-base
[] java -jar $JETTY_HOME/start.jar
ERROR : No enabled jetty modules found!
...
----
Jetty is a highly modularized web server container.
Very little is mandatory and required, and most components are optional; you enable or disable them according to the needs of your environment.
Jetty is a highly modularized web server container. Very little is mandatory and required, and most components are optional; you enable or disable them according to the needs of your environment. You use start.jar to configure the modules:
----
[] java -jar $JETTY_HOME/start.jar --add-module=http
...
INFO : http initialized in ${jetty.base}/start.d/http.ini
...
[] java -jar $JETTY_HOME/start.jar
2020-12-02 09:31:45.563:INFO :oejs.Server:main: jetty-10.0.0; built: 2020-11-30T14:38:10.953Z; git: cac070fdb134df192252e99653d99d7c3fb91b87; jvm 15.0.1+9
2020-12-02 09:31:45.601:INFO :oejs.AbstractConnector:main: Started ServerConnector@3eb7fc54{HTTP/1.1, (http/1.1)}{0.0.0.0:8080}
2020-12-02 09:31:45.615:INFO :oejs.Server:main: Started Server@55a561cf{STARTING}[10.0.0,sto=5000] @760ms
----
At its most basic, you configure Jetty from two elements:

View File

@ -106,18 +106,18 @@ public class MavenLocalRepoFileInitializerTest
public void testGetCoordinateZip()
{
MavenLocalRepoFileInitializer repo = new MavenLocalRepoFileInitializer(baseHome);
String ref = "maven://org.eclipse.jetty/jetty-home/9.3.x/zip";
String ref = "maven://org.eclipse.jetty/jetty-home/10.0.0/zip";
Coordinates coords = repo.getCoordinates(URI.create(ref));
assertThat("Coordinates", coords, notNullValue());
assertThat("coords.groupId", coords.groupId, is("org.eclipse.jetty"));
assertThat("coords.artifactId", coords.artifactId, is("jetty-home"));
assertThat("coords.version", coords.version, is("9.3.x"));
assertThat("coords.version", coords.version, is("10.0.0"));
assertThat("coords.type", coords.type, is("zip"));
assertThat("coords.classifier", coords.classifier, nullValue());
assertThat("coords.toCentralURI", coords.toCentralURI().toASCIIString(),
is("https://repo1.maven.org/maven2/org/eclipse/jetty/jetty-home/9.3.x/jetty-home-9.3.x.zip"));
is("https://repo1.maven.org/maven2/org/eclipse/jetty/jetty-home/10.0.0/jetty-home-10.0.0.zip"));
}
@Test

View File

@ -53,8 +53,8 @@ public class CorrectMavenCentralRefs
// Test to make sure we are in right directory
Path rootPomXml = buildRoot.resolve("pom.xml");
Path distPomXml = buildRoot.resolve("jetty-home/pom.xml");
if (!Files.exists(rootPomXml) || !Files.exists(distPomXml))
Path homePomXml = buildRoot.resolve("jetty-home/pom.xml");
if (!Files.exists(rootPomXml) || !Files.exists(homePomXml))
{
System.err.println("Not build root directory: " + buildRoot);
System.exit(-1);