This commit is contained in:
kebernet 2011-03-19 17:13:48 +00:00
parent 54b4e421a3
commit 733f667d21
6 changed files with 61 additions and 47 deletions

91
pom.xml
View file

@ -4,8 +4,10 @@
<groupId>org.rometools</groupId> <groupId>org.rometools</groupId>
<artifactId>rome-fetcher</artifactId> <artifactId>rome-fetcher</artifactId>
<name>rome-fetcher</name> <name>rome-fetcher</name>
<version>1.5-SNAPSHOT</version> <version>1.2</version>
<inceptionYear>2004</inceptionYear> <inceptionYear>2004</inceptionYear>
<description>A well behaved feed fetcher API for ROME</description>
<url>http://www.rometools.org</url>
<organization> <organization>
<name>ROME Project</name> <name>ROME Project</name>
<url>http://rometools.jira.com</url> <url>http://rometools.jira.com</url>
@ -25,6 +27,11 @@
</license> </license>
</licenses> </licenses>
<developers> <developers>
<developer>
<id>kebernet</id>
<name>Robert Cooper</name>
<email>kebernet@gmail.comM</email>
</developer>
<developer> <developer>
<name>Nick Lothian</name> <name>Nick Lothian</name>
<url>http://nicklothian.com</url> <url>http://nicklothian.com</url>
@ -55,7 +62,6 @@
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId> <artifactId>maven-release-plugin</artifactId>
<version>2.0-beta-9</version>
<configuration> <configuration>
<mavenExecutorId>forked-path</mavenExecutorId> <mavenExecutorId>forked-path</mavenExecutorId>
</configuration> </configuration>
@ -80,28 +86,6 @@
</includes> </includes>
</configuration> </configuration>
</plugin> </plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId> <artifactId>maven-resources-plugin</artifactId>
@ -110,14 +94,8 @@
<encoding>${project.build.sourceEncoding}</encoding> <encoding>${project.build.sourceEncoding}</encoding>
</configuration> </configuration>
</plugin> </plugin>
</plugins> </plugins>
<!-- <extensions>
<extension>
<groupId>org.jvnet.wagon-svn</groupId>
<artifactId>wagon-svn</artifactId>
<version>RELEASE</version>
</extension>
</extensions> -->
</build> </build>
<dependencies> <dependencies>
<dependency> <dependency>
@ -131,9 +109,9 @@
<version>2.4.0</version> <version>2.4.0</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>net.java.dev.rome</groupId> <groupId>rome</groupId>
<artifactId>rome</artifactId> <artifactId>rome</artifactId>
<version>1.0.0</version> <version>1.0</version>
</dependency> </dependency>
<dependency> <dependency>
<!-- Required at build time and to use HTTPClientFetcher --> <!-- Required at build time and to use HTTPClientFetcher -->
@ -181,32 +159,43 @@
<distributionManagement> <distributionManagement>
<repository> <repository>
<id>sonatype-nexus-staging</id> <id>central.staging</id>
<name>Nexus Release Repository</name> <name>Nexus Release Repository</name>
<url>http://oss.sonatype.org/service/local/staging/deploy/maven2</url> <url>http://oss.sonatype.org/service/local/staging/deploy/maven2</url>
</repository> </repository>
<snapshotRepository> <snapshotRepository>
<id>sonatype-nexus-snapshots</id> <id>sonatype.snapshots</id>
<name>Sonatype Nexus Snapshots</name> <name>My Nexus Snapshots Repository</name>
<url>http://oss.sonatype.org/content/repositories/snapshots</url> <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
</snapshotRepository> </snapshotRepository>
</distributionManagement> </distributionManagement>
<profiles> <profiles>
<profile> <profile>
<id>release-sign-artifacts</id> <id>release</id>
<activation> <activation>
<property> <property>
<name>performRelease</name> <name>performRelease</name>
<value>true</value> <value>true</value>
</property> </property>
</activation> </activation>
<distributionManagement>
<repository>
<id>central.staging</id>
<name>Nexus Release Repository</name>
<url>http://oss.sonatype.org/service/local/staging/deploy/maven2</url>
</repository>
<snapshotRepository>
<id>sonatype.snapshots</id>
<name>My Nexus Snapshots Repository</name>
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
</snapshotRepository>
</distributionManagement>
<build> <build>
<plugins> <plugins>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId> <artifactId>maven-gpg-plugin</artifactId>
<version>1.0-alpha-4</version>
<executions> <executions>
<execution> <execution>
<id>sign-artifacts</id> <id>sign-artifacts</id>
@ -217,6 +206,30 @@
</execution> </execution>
</executions> </executions>
</plugin> </plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins> </plugins>
</build> </build>
</profile> </profile>

