Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #39308
| Path | csiph.com!eternal-september.org!feeder.eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| From | Andreas Leitgeb <avl@logic.at> |
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: maven and its downloads |
| Date | Thu, 27 Feb 2020 11:59:26 -0000 (UTC) |
| Organization | A noiseless patient Spider |
| Lines | 53 |
| Message-ID | <slrnr5fbou.p7n.avl@logic.at> (permalink) |
| References | <slrnr5cdr0.897.avl@logic.at> <3b5cef64-f28b-447c-a6cc-5b47dfe463ee@googlegroups.com> <slrnr5d8rp.p7n.avl@logic.at> <5s4fwywkn0w0.1bel7pifsoh00$.dlg@40tude.net> <slrnr5fa3i.p7n.avl@logic.at> |
| Reply-To | avl@logic.at |
| Injection-Date | Thu, 27 Feb 2020 11:59:26 -0000 (UTC) |
| Injection-Info | reader02.eternal-september.org; posting-host="566e8e2316f60fe77023cc31f8e4417e"; logging-data="2051"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18YnkC5s20sB51gm5eYruYl" |
| User-Agent | slrn/1.0.3 (Linux) |
| Cancel-Lock | sha1:NVK8HmQB4VmXIbGdnGiXAv0YjmM= |
| Xref | csiph.com comp.lang.java.programmer:39308 |
Show key headers only | View raw
Andreas Leitgeb <avl@logic.at> wrote:
> Joerg Meier <joergmmeier@arcor.de> wrote:
>> On Wed, 26 Feb 2020 16:57:29 -0000 (UTC), Andreas Leitgeb wrote:
>>> Eric Douglas <e.d.programmer@gmail.com> wrote:
>>>> On Wednesday, February 26, 2020 at 4:16:26 AM UTC-5, Andreas Leitgeb wrote:
>>>>> I've got a single maven project on a particular user at a machine.
>>>>> After some development stages (with often changed dependencies),
>>>>> I made a full clean+build (took only a few minutes), then used
>>>>> "find ~/.m2/repository -amin +60 -exec rm {} +"
>>>>> (remove everything not used in the last 60 minutes)
>>>>> On next build afterwards, it again downloaded a few packages.
>>>>> Apparently, it downloads packages that it doesn't ever use.
>>>>> Majority of them is in org.apache.maven group.
>>>>> Given that the local repo of that user is used only for that
>>>>> project, is there a way to prune it of no-longer necessary
>>>>> stuff, while avoiding to prune stuff that will be re-downloaded?
>>>> It should download everything in your pom file(s).
>>>> Are you seeing projects downloaded which are not referenced for download anywhere?
>>> Yes. Well, not "anywhere in my pom-files".
>>
>> Try "mvn dependency:tree -Dverbose"
>
> Thanks! I didn't know that. It'll hopefully give me the reasons for
> presence of some of the packages, although it doesn't seem to mention
oups, rest of sentence got lost somehow...
... doesn't seem to mention those packages that were apparently
(by "find ... -amin"-heuristic) not used, but still re-downloaded.
> (Fwiw, it says: "Verbose not supported since maven-dependency-plugin 3.0")
>
>>>> Define "doesn't ever use".
>>> As I wrote: The OS doesn't record any attempt at reading those files
>>> during the time I do a complete build.
>> That doesn't mean they aren't "used" in your Maven context.
> ...
>> You seem to have misunderstood Eric. Imagine this scenario: in your
>> pom.xml, you reference a library. That library references Apache POI, which
>> is a library that can write a spreadsheet. But your code never actually
>> writes a spreadsheet, so the Apache POI library is never actually used (in
>> the code you ran).
>
> My logic may still be flawed, and I'd appreciate correction:
>
> My project uses spring-boot-starter to build a standalone
> jar-file with everything included (as nested jar-files).
>
> So, if my code had (e.g.) any chance to create a spreadsheet using a
> 3rd-party lib from the repo, then the actual code for creating the
> spreadsheet would need to be included in the standalone jar, and
> for that it would *need to be "accessed" during the build*.
>
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
maven and its downloads Andreas Leitgeb <avl@logic.at> - 2020-02-26 09:16 +0000
Re: maven and its downloads Eric Douglas <e.d.programmer@gmail.com> - 2020-02-26 07:51 -0800
Re: maven and its downloads Andreas Leitgeb <avl@logic.at> - 2020-02-26 16:57 +0000
Re: maven and its downloads Joerg Meier <joergmmeier@arcor.de> - 2020-02-27 09:35 +0100
Re: maven and its downloads Andreas Leitgeb <avl@logic.at> - 2020-02-27 11:30 +0000
Re: maven and its downloads Andreas Leitgeb <avl@logic.at> - 2020-02-27 11:59 +0000
Re: maven and its downloads Daniele Futtorovic <da.futt.news@laposte-dot-net.invalid> - 2020-02-27 18:59 +0100
Re: maven and its downloads Eric Douglas <e.d.programmer@gmail.com> - 2020-02-27 05:50 -0800
csiph-web