Merge pull request #269 from rometools/ROME-268-plugin-and-dependency-updates

#268: Maven plugin and dependency updates
This commit is contained in:
Patrick Gotthard 2016-02-20 16:00:50 +01:00
commit e3797e09f4
2 changed files with 309 additions and 319 deletions

525
pom.xml
View file

@ -1,257 +1,268 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <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/xsd/maven-4.0.0.xsd"> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<parent> <parent>
<groupId>org.sonatype.oss</groupId> <groupId>org.sonatype.oss</groupId>
<artifactId>oss-parent</artifactId> <artifactId>oss-parent</artifactId>
<version>9</version> <version>9</version>
</parent> </parent>
<groupId>com.rometools</groupId> <groupId>com.rometools</groupId>
<artifactId>rome-parent</artifactId> <artifactId>rome-parent</artifactId>
<version>1.6.0-SNAPSHOT</version> <version>1.6.0-SNAPSHOT</version>
<packaging>pom</packaging> <packaging>pom</packaging>
<modules> <modules>
<module>rome</module> <module>rome</module>
<module>rome-certiorem</module> <module>rome-certiorem</module>
<module>rome-certiorem-webapp</module> <module>rome-certiorem-webapp</module>
<module>rome-fetcher</module> <module>rome-fetcher</module>
<module>rome-modules</module> <module>rome-modules</module>
<module>rome-opml</module> <module>rome-opml</module>
<module>rome-propono</module> <module>rome-propono</module>
<module>rome-utils</module> <module>rome-utils</module>
</modules> </modules>
<name>rome-parent</name> <name>rome-parent</name>
<description>Parent for all ROME projects</description> <description>Parent for all ROME projects</description>
<url>http://rometools.github.io/rome-parent/</url> <url>http://rometools.github.io/rome-parent/</url>
<licenses> <licenses>
<license> <license>
<name>The Apache Software License, Version 2.0</name> <name>The Apache Software License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url> <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
<distribution>repo</distribution> <distribution>repo</distribution>
</license> </license>
</licenses> </licenses>
<scm> <scm>
<connection>scm:git:ssh://github.com/rometools/rome-parent.git</connection> <connection>scm:git:ssh://github.com/rometools/rome-parent.git</connection>
<developerConnection>scm:git:ssh://git@github.com/rometools/rome-parent.git</developerConnection> <developerConnection>scm:git:ssh://git@github.com/rometools/rome-parent.git</developerConnection>
<url>https://github.com/rometools/rome-parent</url> <url>https://github.com/rometools/rome-parent</url>
</scm> </scm>
<developers> <developers>
<developer> <developer>
<name>Patrick Gotthard</name> <name>Patrick Gotthard</name>
<email>patrick@patrick-gotthard.de</email> <email>patrick@patrick-gotthard.de</email>
<url>http://www.patrick-gotthard.de</url> <url>http://www.patrick-gotthard.de</url>
<timezone>+1</timezone> <timezone>+1</timezone>
</developer> </developer>
</developers> </developers>
<properties> <properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
</properties> </properties>
<build> <build>
<pluginManagement> <pluginManagement>
<plugins> <plugins>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId> <artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version> <version>3.5.1</version>
<configuration> <configuration>
<source>1.6</source> <source>1.6</source>
<target>1.6</target> <target>1.6</target>
</configuration> </configuration>
</plugin> </plugin>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId> <artifactId>maven-site-plugin</artifactId>
<version>3.3</version> <version>3.3</version>
</plugin> </plugin>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-scm-publish-plugin</artifactId> <artifactId>maven-project-info-reports-plugin</artifactId>
<version>1.0</version> <version>2.8.1</version>
</plugin> </plugin>
<!-- The following plugin doesn't modify the build. It is <plugin>
only used to hide irrelevant warnings in Eclipse --> <groupId>org.apache.maven.plugins</groupId>
<plugin> <artifactId>maven-deploy-plugin</artifactId>
<groupId>org.eclipse.m2e</groupId> <version>2.8.2</version>
<artifactId>lifecycle-mapping</artifactId> <configuration>
<version>1.0.0</version> <deployAtEnd>true</deployAtEnd>
<configuration> </configuration>
<lifecycleMappingMetadata> </plugin>
<pluginExecutions> <plugin>
<pluginExecution> <groupId>org.apache.maven.plugins</groupId>
<pluginExecutionFilter> <artifactId>maven-scm-publish-plugin</artifactId>
<groupId>org.apache.maven.plugins</groupId> <version>1.1</version>
<artifactId>maven-enforcer-plugin</artifactId> </plugin>
<versionRange>[1.0.0,)</versionRange> <!-- The following plugin doesn't modify the build. It is only used to hide irrelevant warnings in Eclipse -->
<goals> <plugin>
<goal>enforce</goal> <groupId>org.eclipse.m2e</groupId>
</goals> <artifactId>lifecycle-mapping</artifactId>
</pluginExecutionFilter> <version>1.0.0</version>
<action> <configuration>
<ignore /> <lifecycleMappingMetadata>
</action> <pluginExecutions>
</pluginExecution> <pluginExecution>
</pluginExecutions> <pluginExecutionFilter>
</lifecycleMappingMetadata> <groupId>org.apache.maven.plugins</groupId>
</configuration> <artifactId>maven-enforcer-plugin</artifactId>
</plugin> <versionRange>[1.0.0,)</versionRange>
<plugin> <goals>
<groupId>org.apache.felix</groupId> <goal>enforce</goal>
<artifactId>maven-bundle-plugin</artifactId> </goals>
<version>3.0.1</version> </pluginExecutionFilter>
<executions> <action>
<execution> <ignore />
<id>bundle</id> </action>
<phase>package</phase> </pluginExecution>
<goals> </pluginExecutions>
<goal>bundle</goal> </lifecycleMappingMetadata>
</goals> </configuration>
</execution> </plugin>
</executions> <plugin>
</plugin> <groupId>org.apache.felix</groupId>
</plugins> <artifactId>maven-bundle-plugin</artifactId>
</pluginManagement> <version>3.0.1</version>
</build> <executions>
<execution>
<reporting> <id>bundle</id>
<plugins> <phase>package</phase>
<plugin> <goals>
<groupId>org.apache.maven.plugins</groupId> <goal>bundle</goal>
<artifactId>maven-project-info-reports-plugin</artifactId> </goals>
<version>2.7</version> </execution>
</plugin> </executions>
<plugin> </plugin>
<groupId>org.apache.felix</groupId> </plugins>
<artifactId>maven-bundle-plugin</artifactId> </pluginManagement>
<configuration> </build>
<instructions>
<Export-Package> <reporting>
com.rometools.rome.feed, <plugins>
com.rometools.rome.feed.atom, <plugin>
com.rometools.rome.feed.impl, <groupId>org.apache.maven.plugins</groupId>
com.rometools.rome.feed.module, <artifactId>maven-project-info-reports-plugin</artifactId>
com.rometools.rome.feed.rss, </plugin>
com.rometools.rome.feed.synd, <plugin>
com.rometools.rome.io, <groupId>org.apache.felix</groupId>
</Export-Package> <artifactId>maven-bundle-plugin</artifactId>
<Import-Package> <configuration>
org.jdom2, <instructions>
org.jdom2.filter, <Export-Package>
org.jdom2.input, com.rometools.rome.feed,
org.jdom2.input.sax, com.rometools.rome.feed.atom,
org.jdom2.output, com.rometools.rome.feed.impl,
org.slf4j, com.rometools.rome.feed.module,
org.w3c.dom, com.rometools.rome.feed.rss,
org.xml.sax com.rometools.rome.feed.synd,
</Import-Package> com.rometools.rome.io,
<_exportcontents>com.rometools.utils</_exportcontents> </Export-Package>
<Embed-Dependency>rome-utils</Embed-Dependency> <Import-Package>
</instructions> org.jdom2,
</configuration> org.jdom2.filter,
</plugin> org.jdom2.input,
</plugins> org.jdom2.input.sax,
</reporting> org.jdom2.output,
org.slf4j,
<dependencyManagement> org.w3c.dom,
<dependencies> org.xml.sax
<!-- JDOM --> </Import-Package>
<dependency> <_exportcontents>com.rometools.utils</_exportcontents>
<groupId>org.jdom</groupId> <Embed-Dependency>rome-utils</Embed-Dependency>
<artifactId>jdom2</artifactId> </instructions>
<version>2.0.5</version> </configuration>
</dependency> </plugin>
<!-- Logging --> </plugins>
<dependency> </reporting>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId> <dependencyManagement>
<version>1.7.10</version> <dependencies>
</dependency> <!-- JDOM -->
<dependency> <dependency>
<groupId>ch.qos.logback</groupId> <groupId>org.jdom</groupId>
<artifactId>logback-classic</artifactId> <artifactId>jdom2</artifactId>
<version>1.1.2</version> <version>2.0.6</version>
</dependency> </dependency>
<!-- JUnit --> <!-- Logging -->
<dependency> <dependency>
<groupId>junit</groupId> <groupId>org.slf4j</groupId>
<artifactId>junit</artifactId> <artifactId>slf4j-api</artifactId>
<version>4.12</version> <version>1.7.16</version>
</dependency> </dependency>
<!-- Hamcrest --> <dependency>
<dependency> <groupId>ch.qos.logback</groupId>
<groupId>org.hamcrest</groupId> <artifactId>logback-classic</artifactId>
<artifactId>hamcrest-library</artifactId> <version>1.1.3</version>
<version>1.3</version> </dependency>
</dependency> <!-- JUnit -->
<!-- JavaX --> <dependency>
<dependency> <groupId>junit</groupId>
<groupId>javax.servlet</groupId> <artifactId>junit</artifactId>
<artifactId>servlet-api</artifactId> <version>4.12</version>
<version>2.5</version> </dependency>
</dependency> <!-- Hamcrest -->
<dependency> <dependency>
<groupId>javax.servlet.jsp</groupId> <groupId>org.hamcrest</groupId>
<artifactId>jsp-api</artifactId> <artifactId>hamcrest-library</artifactId>
<version>2.1</version> <version>1.3</version>
</dependency> </dependency>
<dependency> <!-- JavaX -->
<groupId>javax.persistence</groupId> <dependency>
<artifactId>persistence-api</artifactId> <groupId>javax.servlet</groupId>
<version>1.0.2</version> <artifactId>servlet-api</artifactId>
</dependency> <version>2.5</version>
<!-- Guice --> </dependency>
<dependency> <dependency>
<groupId>com.google.inject.extensions</groupId> <groupId>javax.servlet.jsp</groupId>
<artifactId>guice-servlet</artifactId> <artifactId>jsp-api</artifactId>
<version>2.0</version> <version>2.1</version>
</dependency> </dependency>
<!-- Apache Commons --> <dependency>
<dependency> <groupId>javax.persistence</groupId>
<groupId>commons-httpclient</groupId> <artifactId>persistence-api</artifactId>
<artifactId>commons-httpclient</artifactId> <version>1.0.2</version>
<version>3.1</version> </dependency>
</dependency> <!-- Guice -->
<dependency> <dependency>
<groupId>org.apache.commons</groupId> <groupId>com.google.inject.extensions</groupId>
<artifactId>commons-lang3</artifactId> <artifactId>guice-servlet</artifactId>
<version>3.3.2</version> <version>2.0</version>
</dependency> </dependency>
<dependency> <!-- Apache Commons -->
<groupId>commons-beanutils</groupId> <dependency>
<artifactId>commons-beanutils</artifactId> <groupId>commons-httpclient</groupId>
<version>1.9.2</version> <artifactId>commons-httpclient</artifactId>
</dependency> <version>3.1</version>
<!-- Jetty --> </dependency>
<dependency> <dependency>
<groupId>jetty</groupId> <groupId>org.apache.commons</groupId>
<artifactId>jetty</artifactId> <artifactId>commons-lang3</artifactId>
<version>4.2.12</version> <version>3.4</version>
</dependency> </dependency>
<!-- XML-RPC --> <dependency>
<dependency> <groupId>commons-beanutils</groupId>
<groupId>org.apache.xmlrpc</groupId> <artifactId>commons-beanutils</artifactId>
<artifactId>xmlrpc-client</artifactId> <version>1.9.2</version>
<version>3.1.3</version> </dependency>
</dependency> <!-- Jetty -->
<!-- OAuth --> <dependency>
<dependency> <groupId>jetty</groupId>
<groupId>net.oauth.core</groupId> <artifactId>jetty</artifactId>
<artifactId>oauth</artifactId> <version>4.2.12</version>
<version>20100527</version> </dependency>
</dependency> <!-- XML-RPC -->
</dependencies> <dependency>
</dependencyManagement> <groupId>org.apache.xmlrpc</groupId>
<artifactId>xmlrpc-client</artifactId>
</project> <version>3.1.3</version>
</dependency>
<!-- OAuth -->
<dependency>
<groupId>net.oauth.core</groupId>
<artifactId>oauth</artifactId>
<version>20100527</version>
</dependency>
</dependencies>
</dependencyManagement>
</project>

