Maven 2.x Remote Resources Plugin

Make the organization comparator configurable

Details

  • Type: New Feature New Feature
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Won't Fix
  • Affects Version/s: 1.0-alpha-6, 1.0-beta-2
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None
  • Number of attachments :
    1

Description

The OrganizationComparator in ProcessRemoteResourcesMojo takes into account both the organization's name and url. This leads to strange generated NOTICE files, like the one attached, which comes from a slightly modified trunk of commons-validator. I feel that the comparator should be changed so that it only compares the name of the organization. An alternative way would be to have two configurable comparators to choose from. I'm willing to do the coding, but want to solicit other's opinions first.

Also see discussions here: https://issues.apache.org/jira/browse/COMMONSSITE-21

Activity

Hide
sebbaz+ch added a comment -

Or perhaps have a list of aliases for names and URLs?

Show
sebbaz+ch added a comment - Or perhaps have a list of aliases for names and URLs?
Hide
Daniel Kulp added a comment -

I disagree with this. When implementing the sorting stuff, I did run originally just use the organization name for sorting, but due to a bunch of bad poms, the results were not correct and not reproduceable.

For example, we depend on a BUNCH of stuff at Apache. However, the poms put different organization URL's in there all over the place. (The jakarta folks are really bad) The resulting NOTICE would pretty much pick different values for the ${organization.url} parameter depending on the JDK, OS, etc... And most of the time, it wasn't correct.

SOMETIMES, we would get the (almost) correct:
Apache Software Foundation (http://www.apache.org/)

but many times we would get:
The Apache Software Foundation (http://jakarta.apache.org)

or other variations that are just wrong. Thus, I decided to keep the URL as part of the sort so that the projects that DO put the correct information in their poms (or inherit from the appropriate apache parent) aren't screwed up by the projects that don't do the right things.

Show
Daniel Kulp added a comment - I disagree with this. When implementing the sorting stuff, I did run originally just use the organization name for sorting, but due to a bunch of bad poms, the results were not correct and not reproduceable. For example, we depend on a BUNCH of stuff at Apache. However, the poms put different organization URL's in there all over the place. (The jakarta folks are really bad) The resulting NOTICE would pretty much pick different values for the ${organization.url} parameter depending on the JDK, OS, etc... And most of the time, it wasn't correct. SOMETIMES, we would get the (almost) correct: Apache Software Foundation (http://www.apache.org/) but many times we would get: The Apache Software Foundation (http://jakarta.apache.org) or other variations that are just wrong. Thus, I decided to keep the URL as part of the sort so that the projects that DO put the correct information in their poms (or inherit from the appropriate apache parent) aren't screwed up by the projects that don't do the right things.
Hide
Jason van Zyl added a comment -

So is this a won't fix?

Show
Jason van Zyl added a comment - So is this a won't fix?
Hide
Dennis Lundberg added a comment -

Taking into account Daniel's comment I'd change this from a bug to a new feature request, and change the title to something like "Make the organization comparator configurable". Thus we could supply two comparators out of the box. The current implementation would be the default one. I could write another one that would only look at the organizations name and ignore the URL. We can make this configurable, to allow other Comparators to be used as well.

Show
Dennis Lundberg added a comment - Taking into account Daniel's comment I'd change this from a bug to a new feature request, and change the title to something like "Make the organization comparator configurable". Thus we could supply two comparators out of the box. The current implementation would be the default one. I could write another one that would only look at the organizations name and ignore the URL. We can make this configurable, to allow other Comparators to be used as well.
Hide
John Casey added a comment -

Review for 1.1 release.

Show
John Casey added a comment - Review for 1.1 release.
Hide
John Casey added a comment -

I'm not sure I understand this issue or the relevant use cases well enough to fix it. I'd like to push it to 1.2 unless someone has enough time to get it resolved in the next week or two.

Show
John Casey added a comment - I'm not sure I understand this issue or the relevant use cases well enough to fix it. I'd like to push it to 1.2 unless someone has enough time to get it resolved in the next week or two.

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: