Jan, Thanks for this thread. +1 for unification.
What's your preferred approach given your experience with this current infra? IMO, we should focus on the simpler yet proven method. That said, option 4 resonates better with me. On Fri, Apr 19, 2024 at 10:50 AM Jan Šťastný <[email protected]> wrote: > Hello, > at the moment our CI uses several approaches to do maven artifacts > deployment. > > For the sake of reducing efforts to maintain, it would be great to unify > the approach to a single method. > > And moreover it would be great to use the method that other ASF projects > use. I am thus adding our mentors in the thread if they could share the way > their projects are doing this. Any pointers are welcome. > > Historically our approach differed between nightly and release pipelines: > 1. nightly used "local" deploy (-DaltDeploymentRepository) into a directory > and then in the last stage it would zip the resulting repository and upload > using a plugin (was that some nexus maven plugin?) into the snapshots repo. > This was used in the old CI, after the move to ASF jenkins this method > didn't work and was replaced by 2. > 2. "local" deploy + use of wagon-maven-plugin:merge-maven-repos goal that > can upload local repository contents one by one into the target repository. > Which seemed to have worked fine in ASF Jenkins, so was a replacement for > 1. As it turns out, sometimes we face timeouts on one of the artifact > uploads, which makes the whole upload unreliable and needs rerunning. > 3. release pipelines used nexus-staging-plugin to deploy artifacts into the > staging repository which could later be promoted > 4. option is to run deploy goal directly instead of mvn install, with > possibility to defer deployment till after the whole project builds using > -DdeployAtEnd - so should work similarly to 1. and 2. while possibly > simplifying things (also retry would be nice to set up). > 5. another possibility is to use mvn deploy:deploy goal explicitly in > combination with jar:jar, ... and others to make sure all the artifact > types are considered by the deploy goal. > > Please share any input you might have on the topic. > > Regards > Jan >