View file

@ -20,7 +20,7 @@ import java.net.URL;
/** /**
* <p>An interface to allow caching of feed details. Implementing this allows the * <p>An interface to allow caching of feed details. Implementing this allows the
* {@link com.sun.syndication.fetcher.io.HttpURLFeedFetcher} class to * {@link org.rometools.fetcher.io.HttpURLFeedFetcher} class to
* enable conditional gets</p> * enable conditional gets</p>
* *
* @author Nick Lothian * @author Nick Lothian

View file

@ -24,7 +24,7 @@ import java.util.Map;
/** /**
* <p>A very simple implementation of the {@link com.sun.syndication.fetcher.impl.FeedFetcherCache} interface.</p> * <p>A very simple implementation of the {@link org.rometools.fetcher.impl.FeedFetcherCache} interface.</p>
* *
* <p>This implementation uses a HashMap to cache retrieved feeds. This implementation is * <p>This implementation uses a HashMap to cache retrieved feeds. This implementation is
* most suitible for sort term (client aggregator?) use, as the memory usage will increase * most suitible for sort term (client aggregator?) use, as the memory usage will increase

View file

@ -17,8 +17,6 @@
package org.rometools.fetcher.impl; package org.rometools.fetcher.impl;
import com.sun.syndication.feed.synd.SyndFeed; import com.sun.syndication.feed.synd.SyndFeed;
import org.rometools.fetcher.FetcherEvent;
import org.rometools.fetcher.FetcherException;
import com.sun.syndication.io.FeedException; import com.sun.syndication.io.FeedException;
import com.sun.syndication.io.SyndFeedInput; import com.sun.syndication.io.SyndFeedInput;
import com.sun.syndication.io.XmlReader; import com.sun.syndication.io.XmlReader;
@ -31,6 +29,9 @@ import org.apache.commons.httpclient.HttpMethod;
import org.apache.commons.httpclient.methods.GetMethod; import org.apache.commons.httpclient.methods.GetMethod;
import org.apache.commons.httpclient.params.HttpClientParams; import org.apache.commons.httpclient.params.HttpClientParams;
import org.rometools.fetcher.FetcherEvent;
import org.rometools.fetcher.FetcherException;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
@ -145,7 +146,7 @@ public class HttpClientFeedFetcher extends AbstractFeedFetcher {
} }
/** /**
* @param timeout Sets the read timeout for the URLConnection to a specified timeout, in milliseconds. * @return timeout the read timeout for the URLConnection to a specified timeout, in milliseconds.
*/ */
public int getReadTimeout() { public int getReadTimeout() {
return (int) this.getHttpClientParams() return (int) this.getHttpClientParams()
@ -157,7 +158,7 @@ public class HttpClientFeedFetcher extends AbstractFeedFetcher {
} }
/** /**
* @see com.sun.syndication.fetcher.FeedFetcher#retrieveFeed(java.net.URL) * @see org.rometools.fetcher.FeedFetcher#retrieveFeed(java.net.URL)
*/ */
public SyndFeed retrieveFeed(String userAgent, URL feedUrl) public SyndFeed retrieveFeed(String userAgent, URL feedUrl)
throws IllegalArgumentException, IOException, FeedException, FetcherException { throws IllegalArgumentException, IOException, FeedException, FetcherException {

View file

@ -34,7 +34,7 @@ import com.sun.syndication.io.XmlReader;
/** /**
* <p>Class to retrieve syndication files via HTTP.</p> * <p>Class to retrieve syndication files via HTTP.</p>
* *
* <p>If passed a {@link com.sun.syndication.fetcher.impl.FeedFetcherCache} in the * <p>If passed a {@link org.rometools.fetcher.impl.FeedFetcherCache} in the
* constructor it will use conditional gets to only retrieve modified content.</p> * constructor it will use conditional gets to only retrieve modified content.</p>
* *
* <p>The class uses the Accept-Encoding: gzip header to retrieve gzipped feeds where * <p>The class uses the Accept-Encoding: gzip header to retrieve gzipped feeds where

View file

@ -5,7 +5,7 @@ import java.util.LinkedHashMap;
import java.util.Map; import java.util.Map;
/** /**
* <p>An implementation of the {@link com.sun.syndication.fetcher.impl.FeedFetcherCache} interface.</p> * <p>An implementation of the {@link org.rometools.fetcher.impl.FeedFetcherCache} interface.</p>
* *
* <p>Unlike the HashMapFeedInfoCache this implementation will not grow unbound</p> * <p>Unlike the HashMapFeedInfoCache this implementation will not grow unbound</p>
* *