modules = RepositoryParser.parseLinksInDirectoryListing(listing);
+ assertThat("At least ten jetty modules expected",modules.size(), greaterThan(10));
+ assertThat("jetty-jmx module expected", modules.contains("jetty-jmx"), is(true));
+ }
+
+ @Test
+ public void testIsPlugin() throws IOException{
+ String listing = StreamUtils.inputStreamToString(this.getClass().getClassLoader().getResourceAsStream("mavenRepoJettyJMXDirectoryListing.html"));
+ assertThat("listing describes a plugin", RepositoryParser.isModuleAPlugin(listing), is(true));
+ String nonPluginListing = StreamUtils.inputStreamToString(this.getClass().getClassLoader().getResourceAsStream("mavenRepoJettyJNDIDirectoryListing.html"));
+ assertThat("listing doesn't describe a plugin", RepositoryParser.isModuleAPlugin(nonPluginListing), is(false));
+ }
+
+}
diff --git a/jetty-plugins/src/test/resources/example-plugin.jar b/jetty-plugins/src/test/resources/example-plugin.jar
new file mode 100644
index 00000000000..31cd1e04d4b
Binary files /dev/null and b/jetty-plugins/src/test/resources/example-plugin.jar differ
diff --git a/jetty-plugins/src/test/resources/jetty-jmx-7.6.0.v20120127-plugin.jar b/jetty-plugins/src/test/resources/jetty-jmx-7.6.0.v20120127-plugin.jar
new file mode 100644
index 00000000000..ed99c27732a
Binary files /dev/null and b/jetty-plugins/src/test/resources/jetty-jmx-7.6.0.v20120127-plugin.jar differ
diff --git a/jetty-plugins/src/test/resources/jetty_home/.donotdelete b/jetty-plugins/src/test/resources/jetty_home/.donotdelete
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/jetty-plugins/src/test/resources/mavenRepoJettyDirectoryListing.html b/jetty-plugins/src/test/resources/mavenRepoJettyDirectoryListing.html
new file mode 100644
index 00000000000..cd6549cac38
--- /dev/null
+++ b/jetty-plugins/src/test/resources/mavenRepoJettyDirectoryListing.html
@@ -0,0 +1,55 @@
+
+Index of /maven2/org/eclipse/jetty/
+
+Index of /maven2/org/eclipse/jetty/
../
+aggregate/ 22-Dec-2011 21:20 -
+example-async-rest/ 09-Mar-2012 16:06 -
+example-jetty-embedded/ 09-Mar-2012 16:06 -
+jetty-ajp/ 09-Mar-2012 16:06 -
+jetty-annotations/ 09-Mar-2012 16:06 -
+jetty-client/ 09-Mar-2012 16:06 -
+jetty-continuation/ 09-Mar-2012 16:06 -
+jetty-deploy/ 09-Mar-2012 16:06 -
+jetty-distribution/ 09-Mar-2012 16:06 -
+jetty-embedded-examples/ 21-Sep-2009 15:50 -
+jetty-http/ 09-Mar-2012 16:06 -
+jetty-http-spi/ 09-Mar-2012 16:06 -
+jetty-io/ 09-Mar-2012 16:06 -
+jetty-jaspi/ 09-Mar-2012 16:06 -
+jetty-jmx/ 09-Mar-2012 16:06 -
+jetty-jndi/ 09-Mar-2012 16:06 -
+jetty-jsp/ 09-Mar-2012 16:06 -
+jetty-jsp-2.1/ 25-Oct-2011 01:05 -
+jetty-monitor/ 09-Mar-2012 16:06 -
+jetty-nested/ 09-Mar-2012 16:06 -
+jetty-nosql/ 09-Mar-2012 16:06 -
+jetty-overlay-deployer/ 09-Mar-2012 16:06 -
+jetty-parent/ 20-Sep-2011 16:54 -
+jetty-plus/ 09-Mar-2012 16:06 -
+jetty-policy/ 09-Mar-2012 16:06 -
+jetty-project/ 09-Mar-2012 16:06 -
+jetty-rewrite/ 09-Mar-2012 16:06 -
+jetty-security/ 09-Mar-2012 16:06 -
+jetty-server/ 09-Mar-2012 16:06 -
+jetty-servlet/ 09-Mar-2012 16:06 -
+jetty-servlet-tester/ 21-Sep-2009 15:52 -
+jetty-servlets/ 09-Mar-2012 16:06 -
+jetty-start/ 09-Mar-2012 16:06 -
+jetty-test-webapp/ 21-Sep-2009 15:50 -
+jetty-util/ 09-Mar-2012 16:06 -
+jetty-webapp/ 09-Mar-2012 16:06 -
+jetty-websocket/ 09-Mar-2012 16:06 -
+jetty-xml/ 09-Mar-2012 16:06 -
+npn/ 09-Mar-2012 16:05 -
+orbit/ 24-Jan-2012 23:22 -
+osgi/ 27-May-2011 08:34 -
+spdy/ 09-Mar-2012 16:05 -
+test-continuation/ 01-Apr-2010 13:30 -
+test-continuation-jetty6/ 01-Apr-2010 13:30 -
+test-jetty-nested/ 09-Mar-2012 16:06 -
+test-jetty-servlet/ 09-Mar-2012 16:06 -
+test-jetty-webapp/ 09-Mar-2012 16:06 -
+tests/ 30-Nov-2011 02:16 -
+toolchain/ 06-Dec-2011 23:32 -
+
+
\ No newline at end of file
diff --git a/jetty-plugins/src/test/resources/mavenRepoJettyJMXDirectoryListing.html b/jetty-plugins/src/test/resources/mavenRepoJettyJMXDirectoryListing.html
new file mode 100644
index 00000000000..ac33b1ac140
--- /dev/null
+++ b/jetty-plugins/src/test/resources/mavenRepoJettyJMXDirectoryListing.html
@@ -0,0 +1,36 @@
+
+Index of /maven2/org/eclipse/jetty/jetty-jmx/7.6.0.v20120127/
+
+Index of /maven2/org/eclipse/jetty/jetty-jmx/7.6.0.v20120127/
../
+jetty-jmx-7.6.0.v20120127-plugin.jar 27-Jan-2012 14:24 1873
+jetty-jmx-7.6.0.v20120127-plugin.jar.asc 27-Jan-2012 14:24 198
+jetty-jmx-7.6.0.v20120127-plugin.jar.asc.md5 27-Jan-2012 14:24 32
+jetty-jmx-7.6.0.v20120127-plugin.jar.asc.sha1 27-Jan-2012 14:24 40
+jetty-jmx-7.6.0.v20120127-plugin.jar.md5 27-Jan-2012 14:24 32
+jetty-jmx-7.6.0.v20120127-plugin.jar.sha1 27-Jan-2012 14:24 40
+jetty-jmx-7.6.0.v20120127-javadoc.jar 27-Jan-2012 14:24 52590
+jetty-jmx-7.6.0.v20120127-javadoc.jar.asc 27-Jan-2012 14:24 198
+jetty-jmx-7.6.0.v20120127-javadoc.jar.asc.md5 27-Jan-2012 14:24 32
+jetty-jmx-7.6.0.v20120127-javadoc.jar.asc.sha1 27-Jan-2012 14:24 40
+jetty-jmx-7.6.0.v20120127-javadoc.jar.md5 27-Jan-2012 14:24 32
+jetty-jmx-7.6.0.v20120127-javadoc.jar.sha1 27-Jan-2012 14:24 40
+jetty-jmx-7.6.0.v20120127-sources.jar 27-Jan-2012 14:24 16675
+jetty-jmx-7.6.0.v20120127-sources.jar.asc 27-Jan-2012 14:24 198
+jetty-jmx-7.6.0.v20120127-sources.jar.asc.md5 27-Jan-2012 14:24 32
+jetty-jmx-7.6.0.v20120127-sources.jar.asc.sha1 27-Jan-2012 14:24 40
+jetty-jmx-7.6.0.v20120127-sources.jar.md5 27-Jan-2012 14:24 32
+jetty-jmx-7.6.0.v20120127-sources.jar.sha1 27-Jan-2012 14:24 40
+jetty-jmx-7.6.0.v20120127.jar 27-Jan-2012 14:24 23187
+jetty-jmx-7.6.0.v20120127.jar.asc 27-Jan-2012 14:24 198
+jetty-jmx-7.6.0.v20120127.jar.asc.md5 27-Jan-2012 14:24 32
+jetty-jmx-7.6.0.v20120127.jar.asc.sha1 27-Jan-2012 14:24 40
+jetty-jmx-7.6.0.v20120127.jar.md5 27-Jan-2012 14:24 32
+jetty-jmx-7.6.0.v20120127.jar.sha1 27-Jan-2012 14:24 40
+jetty-jmx-7.6.0.v20120127.pom 27-Jan-2012 14:24 2655
+jetty-jmx-7.6.0.v20120127.pom.asc 27-Jan-2012 14:24 198
+jetty-jmx-7.6.0.v20120127.pom.asc.md5 27-Jan-2012 14:24 32
+jetty-jmx-7.6.0.v20120127.pom.asc.sha1 27-Jan-2012 14:24 40
+jetty-jmx-7.6.0.v20120127.pom.md5 27-Jan-2012 14:24 32
+jetty-jmx-7.6.0.v20120127.pom.sha1 27-Jan-2012 14:24 40
+
+
\ No newline at end of file
diff --git a/jetty-plugins/src/test/resources/mavenRepoJettyJNDIDirectoryListing.html b/jetty-plugins/src/test/resources/mavenRepoJettyJNDIDirectoryListing.html
new file mode 100644
index 00000000000..e1e6bf82ae8
--- /dev/null
+++ b/jetty-plugins/src/test/resources/mavenRepoJettyJNDIDirectoryListing.html
@@ -0,0 +1,30 @@
+
+Index of /maven2/org/eclipse/jetty/jetty-jndi/7.6.0.v20120127/
+
+Index of /maven2/org/eclipse/jetty/jetty-jndi/7.6.0.v20120127/
../
+jetty-jndi-7.6.0.v20120127-javadoc.jar 27-Jan-2012 14:37 127695
+jetty-jndi-7.6.0.v20120127-javadoc.jar.asc 27-Jan-2012 14:37 198
+jetty-jndi-7.6.0.v20120127-javadoc.jar.asc.md5 27-Jan-2012 14:37 32
+jetty-jndi-7.6.0.v20120127-javadoc.jar.asc.sha1 27-Jan-2012 14:37 40
+jetty-jndi-7.6.0.v20120127-javadoc.jar.md5 27-Jan-2012 14:37 32
+jetty-jndi-7.6.0.v20120127-javadoc.jar.sha1 27-Jan-2012 14:37 40
+jetty-jndi-7.6.0.v20120127-sources.jar 27-Jan-2012 14:37 26645
+jetty-jndi-7.6.0.v20120127-sources.jar.asc 27-Jan-2012 14:37 198
+jetty-jndi-7.6.0.v20120127-sources.jar.asc.md5 27-Jan-2012 14:37 32
+jetty-jndi-7.6.0.v20120127-sources.jar.asc.sha1 27-Jan-2012 14:37 40
+jetty-jndi-7.6.0.v20120127-sources.jar.md5 27-Jan-2012 14:37 32
+jetty-jndi-7.6.0.v20120127-sources.jar.sha1 27-Jan-2012 14:37 40
+jetty-jndi-7.6.0.v20120127.jar 27-Jan-2012 14:36 38073
+jetty-jndi-7.6.0.v20120127.jar.asc 27-Jan-2012 14:37 198
+jetty-jndi-7.6.0.v20120127.jar.asc.md5 27-Jan-2012 14:37 32
+jetty-jndi-7.6.0.v20120127.jar.asc.sha1 27-Jan-2012 14:37 40
+jetty-jndi-7.6.0.v20120127.jar.md5 27-Jan-2012 14:36 32
+jetty-jndi-7.6.0.v20120127.jar.sha1 27-Jan-2012 14:36 40
+jetty-jndi-7.6.0.v20120127.pom 27-Jan-2012 14:36 2810
+jetty-jndi-7.6.0.v20120127.pom.asc 27-Jan-2012 14:37 198
+jetty-jndi-7.6.0.v20120127.pom.asc.md5 27-Jan-2012 14:37 32
+jetty-jndi-7.6.0.v20120127.pom.asc.sha1 27-Jan-2012 14:37 40
+jetty-jndi-7.6.0.v20120127.pom.md5 27-Jan-2012 14:37 32
+jetty-jndi-7.6.0.v20120127.pom.sha1 27-Jan-2012 14:37 40
+
+
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index f087c77d06b..6d832614bff 100644
--- a/pom.xml
+++ b/pom.xml
@@ -377,7 +377,7 @@
jetty-deploy
jetty-start
-
+ jetty-plugins