[Yanel-dev] [Bug 7551] Duplicate Apache commons-io in .m2

Mehmet Birgi mehmet.birgi at wyona.com
Wed Apr 7 10:39:42 CEST 2010


Re which one to use: in the maven documentation, it is suggested (
http://maven.apache.org/guides/getting-started/index.html#How_do_I_use_exte=
rnal_dependencies,
7. paragraph) that one use http://ibiblio.org/maven2 as a reference to what
the artifact id should be for any (apache) dependency. According to that, we
should use "commons-io", rather than "apache-jakarta-commons-io". So I would
suggest that we change all the dependencies referring to
"apache-jakarta-commons-io" to refer to "commons-io". Is that OK, or are
there other things to consider? If you agree, I will try to find out if this
is documented somewhere, and if not, add it to the best practices, OK?

(cont. below)

On Wed, Apr 7, 2010 at 9:21 AM, Michael Wechner
<michael.wechner at wyona.com>wrote:

> Dear Memo
>
> From your log file I can see
>
> [artifact:dependencies] Downloading:
> wyona-org-commons/wyona-org-commons/1.0-dev-r48003/wyona-org-commons-1.0-=
dev-r48003.pom
> from wyona.remote.repo
> sitory
> [artifact:dependencies] Transferring 1K from wyona.remote.repository
>
> [artifact:dependencies] Downloading:
> commons-io/commons-io/1.2/commons-io-1.2.pom from wyona.remote.repository
> [artifact:dependencies] Downloading:
> commons-io/commons-io/1.2/commons-io-1.2.pom from central
>
> and checking on
>
>
> /Users/michaelwechner/.m2/repository/wyona-org-commons/wyona-org-commons/=
1.0-dev-r48003/wyona-org-commons-1.0-dev-r48003.pom
>
> shows that commons-io-1.2 us referenced there or rather in
>
> https://svn.wyona.com/repos/public/commons/trunk/build.xml
>

this seems to be the correct one, according to the maven docs (see above). I
am guessing that the ant task "wyona-tools:dependencies" in this build.xml
file produces the pom file above?


>
> Also I can see
>
> [artifact:dependencies] Downloading:
> wyona-org-security/wyona-org-security-core/0.2-dev-r48408/wyona-org-secur=
ity-core-0.2-dev-r48408.jar
> from wyona.remote.repository
> [artifact:dependencies] Transferring 17K from wyona.remote.repository
> [artifact:dependencies] Downloading:
> avalon-framework/avalon-framework-api/4.3/avalon-framework-api-4.3.jar fr=
om
> wyona.remote.repository
> [artifact:dependencies] Transferring 31K from wyona.remote.repository
> [artifact:dependencies] Downloading:
> avalon-framework/avalon-framework-impl/4.3/avalon-framework-impl-4.3.jar
> from wyona.remote.repository
> [artifact:dependencies] Transferring 58K from wyona.remote.repository
>
> [artifact:dependencies] Downloading:
> apache-jakarta-commons/apache-jakarta-commons-discovery/0.2/apache-jakart=
a-commons-discovery-0.2.jar
> from wyona.remote.repository
> [artifact:dependencies] Transferring 70K from wyona.remote.repository
> [artifact:dependencies] Downloading:
> apache-jakarta-commons/apache-jakarta-commons-id/0.1-dev-lcr357257/apache=
-jakarta-commons-id-0.1-dev-lcr357257.jar
> from wyona.remote.repository
> [artifact:dependencies] Transferring 53K from wyona.remote.repository
> [artifact:dependencies] Downloading:
> apache-jakarta-commons/apache-jakarta-commons-logging/1.0.4/apache-jakart=
a-commons-logging-1.0.4.jar
> from wyona.remote.repository
> [artifact:dependencies] Transferring 37K from wyona.remote.repository
> [artifact:dependencies] Downloading:
> apache-jakarta-commons/apache-jakarta-commons-io/1.2/apache-jakarta-commo=
ns-io-1.2.jar
> from wyona.remote.repository
>
> which means apache-jakarta-commons-io-1.2 is referenced from within
>
> https://svn.wyona.com/repos/public/security/trunk/dependencies.xml
>

