withMaven intercepting default Maven deployment

Hi, all!

My pipelines are running quite well, but unfortunately I’m not able to leverage the full glory of Jenkins and Maven integration. In particular, if I use the withMaven { } pipeline step, then any standard Maven deployments (i.e. from distributionManagement in the POMs) will be bypassed and not executed.

Furthermore, the only mechanism to “archive” produced artifacts will put them into Jenkins, which isn’t what I want. My POM files are configured to push generated artifacts up to our internal Nexus repository, and that has been working quite well for us.

I’m aware of the Nexus publisher, but I don’t want to duplicate configurations having to specifically tell both the POM and the pipeline which artifacts should be deployed.

What I would like to have happen is for a standard, mvn deploy to upload the built artifacts (WARs, JARs, assemblies, etc) into our Nexus repo, just as it happens when we run maven without using the withMaven { } wrapper, but also NOT keep a copy of the produced artifacts in Jenkins (b/c I don’t want the duplicated storage). I’m OK with the fingerprints, and I quite like the concept.

I’m almost positive it’s a simple, stupid configuration setting I’m missing somewhere, but for the life of me I’ve been unable to find it and I’m frankly tired of looking, and Google has not been my friend :frowning: … hopefully someone here has come up against this same wall, and knows the way around/through.