Moving demo related files in distro to ${jetty.base}/demo/ directory

This commit is contained in:
Joakim Erdfelt 2013-08-26 09:50:31 -07:00
parent 5d05147cb0
commit 14ec13000d
31 changed files with 52 additions and 46 deletions

View File

@ -101,7 +101,7 @@
<type>war</type>
<overWrite>true</overWrite>
<includes>**</includes>
<outputDirectory>${assembly-directory}/webapps.demo</outputDirectory>
<outputDirectory>${assembly-directory}/demo/webapps</outputDirectory>
<destFileName>test.war</destFileName>
</artifactItem>
<artifactItem>
@ -111,7 +111,7 @@
<type>war</type>
<overWrite>true</overWrite>
<includes>**</includes>
<outputDirectory>${assembly-directory}/webapps.demo</outputDirectory>
<outputDirectory>${assembly-directory}/demo/webapps</outputDirectory>
<destFileName>test-jaas.war</destFileName>
</artifactItem>
<artifactItem>
@ -121,7 +121,7 @@
<type>war</type>
<overWrite>true</overWrite>
<includes>**</includes>
<outputDirectory>${assembly-directory}/webapps.demo</outputDirectory>
<outputDirectory>${assembly-directory}/demo/webapps</outputDirectory>
<destFileName>test-jndi.war</destFileName>
</artifactItem>
<artifactItem>
@ -131,7 +131,7 @@
<type>war</type>
<overWrite>true</overWrite>
<includes>**</includes>
<outputDirectory>${assembly-directory}/webapps.demo</outputDirectory>
<outputDirectory>${assembly-directory}/demo/webapps</outputDirectory>
<destFileName>test-spec.war</destFileName>
</artifactItem>
<artifactItem>
@ -141,7 +141,7 @@
<type>war</type>
<overWrite>true</overWrite>
<includes>**</includes>
<outputDirectory>${assembly-directory}/webapps.demo</outputDirectory>
<outputDirectory>${assembly-directory}/demo/webapps</outputDirectory>
<destFileName>xref-proxy.war</destFileName>
</artifactItem>
<artifactItem>
@ -151,7 +151,7 @@
<type>war</type>
<overWrite>true</overWrite>
<includes>**</includes>
<outputDirectory>${assembly-directory}/webapps.demo</outputDirectory>
<outputDirectory>${assembly-directory}/demo/webapps</outputDirectory>
<destFileName>async-rest.war</destFileName>
</artifactItem>
<artifactItem>
@ -223,6 +223,7 @@
<outputDirectory>${assembly-directory}</outputDirectory>
</artifactItem>
</artifactItems>
<excludes>META-INF/**</excludes>
</configuration>
</execution>
@ -244,6 +245,7 @@
<outputDirectory>${assembly-directory}</outputDirectory>
</artifactItem>
</artifactItems>
<excludes>META-INF/**</excludes>
</configuration>
</execution>
@ -265,6 +267,7 @@
<outputDirectory>${assembly-directory}</outputDirectory>
</artifactItem>
</artifactItems>
<excludes>META-INF/**</excludes>
</configuration>
</execution>
@ -286,6 +289,7 @@
<outputDirectory>${assembly-directory}</outputDirectory>
</artifactItem>
</artifactItems>
<excludes>META-INF/**</excludes>
</configuration>
</execution>

View File

@ -5,11 +5,8 @@
# the start.d directory or rename it to not end with ".ini"
# ===========================================================
--module=jaas,jndi,rewrite,client,annotations,websocket
jaas.login.conf=webapps.demo/test-jaas.d/login.conf
--module=demo
# Activate the demo options and configurations
--module=jndi.demo
etc/jetty-demo.xml
demo.realm=demo/realm.properties
jaas.login.conf=demo/login.conf

View File

@ -318,7 +318,7 @@ public class Main
File start_ini = baseHome.getBaseFile("start.ini");
if (FS.canReadFile(start_ini))
{
StartLog.debug("Reading ${jetty.base}/start.ini) - %s",start_ini);
StartLog.debug("Reading ${jetty.base}/start.ini - %s",start_ini);
args.parse(baseHome, new StartIni(start_ini));
}

View File

@ -1,5 +1,5 @@
--module=server,http,db
--module=http,db
mysql.user=frank
mysql.pass=secret

View File

@ -34,7 +34,7 @@
<!-- Mandatory. This system property tells JAAS where to find the login module configuration file -->
<systemProperty>
<name>java.security.auth.login.config</name>
<value>${basedir}/src/main/config/webapps.demo/test-jaas.d/login.conf</value>
<value>${basedir}/src/main/config/demo/login.conf</value>
</systemProperty>
</systemProperties>
<webAppConfig>

View File

@ -1,5 +1,5 @@
xyz {
org.eclipse.jetty.jaas.spi.PropertyFileLoginModule required
debug="true"
file="${jetty.home}/webapps.demo/test-jaas.d/login.properties";
file="${jetty.home}/demo/login.properties";
};

View File

@ -24,7 +24,7 @@
etc/jetty-jaas.xml
</pre>
</p>
<p>For the jetty distribution demos, jaas is already enabled in the start.d/900-demo.ini file and sets the jaas.login.conf property to webapps.demo/test-jaas.d/login.conf for use with the webapps.demo/test-jaas.war web application. </p>
<p>For the jetty distribution demos, jaas is already enabled in the start.d/900-demo.ini file and sets the jaas.login.conf property to demo/login.conf for use with the demo/webapps/test-jaas.war web application. </p>
<p>The full source of this demonstration is available <a
href="http://git.eclipse.org/c/jetty/org.eclipse.jetty.project.git/tree/tests/test-webapps/test-jaas-webapp">here</a>.</p>

View File

@ -147,7 +147,7 @@
<loginServices>
<loginService implementation="org.eclipse.jetty.security.HashLoginService">
<name>Test Realm</name>
<config>src/main/config/etc/realm.properties</config>
<config>src/main/config/demo/realm.properties</config>
</loginService>
</loginServices>
</configuration>

View File

@ -28,7 +28,7 @@ detected.
<Set name="extractWAR">true</Set>
<Set name="copyWebDir">false</Set>
<Set name="defaultsDescriptor"><SystemProperty name="jetty.home" default="."/>/etc/webdefault.xml</Set>
<Set name="overrideDescriptor"><SystemProperty name="jetty.home" default="."/>/contexts/test.d/override-web.xml</Set>
<Set name="overrideDescriptor"><SystemProperty name="jetty.base" default="."/>/demo/override-web.xml</Set>
<!-- virtual hosts
<Set name="virtualHosts">

View File

@ -27,7 +27,7 @@
<destName>jetty-web.xml</destName>
</file>
<file>
<source>src/main/config/etc/realm.properties</source>
<source>src/main/config/demo/realm.properties</source>
<outputDirectory>WEB-INF</outputDirectory>
<destName>realm.properties</destName>
</file>

View File

@ -7,14 +7,14 @@
<Configure id="Server" class="org.eclipse.jetty.server.Server">
<!-- ============================================================= -->
<!-- Add webapps.demo to deployment manager scans -->
<!-- Add demo/webapps to deployment manager scans -->
<!-- ============================================================= -->
<Ref refid="DeploymentManager">
<Call id="webappprovider" name="addAppProvider">
<Arg>
<New class="org.eclipse.jetty.deploy.providers.WebAppProvider">
<Set name="monitoredDirName"><Property name="jetty.base" default="." />/webapps.demo</Set>
<Set name="defaultsDescriptor"><Property name="jetty.home" default="." />/etc/webdefault.xml</Set>
<Set name="monitoredDirName"><Property name="jetty.base" default="." />/demo/webapps</Set>
<Set name="defaultsDescriptor"><Property name="jetty.base" default="." />/etc/webdefault.xml</Set>
<Set name="scanInterval">1</Set>
<Set name="extractWars">true</Set>
<Set name="configurationManager">

View File

@ -12,13 +12,13 @@
<Arg>
<New class="org.eclipse.jetty.security.HashLoginService">
<Set name="name">Test Realm</Set>
<Set name="config"><Property name="jetty.home" default="."/>/etc/realm.properties</Set>
<Set name="config"><Property name="demo.realm" default="demo/realm.properties"/></Set>
<Set name="refreshInterval">0</Set>
</New>
</Arg>
</Call>
<Get class="org.eclipse.jetty.util.log.Log" name="rootLogger">
<Call name="warn"><Arg>test-realm is deployed. DO NOT USE IN PRODUCTION!</Arg></Call>
<Call name="warn"><Arg>demo test-realm is deployed. DO NOT USE IN PRODUCTION!</Arg></Call>
</Get>
</Configure>

View File

@ -27,7 +27,7 @@ detected.
<Set name="extractWAR">true</Set>
<Set name="copyWebDir">false</Set>
<Set name="defaultsDescriptor"><Property name="jetty.home" default="."/>/etc/webdefault.xml</Set>
<Set name="overrideDescriptor"><Property name="jetty.webapps" default="."/>/test.d/override-web.xml</Set>
<Set name="overrideDescriptor"><Property name="jetty.base" default="."/>/demo/override-web.xml</Set>
<!-- Allow directory symbolic links -->
<Call name="addAliasCheck">
@ -66,8 +66,8 @@ detected.
<Get name="securityHandler">
<Set name="loginService">
<New class="org.eclipse.jetty.security.HashLoginService">
<Set name="name">Test Realm</Set>
<Set name="config"><SystemProperty name="jetty.home" default="."/>/etc/realm.properties</Set>
<Set name="name">Test Realm</Set>
<Set name="config"><SystemProperty name="jetty.base" default="."/>/demo/realm.properties</Set>
<!-- To enable reload of realm when properties change, uncomment the following lines -->
<!-- changing refreshInterval (in seconds) as desired -->
<!--

View File

@ -0,0 +1,15 @@
#
# Jetty Demo Module
#
DEPEND=jndi
DEPEND=jaas
DEPEND=rewrite
DEPEND=client
DEPEND=annotations
DEPEND=websocket
LIB=demo/lib/*.jar
demo/test-realm.xml
demo/jetty-demo.xml

View File

@ -1,10 +0,0 @@
#
# Jetty Demo Module
#
DEPEND=jndi
LIB=lib/jndi.demo/*.jar
etc/test-realm.xml

View File

@ -8,6 +8,6 @@
<body>
<h1>Rewrite not enabled</h1>
<p>The rewrite handler is currently not enabled. To enable this demo, start up Jetty with:</p>
<code>java -jar start.jar OPTIONS=rewrite etc/jetty-rewrite.xml</code>
<code>java -jar start.jar --module=rewrite</code>
</body>
</html>

View File

@ -154,7 +154,7 @@ public class TestServer
// Setup context
HashLoginService login = new HashLoginService();
login.setName("Test Realm");
login.setConfig(jetty_root + "/tests/test-webapps/test-jetty-webapp/src/main/config/etc/realm.properties");
login.setConfig(jetty_root + "/tests/test-webapps/test-jetty-webapp/src/main/config/demo/realm.properties");
server.addBean(login);
File log=File.createTempFile("jetty-yyyy_mm_dd", "log");

View File

@ -18,14 +18,14 @@
</fileSet>
<fileSet>
<directory>target</directory>
<outputDirectory>webapps.demo</outputDirectory>
<outputDirectory>demo/webapps</outputDirectory>
<includes>
<include>test-jndi.xml</include>
</includes>
</fileSet>
<fileSet>
<directory>target/lib/jndi</directory>
<outputDirectory>lib/jndi.demo</outputDirectory>
<outputDirectory>demo/lib</outputDirectory>
<includes>
<include>*.jar</include>
</includes>

View File

@ -27,8 +27,8 @@ This example shows how to configure and lookup resources such as DataSources, a
To enable JNDI edit the start.ini or start.d/*.ini files to include "OPTIONS=jndi".
</p>
<p>
For the jetty distribution demos, jndi is already enabled in the start.d/900-demo.ini file and also enables the
jndi.demo option which includes some mock resources used by the test.
For the jetty distribution demos, jndi is already enabled in the modules/demo.mod file and also enables various configurations in
the demo directory which includes some mock resources used by the test.
</p>
<p>The full source of this demonstration is available <a href="http://git.eclipse.org/c/jetty/org.eclipse.jetty.project.git/tree/tests/test-webapps/test-jndi-webapp">here</a>.</p>

View File

@ -18,14 +18,14 @@
</fileSet>
<fileSet>
<directory>target</directory>
<outputDirectory>webapps.demo</outputDirectory>
<outputDirectory>demo/webapps</outputDirectory>
<includes>
<include>test-spec.xml</include>
</includes>
</fileSet>
<fileSet>
<directory>target/lib/jndi</directory>
<outputDirectory>lib/jndi.demo</outputDirectory>
<outputDirectory>demo/lib</outputDirectory>
<includes>
<include>*.jar</include>
</includes>