yes, this seems to be (one of) the "incorrect" references, if we want to
follow the maven best practices


>
> Now we can start cleaning, whereas the question is which one we want to
> clean and I am concerned that there will be more
> such cases ...
>

I suspect the following as also being non-standard:

apache-jakarta-commons-discovery:
(http://mirrors.ibiblio.org/pub/mirrors/maven2/commons-discovery/commons-di=
scovery/maven-metadata.xml)
apache-jakarta-commons-id:
(http://svn.apache.org/repos/asf/commons/sandbox/id/trunk/pom.xml)
apache-jakarta-commons-logging:
(http://mirrors.ibiblio.org/pub/mirrors/maven2/commons-logging/commons-logg=
ing/maven-metadata.xml)

Of the files above, commons-discovery and commons-logging are downloaded
twice (like commons-io) while commons-id is only downloaded once (but to the
"wrong" path in the maven repository).

Shall I continue looking for inconsistencies? (There is also the grep output
of the src directory below to consider, I think there are a lot of "wrong"
references that might still download to this second location if we correct
the ref in wyona-org-security-core-0.2-dev-r48408.pom) The sure way to clean
this all up would probably be to go through the ~/.m2 directory and check
for each artifact if it is in the proper place, wdyt?

Cheers,

Memo



> Cheers
>
> Michi
>
> Mehmet Birgi wrote:
>
>> What I could find out so far:
>>
>> 1. The correct artifact-id is "commons-io", according to the Maven docs,
>> that point to ibiblio.org/maven2 <http://ibiblio.org/maven2> as the
>> reference (
>> http://mirrors.ibiblio.org/pub/mirrors/maven2/commons-io/commons-io/mave=
n-metadata.xml
>> )
>>
>>
>> 2. I have found a reference to the "incorrect" artifact-id,
>> "apache-jakarta-commons-io", but there seem to be several others too:
>>
>> memo at Memos-MacSilver:~/Wyona/Work/Yanel $ grep -riI
>> apache-jakarta-commons-io src | grep -v '/\.svn/' | grep -v '\.yarep/'
>> src/build/dependencies.xml:      <dependency
>> groupId=3D"apache-jakarta-commons" artifactId=3D"apache-jakarta-commons-=
io"
>> src/contributions/resources/xinha/src/build/dependencies.xml:
>>  <dependency groupId=3D"apache-jakarta-commons"
>> artifactId=3D"apache-jakarta-commons-io" version=3D"1.2"/>
>> src/realms/welcome-admin/yanel/resources/update-webapp/src/build/depende=
ncies.xml:
>>      <dependency groupId=3D"apache-jakarta-commons"
>> artifactId=3D"apache-jakarta-commons-io" version=3D"1.2"/>
>> src/resources/add-realm/src/build/dependencies.xml:      <dependency
>> groupId=3D"apache-jakarta-commons" artifactId=3D"apache-jakarta-commons-=
io"
>> version=3D"1.2"/>
>> src/resources/testing-control/src/build/dependencies.xml:      <dependen=
cy
>> groupId=3D"apache-jakarta-commons" artifactId=3D"apache-jakarta-commons-=
io"
>> version=3D"1.2"/>
>> src/resources/tinymce/src/build/dependencies.xml:      <dependency
>> groupId=3D"apache-jakarta-commons" artifactId=3D"apache-jakarta-commons-=
io"
>> version=3D"1.2"/>
>> src/resources/xml/src/build/dependencies.xml:      <dependency
>> groupId=3D"apache-jakarta-commons" artifactId=3D"apache-jakarta-commons-=
io"
>> version=3D"1.2"/>
>> src/test/build.xml:      <dependency groupId=3D"apache-jakarta-commons"
>> artifactId=3D"apache-jakarta-commons-io" version=3D"1.2"/>
>>
>>
>> I am attaching the new build.log after deleting ~/.m2 to this mail, I
>> couldn't gain any new insights from it, but I will gladly pursue any fur=
ther
>> hints.
>>
>> That's it for now, cheers & good night
>>
>> Memo
>>
>>
>>
>>
>>
>> On Tue, Apr 6, 2010 at 4:39 PM, Michael Wechner <
>> michael.wechner at wyona.com <mailto:michael.wechner at wyona.com>> wrote:
>>
>>    From your log-file it seems that these libraries are downloaded at
>>    the very beginning of the build:
>>
>>    Apache Ant version 1.7.1 compiled on June 27 2008
>>    INFO: Building Yanel...
>>    Buildfile: src/build/build.xml
>>
>>    init:
>>       [echo] INFO: Building with Apache Ant version 1.7.1 compiled on
>>    June 27 2008 and Java version 1.6
>>       [echo] Yanel Home Dir:
>>    /Users/memo/Wyona/Work/Yanel/src/build/../../
>>
>>    probe-proxy:
>>       [echo] Check if proxy has been set ...
>>
>>    proxy:
>>
>>
>>    dependencies:
>>    [artifact:dependencies] Downloading:
>>    commons-io/commons-io/1.2/commons-io-1.2.pom from
>>    wyona.remote.repository
>>    [artifact:dependencies] Downloading:
>>    commons-io/commons-io/1.2/commons-io-1.2.pom from central
>>    [artifact:dependencies] Downloading:
>>
>>  apache-jakarta-commons/apache-jakarta-commons-discovery/0.2/apache-jaka=
rta-commons-discovery-0.2.pom
>>    from wyona.remote.repository
>>    [artifact:dependencies] Transferring 0K from wyona.remote.repository
>>    [artifact:dependencies] Downloading:
>>
>>  apache-jakarta-commons/apache-jakarta-commons-id/0.1-dev-lcr357257/apac=
he-jakarta-commons-id-0.1-dev-lcr357257.pom
>>    from wyona.remote.repository
>>    [artifact:dependencies] Transferring 0K from wyona.remote.repository
>>    [artifact:dependencies] Downloading:
>>
>>  apache-jakarta-commons/apache-jakarta-commons-logging/1.0.4/apache-jaka=
rta-commons-logging-1.0.4.pom
>>    from wyona.remote.repository
>>    [artifact:dependencies] Transferring 0K from wyona.remote.repository
>>    [artifact:dependencies] Downloading:
>>
>>  apache-jakarta-commons/apache-jakarta-commons-io/1.2/apache-jakarta-com=
mons-io-1.2.pom
>>    from wyona.remote.repository
>>    [artifact:dependencies] Transferring 0K from wyona.remote.repository
>>    [artifact:dependencies] Downloading:
>>    commons-io/commons-io/1.2/commons-io-1.2.jar from
>>    wyona.remote.repository
>>    [artifact:dependencies] Downloading:
>>    commons-io/commons-io/1.2/commons-io-1.2.jar from central
>>    [artifact:dependencies] Downloading:
>>
>>  apache-jakarta-commons/apache-jakarta-commons-discovery/0.2/apache-jaka=
rta-commons-discovery-0.2.jar
>>    from wyona.remote.repository
>>    [artifact:dependencies] Transferring 70K from wyona.remote.repository
>>    [artifact:dependencies] Downloading:
>>
>>  apache-jakarta-commons/apache-jakarta-commons-id/0.1-dev-lcr357257/apac=
he-jakarta-commons-id-0.1-dev-lcr357257.jar
>>    from wyona.remote.repository
>>    [artifact:dependencies] Transferring 53K from wyona.remote.repository
>>    [artifact:dependencies] Downloading:
>>
>>  apache-jakarta-commons/apache-jakarta-commons-logging/1.0.4/apache-jaka=
rta-commons-logging-1.0.4.jar
>>    from wyona.remote.repository
>>    [artifact:dependencies] Transferring 37K from wyona.remote.repository
>>    [artifact:dependencies] Downloading:
>>
>>  apache-jakarta-commons/apache-jakarta-commons-io/1.2/apache-jakarta-com=
mons-io-1.2.jar
>>    from wyona.remote.repository
>>    [artifact:dependencies] Transferring 64K from wyona.remote.repository
>>      [unzip] Expanding:
>>    /Users/memo/.m2/repository/ext/gwtext/2.0.2/gwtext-2.0.2.zip into
>>    /Users/memo/Wyona/Work/Yanel/build/webapps/yanel/htdocs/gwt-ext-2.0.2
>>
>>
>>    Now one has to analyze why. I guess the easiest is to delete the
>>    whole local Maven repo and build/log again and then analyze it
>>    again. (I assume you just deleted this libs instead the whole
>>    local repo, right?)
>>
>>    Thanks
>>
>>    Michi
>>
>>    Mehmet Birgi wrote:
>>
>>        Hi Michael
>>
>>
>>        On Tue, Apr 6, 2010 at 3:52 PM, <bugzilla at wyona.com
>>        <mailto:bugzilla at wyona.com> <mailto:bugzilla at wyona.com
>>
>>        <mailto:bugzilla at wyona.com>>> wrote:
>>
>>           http://bugzilla.wyona.com/cgi-bin/bugzilla/show_bug.cgi?id=3D7=
551
>>
>>
>>           michael.wechner at wyona.org
>>        <mailto:michael.wechner at wyona.org>
>>        <mailto:michael.wechner at wyona.org
>>        <mailto:michael.wechner at wyona.org>> changed:
>>
>>
>>                     What    |Removed                     |Added
>>
>>  -----------------------------------------------------------------------=
-----
>>                   AssignedTo|michael.wechner at wyona.org
>>        <mailto:michael.wechner at wyona.org>
>>           <mailto:michael.wechner at wyona.org
>>        <mailto:michael.wechner at wyona.org>>   |mehmet.birgi at wyona.com
>>        <mailto:mehmet.birgi at wyona.com>
>>           <mailto:mehmet.birgi at wyona.com
>>        <mailto:mehmet.birgi at wyona.com>>
>>
>>
>>
>>
>>
>>           ------- Comment #3 from michael.wechner at wyona.org
>>        <mailto:michael.wechner at wyona.org>
>>           <mailto:michael.wechner at wyona.org
>>        <mailto:michael.wechner at wyona.org>>  2010-04-06 14:48 -------
>>
>>           It would be important that you add the piece of the log
>>        file where
>>           one can see
>>           from where the Maven download is actually started. Right
>>        now one
>>           can only see,
>>           that it is downloaded, but not which resource or realm or
>>           component is actually
>>           triggering the download
>>
>>
>>        I am not sure I understand what you mean, I have attached the
>>        whole log file, can you point me to the proper entries? Maybe
>>        this information is not logged?
>>
>>        Thanks,
>>
>>        Memo
>>
>>
>>
>>
>>           --
>>           Configure bugmail:
>>
>> http://bugzilla.wyona.com/cgi-bin/bugzilla/userprefs.cgi?tab=3Demail
>>           ------- You are receiving this mail because: -------
>>           You are the QA contact for the bug, or are watching the QA
>>        contact.
>>           --
>>           Yanel-development mailing list Yanel-development at wyona.com
>>        <mailto:Yanel-development at wyona.com>
>>           <mailto:Yanel-development at wyona.com
>>        <mailto:Yanel-development at wyona.com>>
>>
>>
>> http://lists.wyona.org/cgi-bin/mailman/listinfo/yanel-development
>>
>>
>>
>>
>>        --         Mehmet Birgi
>>        www.wyona.com <http://www.wyona.com> <http://www.wyona.com>
>>
>>
>>
>>    --     Yanel-development mailing list Yanel-development at wyona.com
>>    <mailto:Yanel-development at wyona.com>
>>    http://lists.wyona.org/cgi-bin/mailman/listinfo/yanel-development
>>
>>
>>
>>
>> --
>> Mehmet Birgi
>> www.wyona.com <http://www.wyona.com>
>>
>>
> --
> Yanel-development mailing list Yanel-development at wyona.com
> http://lists.wyona.org/cgi-bin/mailman/listinfo/yanel-development
>



-- =

Mehmet Birgi
www.wyona.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.wyona.org/pipermail/yanel-development/attachments/2010040=
7/9ef98ff2/attachment-0001.htm


More information about the Yanel-development mailing list