Hello,
unfortunately we haven't heard from anyone else here.

Ricardo, I'd say we'll try to adjust to use the option 4, we haven't found
any blockers for attempting that so far.

I think that using `mvn deploy -DdeployAtEnd` + org.apache:apache project
as a parent in all our maven projects, can be a sufficient solution for
both snapshots and staging repository deployments.

What we need to take care with, is

- whether our maven projects have the correct parent org.apache:apache

- our settings.xml needs to specify credentials for the matching ids from
distributionManagement sections. Having said that, we're overriding
distributionManagement from the org.apache:apache parent in our "root" poms
in drools, kogito-runtimes and optaplanner - so caution needs to be taken
to keep the correct mapping. I think it would be worth reviewing if we
shouldn't remove these overrides in our poms and rely on org.apache:apache
in distributionManagement setup.

- in case of the staging deployments - there are other expectations like
gpg signature, etc, all defined in org.apache:apache pom.xml in profile
<id>apache-release</id> - needs to be figured out (using a
-DdryRun perhaps?) if everything works using the same command with just the
profiles and system properties differences.

Let me know what you think.

Regards
Jan

On Fri, 19 Apr 2024 at 17:22, ricardo zanini fernandes <
[email protected]> wrote:

> 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
> >
>

Reply via email to