You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "Robbie Gemmell (Jira)" <ji...@apache.org> on 2022/10/13 12:06:00 UTC

[jira] [Created] (ARTEMIS-4048) stop the '-all' client modules grabbing their own -SNAPSHOT sources unnecessarily during build

Robbie Gemmell created ARTEMIS-4048:
---------------------------------------

             Summary: stop the '-all' client modules grabbing their own -SNAPSHOT sources unnecessarily during build
                 Key: ARTEMIS-4048
                 URL: https://issues.apache.org/jira/browse/ARTEMIS-4048
             Project: ActiveMQ Artemis
          Issue Type: Task
    Affects Versions: 2.26.0
            Reporter: Robbie Gemmell
            Assignee: Robbie Gemmell
             Fix For: 2.27.0


The three '-all' partial-shaded uber client modules can each unnecessarily download their own 6MB previously-shaded -SNAPSHOT sources from repository.apache.org while they are being built, if a sufficiently new copy isnt already in the maven local repo. Typically this will be if a developer hasnt 'mvn installed' yet in a day, or as much as every build in a CI env that doesnt cache prior installed snapshot output. Taking GHA CI jobs as example, where 4 builds occur for the various jobs for each run, it can thus grab about 6x3x4=72MB of -SNAPSHOT sources unnecessarily on every push to a PR and/or main.

The cause is that the shading is producing a sources jar, which naturally incorporates the original module sources itself (though it has no real content, in this instance), but finds this has not been prepared yet before the shading occurs (the parent pom arranges it at a later phase) so it has to go looking and downloads it if it doesnt find something 'up to date enough' in the local repo. The remote version is the already-shaded 6MB output of a prior shading run, rather than the modules original basically-empty one.

The fix is to ensure the modules original [basically-empty] sources jar is always produced during the build, before the shading process, meaning it never needs to go looking for it and potentially then download it. Similarly, the modules original [basically empty] main jar should similarly always be created, so that the shading always operates on that, as opposed to potentially operating on the already-shaded renamed artifact output from a prior run, as it currently does if you dont do a mvn clean.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)