aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Becker2012-09-05 04:41:45 (EDT)
committerThomas Becker2012-09-05 04:41:45 (EDT)
commitdb3fbb9cb39f16b50925f89ed408f6d0b61f30f5 (patch)
tree2330c4556db6c02877dbaf8d7e9b079a1b902167
parent1b3d32e33736c3974c9196a8c5ab3ab1ecb7cc01 (diff)
downloadorg.eclipse.jetty.project-db3fbb9cb39f16b50925f89ed408f6d0b61f30f5.zip
org.eclipse.jetty.project-db3fbb9cb39f16b50925f89ed408f6d0b61f30f5.tar.gz
org.eclipse.jetty.project-db3fbb9cb39f16b50925f89ed408f6d0b61f30f5.tar.bz2
jetty-9 jetty-plugins now reads from multiple cofigurable groupIds. Currently org/eclipse/jetty and org/mortbay/jetty
-rw-r--r--jetty-plugins/src/main/java/org/eclipse/jetty/plugins/HttpMavenService.java5
-rw-r--r--jetty-plugins/src/test/java/org/eclipse/jetty/plugins/HttpMavenServiceIntegrationTest.java2
-rw-r--r--jetty-plugins/src/test/java/org/eclipse/jetty/plugins/HttpMavenServiceTest.java2
-rw-r--r--jetty-util/pom.xml200
4 files changed, 103 insertions, 106 deletions
diff --git a/jetty-plugins/src/main/java/org/eclipse/jetty/plugins/HttpMavenService.java b/jetty-plugins/src/main/java/org/eclipse/jetty/plugins/HttpMavenService.java
index 41bdd19..ad08073 100644
--- a/jetty-plugins/src/main/java/org/eclipse/jetty/plugins/HttpMavenService.java
+++ b/jetty-plugins/src/main/java/org/eclipse/jetty/plugins/HttpMavenService.java
@@ -26,6 +26,7 @@ import java.io.OutputStream;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLConnection;
+import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
@@ -38,7 +39,7 @@ import org.eclipse.jetty.plugins.util.StreamUtils;
public class HttpMavenService implements MavenService
{
private static final String REPOSITORY_URL = "http://repo2.maven.org/maven2/";
- private static final String[] GROUP_IDS = new String[]{"org/eclipse/jetty"};
+ private static final String[] GROUP_IDS = new String[]{ "org/eclipse/jetty", "org/mortbay/jetty" };
private static final String VERSION = "9.0.0-SNAPSHOT"; // TODO: should be automatically set
private boolean _searchRemoteRepository = true;
private boolean _searchLocalRepository = false;
@@ -79,6 +80,8 @@ public class HttpMavenService implements MavenService
break;
String[] localMavenModuleList = file.list();
+
+ System.out.println("Trying the following modules: " + Arrays.toString(localMavenModuleList));
for (String potentialPlugin : localMavenModuleList)
{
File pluginFile = new File(_localRepository + getPluginPath(groupId,potentialPlugin));
diff --git a/jetty-plugins/src/test/java/org/eclipse/jetty/plugins/HttpMavenServiceIntegrationTest.java b/jetty-plugins/src/test/java/org/eclipse/jetty/plugins/HttpMavenServiceIntegrationTest.java
index bd5dbb4..826888c 100644
--- a/jetty-plugins/src/test/java/org/eclipse/jetty/plugins/HttpMavenServiceIntegrationTest.java
+++ b/jetty-plugins/src/test/java/org/eclipse/jetty/plugins/HttpMavenServiceIntegrationTest.java
@@ -51,7 +51,7 @@ public class HttpMavenServiceIntegrationTest
@Before
public void setUp() throws Exception
{
- _mavenService.setRepositoryUrls(new String[]{PRIVATE_NEXUS_REPOSITORY_URL});
+ _mavenService.setRepositoryUrl(PRIVATE_NEXUS_REPOSITORY_URL);
}
@Test
diff --git a/jetty-plugins/src/test/java/org/eclipse/jetty/plugins/HttpMavenServiceTest.java b/jetty-plugins/src/test/java/org/eclipse/jetty/plugins/HttpMavenServiceTest.java
index d665dc6..c6a2a88 100644
--- a/jetty-plugins/src/test/java/org/eclipse/jetty/plugins/HttpMavenServiceTest.java
+++ b/jetty-plugins/src/test/java/org/eclipse/jetty/plugins/HttpMavenServiceTest.java
@@ -38,7 +38,7 @@ public class HttpMavenServiceTest
public void setUp() throws Exception
{
_mavenService.setLocalRepository(this.getClass().getClassLoader().getResource("maven_repo").getFile() + "/");
- _mavenService.setRepositoryUrls(new String[]{MAVEN_CENTRAL_URL});
+ _mavenService.setRepositoryUrl(MAVEN_CENTRAL_URL);
_mavenService.setVersion("version");
_mavenService.setSearchRemoteRepository(false);
_mavenService.setSearchLocalRepository(true);
diff --git a/jetty-util/pom.xml b/jetty-util/pom.xml
index 0a3735f..4099da9 100644
--- a/jetty-util/pom.xml
+++ b/jetty-util/pom.xml
@@ -1,106 +1,100 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <parent>
- <groupId>org.eclipse.jetty</groupId>
- <artifactId>jetty-project</artifactId>
- <version>9.0.0-SNAPSHOT</version>
- </parent>
- <modelVersion>4.0.0</modelVersion>
- <artifactId>jetty-util</artifactId>
- <name>Jetty :: Utilities</name>
- <description>Utility classes for Jetty</description>
- <properties>
- <bundle-symbolic-name>${project.groupId}.util</bundle-symbolic-name>
- </properties>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- <extensions>true</extensions>
- <executions>
- <execution>
- <goals>
- <goal>manifest</goal>
- </goals>
- <configuration>
- <instructions>
- <Import-Package>
- javax.servlet.*;version="2.6.0",org.slf4j;version="[1.5,2.0)";resolution:=optional,org.slf4j.impl;version="[1.5,2.0)";resolution:=optional,*
- </Import-Package>
- </instructions>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <!--
- Required for OSGI
- -->
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jar-plugin</artifactId>
- <configuration>
- <archive>
- <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
- </archive>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-assembly-plugin</artifactId>
- <executions>
- <execution>
- <phase>package</phase>
- <goals>
- <goal>single</goal>
- </goals>
- <configuration>
- <descriptorRefs>
- <descriptorRef>config</descriptorRef>
- </descriptorRefs>
- <descriptors>
- <descriptor>src/main/assembly/plugin.xml</descriptor>
- </descriptors>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>findbugs-maven-plugin</artifactId>
- <configuration>
- <onlyAnalyze>org.eclipse.jetty.util.*</onlyAnalyze>
- </configuration>
- </plugin>
- </plugins>
- </build>
- <dependencies>
- <dependency>
- <groupId>org.eclipse.jetty.orbit</groupId>
- <artifactId>javax.servlet</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.eclipse.jetty.toolchain</groupId>
- <artifactId>jetty-test-helper</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- <scope>provided</scope>
- <optional>true</optional>
- </dependency>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <parent>
+ <groupId>org.eclipse.jetty</groupId>
+ <artifactId>jetty-project</artifactId>
+ <version>9.0.0-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>jetty-util</artifactId>
+ <name>Jetty :: Utilities</name>
+ <description>Utility classes for Jetty</description>
+ <properties>
+ <bundle-symbolic-name>${project.groupId}.util</bundle-symbolic-name>
+ </properties>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ <extensions>true</extensions>
+ <executions>
+ <execution>
+ <goals>
+ <goal>manifest</goal>
+ </goals>
+ <configuration>
+ <instructions>
+ <Import-Package>javax.servlet.*;version="2.6.0",org.slf4j;version="[1.5,2.0)";resolution:=optional,org.slf4j.impl;version="[1.5,2.0)";resolution:=optional,*</Import-Package>
+ </instructions>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
<!--
- This dependency is used to test Slf4jLog.
- Due to the introduction of src/test/resource/jetty-logging.properties (and the Log.static{} block)
- the default Log implementation is still StdErrLog during testing.
+ Required for OSGI
-->
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-jdk14</artifactId>
- <version>${slf4j-version}</version>
- <scope>test</scope>
- </dependency>
- </dependencies>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <configuration>
+ <archive>
+ <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
+ </archive>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>package</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ <configuration>
+ <descriptorRefs>
+ <descriptorRef>config</descriptorRef>
+ </descriptorRefs>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>findbugs-maven-plugin</artifactId>
+ <configuration>
+ <onlyAnalyze>org.eclipse.jetty.util.*</onlyAnalyze>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ <dependencies>
+ <dependency>
+ <groupId>org.eclipse.jetty.orbit</groupId>
+ <artifactId>javax.servlet</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.jetty.toolchain</groupId>
+ <artifactId>jetty-test-helper</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ <scope>provided</scope>
+ <optional>true</optional>
+ </dependency>
+ <!--
+ This dependency is used to test Slf4jLog.
+ Due to the introduction of src/test/resource/jetty-logging.properties (and the Log.static{} block)
+ the default Log implementation is still StdErrLog during testing.
+ -->
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-jdk14</artifactId>
+ <version>${slf4j-version}</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
</project>