# withMaven intercepting default Maven deployment

**URL:** <https://community.jenkins.io/t/withmaven-intercepting-default-maven-deployment/13600>\
**Category:** Community\
**Tags:** question, docker, pipeline, maven\
**Created:** [March 23, 2024, 1:25am UTC](https://community.jenkins.io/t/withmaven-intercepting-default-maven-deployment/13600 "2024-03-23T01:25:25Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![drivera-armedia](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/drivera-armedia/32/7557_2.png) [@drivera-armedia](https://community.jenkins.io/u/drivera-armedia)\
**Post date:** [March 23, 2024, 1:25am UTC](https://community.jenkins.io/t/withmaven-intercepting-default-maven-deployment/13600/1 "2024-03-23T01:25:25Z")

</div>

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 ☹ … hopefully someone here has come up against this same wall, and knows the way around/through.

Thanks!