View file

@ -1,62 +1,41 @@
/* /*
* To change this template, choose Tools | Templates * To change this template, choose Tools | Templates and open the template in the editor.
* and open the template in the editor. */
*/ package com.rometools.certiorem.hub;
package com.rometools.certiorem.hub;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue; import static org.junit.Assert.assertTrue;
import java.io.IOException; import java.net.URL;
import java.net.URL; import java.util.List;
import java.util.List;
import org.junit.Test;
import org.junit.Before;
import org.junit.Test; import com.rometools.fetcher.impl.HashMapFeedInfoCache;
import com.rometools.fetcher.impl.HttpURLFeedFetcher;
import com.rometools.certiorem.hub.DeltaFeedInfoCache; import com.rometools.rome.feed.synd.SyndEntry;
import com.rometools.fetcher.impl.HashMapFeedInfoCache; import com.rometools.rome.feed.synd.SyndFeed;
import com.rometools.fetcher.impl.HttpURLFeedFetcher;
import com.rometools.rome.feed.synd.SyndEntry; public class DeltaSyndFeedInfoTest {
import com.rometools.rome.feed.synd.SyndFeed;
@Test
/** public void testGetSyndFeed() throws Exception {
*
* @author najmi final URL url = new URL("https://news.google.com/news?pz=1&cf=all&ned=us&hl=en&output=rss");
*/
public class DeltaSyndFeedInfoTest { final DeltaFeedInfoCache feedInfoCache = new DeltaFeedInfoCache(new HashMapFeedInfoCache());
final HttpURLFeedFetcher feedFetcher = new HttpURLFeedFetcher(feedInfoCache);
private DeltaFeedInfoCache feedInfoCache;
private HttpURLFeedFetcher feedFetcher; // the first time the feed should not be empty
private SyndFeed feed; final SyndFeed firstFeed = feedFetcher.retrieveFeed(url);
final List<SyndEntry> firstEntries = firstFeed.getEntries();
@Before assertFalse(firstEntries.isEmpty());
public void setUp() {
feedInfoCache = new DeltaFeedInfoCache(new HashMapFeedInfoCache()); // fetch once again and this time the entries should be empty because nothing has changed
feedFetcher = new HttpURLFeedFetcher(feedInfoCache); final SyndFeed secondFeed = feedFetcher.retrieveFeed(url);
} final List<SyndEntry> secondEntries = secondFeed.getEntries();
assertTrue(secondEntries.isEmpty());
/**
* Test of getSyndFeed method, of class DeltaSyndFeedInfo. }
*/
@Test }
public void testGetSyndFeed() throws Exception {
feed = feedFetcher.retrieveFeed(getFeedUrl());
List<SyndEntry> entries = feed.getEntries();
assertTrue(!entries.isEmpty());
// Fetch again and this time the entries should be empty as none have
// changed.
feed = feedFetcher.retrieveFeed(getFeedUrl());
entries = feed.getEntries();
assertTrue(entries.isEmpty());
}
private URL getFeedUrl() throws IOException {
final URL feedUrl = new URL("http://news.google.com/news?pz=1&cf=all&ned=us&hl=en&output=rss");
// URL feedUrl = new
// URL("http://newsrss.bbc.co.uk/rss/newsonline_world_edition/front_page/rss.xml");
return feedUrl;
}
}