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"
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>
<parent>
<groupId>org.sonatype.oss</groupId>
<artifactId>oss-parent</artifactId>
<version>9</version>
</parent>
<groupId>com.rometools</groupId>
<artifactId>rome-parent</artifactId>
<version>1.6.0-SNAPSHOT</version>
<packaging>pom</packaging>
<modules>
<module>rome</module>
<module>rome-certiorem</module>
<module>rome-certiorem-webapp</module>
<module>rome-fetcher</module>
<module>rome-modules</module>
<module>rome-opml</module>
<module>rome-propono</module>
<module>rome-utils</module>
</modules>
<name>rome-parent</name>
<description>Parent for all ROME projects</description>
<url>http://rometools.github.io/rome-parent/</url>
<licenses>
<license>
<name>The Apache Software License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
<distribution>repo</distribution>
</license>
</licenses>
<scm>
<connection>scm:git:ssh://github.com/rometools/rome-parent.git</connection>
<developerConnection>scm:git:ssh://git@github.com/rometools/rome-parent.git</developerConnection>
<url>https://github.com/rometools/rome-parent</url>
</scm>
<developers>
<developer>
<name>Patrick Gotthard</name>
<email>patrick@patrick-gotthard.de</email>
<url>http://www.patrick-gotthard.de</url>
<timezone>+1</timezone>
</developer>
</developers>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
</properties>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>3.3</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-scm-publish-plugin</artifactId>
<version>1.0</version>
</plugin>
<!-- The following plugin doesn't modify the build. It is
only used to hide irrelevant warnings in Eclipse -->
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<versionRange>[1.0.0,)</versionRange>
<goals>
<goal>enforce</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore />
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>3.0.1</version>
<executions>
<execution>
<id>bundle</id>
<phase>package</phase>
<goals>
<goal>bundle</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
</build>
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>2.7</version>
</plugin>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<configuration>
<instructions>
<Export-Package>
com.rometools.rome.feed,
com.rometools.rome.feed.atom,
com.rometools.rome.feed.impl,
com.rometools.rome.feed.module,
com.rometools.rome.feed.rss,
com.rometools.rome.feed.synd,
com.rometools.rome.io,
</Export-Package>
<Import-Package>
org.jdom2,
org.jdom2.filter,
org.jdom2.input,
org.jdom2.input.sax,
org.jdom2.output,
org.slf4j,
org.w3c.dom,
org.xml.sax
</Import-Package>
<_exportcontents>com.rometools.utils</_exportcontents>
<Embed-Dependency>rome-utils</Embed-Dependency>
</instructions>
</configuration>
</plugin>
</plugins>
</reporting>
<dependencyManagement>
<dependencies>
<!-- JDOM -->
<dependency>
<groupId>org.jdom</groupId>
<artifactId>jdom2</artifactId>
<version>2.0.5</version>
</dependency>
<!-- Logging -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.10</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.1.2</version>
</dependency>
<!-- JUnit -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
</dependency>
<!-- Hamcrest -->
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-library</artifactId>
<version>1.3</version>
</dependency>
<!-- JavaX -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.5</version>
</dependency>
<dependency>
<groupId>javax.servlet.jsp</groupId>
<artifactId>jsp-api</artifactId>
<version>2.1</version>
</dependency>
<dependency>
<groupId>javax.persistence</groupId>
<artifactId>persistence-api</artifactId>
<version>1.0.2</version>
</dependency>
<!-- Guice -->
<dependency>
<groupId>com.google.inject.extensions</groupId>
<artifactId>guice-servlet</artifactId>
<version>2.0</version>
</dependency>
<!-- Apache Commons -->
<dependency>
<groupId>commons-httpclient</groupId>
<artifactId>commons-httpclient</artifactId>
<version>3.1</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.3.2</version>
</dependency>
<dependency>
<groupId>commons-beanutils</groupId>
<artifactId>commons-beanutils</artifactId>
<version>1.9.2</version>
</dependency>
<!-- Jetty -->
<dependency>
<groupId>jetty</groupId>
<artifactId>jetty</artifactId>
<version>4.2.12</version>
</dependency>
<!-- XML-RPC -->
<dependency>
<groupId>org.apache.xmlrpc</groupId>
<artifactId>xmlrpc-client</artifactId>
<version>3.1.3</version>
</dependency>
<!-- OAuth -->
<dependency>
<groupId>net.oauth.core</groupId>
<artifactId>oauth</artifactId>
<version>20100527</version>
</dependency>
</dependencies>
</dependencyManagement>
</project>
<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">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.sonatype.oss</groupId>
<artifactId>oss-parent</artifactId>
<version>9</version>
</parent>
<groupId>com.rometools</groupId>
<artifactId>rome-parent</artifactId>
<version>1.6.0-SNAPSHOT</version>
<packaging>pom</packaging>
<modules>
<module>rome</module>
<module>rome-certiorem</module>
<module>rome-certiorem-webapp</module>
<module>rome-fetcher</module>
<module>rome-modules</module>
<module>rome-opml</module>
<module>rome-propono</module>
<module>rome-utils</module>
</modules>
<name>rome-parent</name>
<description>Parent for all ROME projects</description>
<url>http://rometools.github.io/rome-parent/</url>
<licenses>
<license>
<name>The Apache Software License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
<distribution>repo</distribution>
</license>
</licenses>
<scm>
<connection>scm:git:ssh://github.com/rometools/rome-parent.git</connection>
<developerConnection>scm:git:ssh://git@github.com/rometools/rome-parent.git</developerConnection>
<url>https://github.com/rometools/rome-parent</url>
</scm>
<developers>
<developer>
<name>Patrick Gotthard</name>
<email>patrick@patrick-gotthard.de</email>
<url>http://www.patrick-gotthard.de</url>
<timezone>+1</timezone>
</developer>
</developers>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
</properties>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.5.1</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>3.3</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>2.8.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
<configuration>
<deployAtEnd>true</deployAtEnd>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-scm-publish-plugin</artifactId>
<version>1.1</version>
</plugin>
<!-- The following plugin doesn't modify the build. It is only used to hide irrelevant warnings in Eclipse -->
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<versionRange>[1.0.0,)</versionRange>
<goals>
<goal>enforce</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore />
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>3.0.1</version>
<executions>
<execution>
<id>bundle</id>
<phase>package</phase>
<goals>
<goal>bundle</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
</build>
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<configuration>
<instructions>
<Export-Package>
com.rometools.rome.feed,
com.rometools.rome.feed.atom,
com.rometools.rome.feed.impl,
com.rometools.rome.feed.module,
com.rometools.rome.feed.rss,
com.rometools.rome.feed.synd,
com.rometools.rome.io,
</Export-Package>
<Import-Package>
org.jdom2,
org.jdom2.filter,
org.jdom2.input,
org.jdom2.input.sax,
org.jdom2.output,
org.slf4j,
org.w3c.dom,
org.xml.sax
</Import-Package>
<_exportcontents>com.rometools.utils</_exportcontents>
<Embed-Dependency>rome-utils</Embed-Dependency>
</instructions>
</configuration>
</plugin>
</plugins>
</reporting>
<dependencyManagement>
<dependencies>
<!-- JDOM -->
<dependency>
<groupId>org.jdom</groupId>
<artifactId>jdom2</artifactId>
<version>2.0.6</version>
</dependency>
<!-- Logging -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.16</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.1.3</version>
</dependency>
<!-- JUnit -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
</dependency>
<!-- Hamcrest -->
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-library</artifactId>
<version>1.3</version>
</dependency>
<!-- JavaX -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.5</version>
</dependency>
<dependency>
<groupId>javax.servlet.jsp</groupId>
<artifactId>jsp-api</artifactId>
<version>2.1</version>
</dependency>
<dependency>
<groupId>javax.persistence</groupId>
<artifactId>persistence-api</artifactId>
<version>1.0.2</version>
</dependency>
<!-- Guice -->
<dependency>
<groupId>com.google.inject.extensions</groupId>
<artifactId>guice-servlet</artifactId>
<version>2.0</version>
</dependency>
<!-- Apache Commons -->
<dependency>
<groupId>commons-httpclient</groupId>
<artifactId>commons-httpclient</artifactId>
<version>3.1</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.4</version>
</dependency>
<dependency>
<groupId>commons-beanutils</groupId>
<artifactId>commons-beanutils</artifactId>
<version>1.9.2</version>
</dependency>
<!-- Jetty -->
<dependency>
<groupId>jetty</groupId>
<artifactId>jetty</artifactId>
<version>4.2.12</version>
</dependency>
<!-- XML-RPC -->
<dependency>
<groupId>org.apache.xmlrpc</groupId>
<artifactId>xmlrpc-client</artifactId>
<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
* and open the template in the editor.
*/
package com.rometools.certiorem.hub;
import static org.junit.Assert.assertTrue;
import java.io.IOException;
import java.net.URL;
import java.util.List;
import org.junit.Before;
import org.junit.Test;
import com.rometools.certiorem.hub.DeltaFeedInfoCache;
import com.rometools.fetcher.impl.HashMapFeedInfoCache;
import com.rometools.fetcher.impl.HttpURLFeedFetcher;
import com.rometools.rome.feed.synd.SyndEntry;
import com.rometools.rome.feed.synd.SyndFeed;
/**
*
* @author najmi
*/
public class DeltaSyndFeedInfoTest {
private DeltaFeedInfoCache feedInfoCache;
private HttpURLFeedFetcher feedFetcher;
private SyndFeed feed;
@Before
public void setUp() {
feedInfoCache = new DeltaFeedInfoCache(new HashMapFeedInfoCache());
feedFetcher = new HttpURLFeedFetcher(feedInfoCache);
}
/**
* 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;
}
}
/*
* To change this template, choose Tools | Templates and open the template in the editor.
*/
package com.rometools.certiorem.hub;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import java.net.URL;
import java.util.List;
import org.junit.Test;
import com.rometools.fetcher.impl.HashMapFeedInfoCache;
import com.rometools.fetcher.impl.HttpURLFeedFetcher;
import com.rometools.rome.feed.synd.SyndEntry;
import com.rometools.rome.feed.synd.SyndFeed;
public class DeltaSyndFeedInfoTest {
@Test
public void testGetSyndFeed() throws Exception {
final URL url = new URL("https://news.google.com/news?pz=1&cf=all&ned=us&hl=en&output=rss");
final DeltaFeedInfoCache feedInfoCache = new DeltaFeedInfoCache(new HashMapFeedInfoCache());
final HttpURLFeedFetcher feedFetcher = new HttpURLFeedFetcher(feedInfoCache);
// the first time the feed should not be empty
final SyndFeed firstFeed = feedFetcher.retrieveFeed(url);
final List<SyndEntry> firstEntries = firstFeed.getEntries();
assertFalse(firstEntries.isEmpty());
// fetch once again and this time the entries should be empty because nothing has changed
final SyndFeed secondFeed = feedFetcher.retrieveFeed(url);
final List<SyndEntry> secondEntries = secondFeed.getEntries();
assertTrue(secondEntries.isEmpty());
}
}