Skip to content

Commit c03ff78

Browse files
committed
Update to Rome 2.1.0
1 parent e3d743e commit c03ff78

File tree

3 files changed

+22
-23
lines changed

3 files changed

+22
-23
lines changed

pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -331,11 +331,11 @@ under the License.
331331
<version>1.326</version>
332332
</dependency>
333333

334-
<!-- for rss feed generation -->
334+
<!-- for RSS feed generation -->
335335
<dependency>
336-
<groupId>rome</groupId>
336+
<groupId>com.rometools</groupId>
337337
<artifactId>rome</artifactId>
338-
<version>1.0</version>
338+
<version>2.1.0</version>
339339
</dependency>
340340

341341
<!-- test dependencies -->

src/main/java/org/apache/maven/plugins/changes/FeedGenerator.java

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,14 @@
2828
import java.util.Locale;
2929
import java.util.ResourceBundle;
3030

31-
import com.sun.syndication.feed.synd.SyndContent;
32-
import com.sun.syndication.feed.synd.SyndContentImpl;
33-
import com.sun.syndication.feed.synd.SyndEntry;
34-
import com.sun.syndication.feed.synd.SyndEntryImpl;
35-
import com.sun.syndication.feed.synd.SyndFeed;
36-
import com.sun.syndication.feed.synd.SyndFeedImpl;
37-
import com.sun.syndication.io.FeedException;
38-
import com.sun.syndication.io.SyndFeedOutput;
31+
import com.rometools.rome.feed.synd.SyndContent;
32+
import com.rometools.rome.feed.synd.SyndContentImpl;
33+
import com.rometools.rome.feed.synd.SyndEntry;
34+
import com.rometools.rome.feed.synd.SyndEntryImpl;
35+
import com.rometools.rome.feed.synd.SyndFeed;
36+
import com.rometools.rome.feed.synd.SyndFeedImpl;
37+
import com.rometools.rome.io.FeedException;
38+
import com.rometools.rome.io.SyndFeedOutput;
3939
import org.apache.maven.doxia.util.DoxiaUtils;
4040
import org.apache.maven.plugins.changes.model.Release;
4141

@@ -58,7 +58,7 @@ public class FeedGenerator {
5858
/**
5959
* Initialize feedGenerator for a given locale.
6060
*
61-
* @param locale a locale for i18n.
61+
* @param locale a locale for i18n
6262
*/
6363
public FeedGenerator(final Locale locale) {
6464
this.feed = new SyndFeedImpl();
@@ -69,7 +69,7 @@ public FeedGenerator(final Locale locale) {
6969
/**
7070
* The author of the feed.
7171
*
72-
* @return the author.
72+
* @return the author
7373
*/
7474
public String getAuthor() {
7575
return author;
@@ -78,7 +78,7 @@ public String getAuthor() {
7878
/**
7979
* Set the author of the feed.
8080
*
81-
* @param author not null.
81+
* @param author not null
8282
*/
8383
public void setAuthor(final String author) {
8484
this.author = author.trim(); // this also assures that author is not null.
@@ -87,7 +87,7 @@ public void setAuthor(final String author) {
8787
/**
8888
* The title of the feed.
8989
*
90-
* @return the title.
90+
* @return the title
9191
*/
9292
public String getTitle() {
9393
return title;
@@ -96,7 +96,7 @@ public String getTitle() {
9696
/**
9797
* Set the title of the feed.
9898
*
99-
* @param title not null.
99+
* @param title not null
100100
*/
101101
public void setTitle(final String title) {
102102
this.title = title.trim(); // this also assures that title is not null.
@@ -105,7 +105,7 @@ public void setTitle(final String title) {
105105
/**
106106
* The DateFormat.
107107
*
108-
* @return may be null.
108+
* @return may be null
109109
*/
110110
public DateFormat getDateFormat() {
111111
return dateFormat;
@@ -114,7 +114,7 @@ public DateFormat getDateFormat() {
114114
/**
115115
* Set the date format. This should match the date format used for the release dates in changes.xml.
116116
*
117-
* @param dateFormat may be null.
117+
* @param dateFormat may be null
118118
*/
119119
public void setDateFormat(final DateFormat dateFormat) {
120120
this.dateFormat = dateFormat;
@@ -123,7 +123,7 @@ public void setDateFormat(final DateFormat dateFormat) {
123123
/**
124124
* The main link of the feed.
125125
*
126-
* @return the link.
126+
* @return the link
127127
*/
128128
public String getLink() {
129129
return link;
@@ -132,7 +132,7 @@ public String getLink() {
132132
/**
133133
* Set the main link of the feed.
134134
*
135-
* @param link not null.
135+
* @param link not null
136136
*/
137137
public void setLink(final String link) {
138138
this.link = link.trim(); // this also assures that link is not null.
@@ -168,7 +168,7 @@ public List<String> getSupportedFeedTypes() {
168168
* @param feedType The type of the feed to generate. See {@link #isSupportedFeedType(java.lang.String)} for
169169
* supported values.
170170
* @param writer a Writer. Note that this is not flushed nor closed upon exit.
171-
* @throws IOException if an error occurs during export.
171+
* @throws IOException if an error occurs during export
172172
*/
173173
public void export(final List<Release> releases, final String feedType, final Writer writer) throws IOException {
174174
feed.setFeedType(feedType);
@@ -219,7 +219,6 @@ private static SyndContent getSyndContent(final Release release) {
219219
sb.append("<p>").append(description).append("</p>");
220220
}
221221

222-
// TODO: localize?
223222
sb.append("<p>Version ").append(release.getVersion()).append(" is available with ");
224223
sb.append(release.getActions().size()).append(" fixed issues.</p>");
225224

src/test/java/org/apache/maven/plugins/changes/FeedGeneratorTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public void testExport() throws Exception {
7575
generator.export(releases, "rss_0.9", new StringWriter(512));
7676
fail("0 releases not allowed!");
7777
} catch (IOException ex) {
78-
assertNotNull(ex);
78+
assertNotNull(ex.getMessage());
7979
}
8080

8181
releases.add(release);

0 commit comments

Comments
 (0)